About: USERAPI ColorGradient   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

Converts a percent value into a gradient from 2 or more RGB percent values (0.0-1.0). If more than 2 colors are passed, the gradient will be between the two colors which perc lies in an evenly divided range. (Note that if you will always be generating a gradient between the same number of colors, you will see *significantly* greater performance if you customize this function to take a fixed number of arguments.)

AttributesValues
rdfs:label
  • USERAPI ColorGradient
rdfs:comment
  • Converts a percent value into a gradient from 2 or more RGB percent values (0.0-1.0). If more than 2 colors are passed, the gradient will be between the two colors which perc lies in an evenly divided range. (Note that if you will always be generating a gradient between the same number of colors, you will see *significantly* greater performance if you customize this function to take a fixed number of arguments.)
dbkwik:wowwiki/pro...iPageUsesTemplate
abstract
  • Converts a percent value into a gradient from 2 or more RGB percent values (0.0-1.0). If more than 2 colors are passed, the gradient will be between the two colors which perc lies in an evenly divided range. (Note that if you will always be generating a gradient between the same number of colors, you will see *significantly* greater performance if you customize this function to take a fixed number of arguments.) local function ColorGradient(perc, ...) if perc >= 1 then local r, g, b = select(select('#', ...) - 2, ...) return r, g, b elseif perc <= 0 then local r, g, b = ... return r, g, b end local num = select('#', ...) / 3 local segment, relperc = math.modf(perc*(num-1)) local r1, g1, b1, r2, g2, b2 = select((segment*3)+1, ...) return r1 + (r2-r1)*relperc, g1 + (g2-g1)*relperc, b1 + (b2-b1)*relperc end
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software