|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--DHTMLSuite.colorHelp
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.colorHelp
()
|
Method Summary | |
String
|
baseConverter(numberToConvert,oldBase,newBase)
converts numbers from different number systems(DHTMLSuite.colorHelp.prototype.example = Decimal;to octal) |
String
|
findColorByBrightness(rgbColor,brightness)
Returns a new rgb color after change of brightness |
String
|
findColorByDegrees(rgbColor,degrees)
Returns RGB color from a position on the color wheel |
String
|
getAllNamedColors()
This method returns an array of all web colors |
String
|
getAllWebColors()
This method returns an array of all web colors |
Array
|
getHsvByRgbCode(rgbColor)
Converts a RGB color to HSV |
String
|
getRgbCodeByHsv(hue,saturation,valueBrightness)
Converts a RGB color to HSV |
String
|
getRgbCodeFromRgbColors(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 |
String
|
getRgbFromNumbers(red,green,blue)
Returns a color in RGB format(e.g.: #FFEECC from numeric values of red, green and blue) |
Constructor Detail |
DHTMLSuite.colorHelp()
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)
String findColorByDegrees(rgbColor,degrees)
String
- rgbColor - Rgb color to calculate degrees from
Float
- degrees - How many degrees to move on the color wheel(clockwise)
String getAllNamedColors()
String getAllWebColors()
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 getRgbCodeFromRgbColors(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)
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |