|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--DHTMLSuite.colorUtil
This class provides some methods for working with colors.
Defined in dhtml-suite-for-applications.js
Author: Alf Magne Kalleland(www.dhtmlgoodies.com)
Version: 1.0
Constructor Summary | |
DHTMLSuite.colorUtil
()
|
Method Summary | |
String
|
baseConverter(numberToConvert,oldBase,newBase)
converts numbers from different number systems(DHTMLSuite.colorUtil.prototype.example = Decimal;to octal) |
String
|
findColorByBrightness(rgbColor,brightness)
Returns a new rgb color after change of brightness |
Array
|
getAllNamedColors()
This method returns an array of all web colors |
String
|
getAllWebColors()
This method returns an array of all web colors |
String
|
getAnalogicColors(rgbCode,degrees)
Return getAnalogicColors colors of an rgb code. |
String
|
getColorByDegrees(rgbColor,degrees)
Returns RGB color from a position on the color wheel |
String
|
getContrastColorByRgb(rgbCode)
Return the rgb code of a complementary color |
Array
|
getHsvByRgbCode(rgbColor)
Converts a RGB color to HSV |
String
|
getRgbCodeByHsv(hue,saturation,valueBrightness)
Converts a RGB color to HSV |
String
|
getRgbCodeByRgbColors(red,green,blue)
Return an rgb code from numeric red,green and blue |
String
|
getRgbColorsByHsv(hue,saturation,valueBrightness)
Return an array of red,green and blue from hue,saturation and brightness |
Array
|
getRgbColorsByRgbCode(rgbCode)
Return an rgb code from numeric red,green and blue |
String
|
getRgbFromNumbers(red,green,blue)
Returns a color in RGB format(e.g.: #FFEECC from numeric values of red, green and blue) |
String
|
getTetradeColorsByRgb(rgbCode)
Return tetrade colors of an rgb code. |
String
|
getTriadeColorsByRgb(rgbCode)
Return triade colors of an rgb code. |
Constructor Detail |
DHTMLSuite.colorUtil()
Method Detail |
String baseConverter(numberToConvert,oldBase,newBase)
mixed
- numberToConvert - Number to convert
int
- oldBase - Convert from which base(8 = octal, 10 = decimal, 16 = hexadecimal)
int
- newBase - Convert to which base(8 = octal, 10 = decimal, 16 = hexadecimal)
String findColorByBrightness(rgbColor,brightness)
String
- rgbColor - RGB start color
Int
- brightness - Change in brightness (value between -100 and 100)
Array getAllNamedColors()
String getAllWebColors()
String getAnalogicColors(rgbCode,degrees)
String
- inputRgb - Rgb code
Integer
- degrees - Degrees on the color wheel between colors(value between 15 and 30)
String getColorByDegrees(rgbColor,degrees)
String
- rgbColor - Rgb color to calculate degrees from
Float
- degrees - How many degrees to move on the color wheel(clockwise)
String getContrastColorByRgb(rgbCode)
String
- inputRgb - Rgb code
Array getHsvByRgbCode(rgbColor)
String
- rgbColor - Example: #FF12AB or FF12AB
String getRgbCodeByHsv(hue,saturation,valueBrightness)
Int
- hue - Degrees - Position on color wheel. Value between 0 and 359
float
- saturation - Intensity of color(value between 0 and 1)
float
- valueBrightness - Brightness(value between 0 and 1)
String getRgbCodeByRgbColors(red,green,blue)
Int
- red - (0 - 255)
int
- green - ( 0 - 255)
int
- blue - (0-255)
String getRgbColorsByHsv(hue,saturation,valueBrightness)
Int
- hue - Degrees - Position on color wheel. Value between 0 and 359
float
- saturation - Intensity of color(value between 0 and 1)
float
- valueBrightness - Brightness(value between 0 and 1)
Array getRgbColorsByRgbCode(rgbCode)
String
- rgbCode in the format RRGGBB ( NO # as prefix)
String getRgbFromNumbers(red,green,blue)
Int
- red - Amount of red(0-255)
Int
- green - Amount of green(0-255)
Int
- blue - Amount of blue(0-255)
String getTetradeColorsByRgb(rgbCode)
String
- inputRgb - Rgb code
String getTriadeColorsByRgb(rgbCode)
String
- inputRgb - Rgb code
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |