tp TouchPointWP Utilities Colors - TenthPres/TouchPoint-WP GitHub Wiki
tp\TouchPointWP\Utilities\Colors
Used to manage colors
- Class name: Colors
- Namespace: \tp\TouchPointWP\Utilities
- This is an abstract class
Methods
getColorFor
string tp\TouchPointWP\Utilities\Colors::getColorFor(string itemName, string setName)
Arbitrarily pick a unique-ish color for a value.
- Visibility: public
- This method is static.
Arguments
- itemName string - The name of the item. e.g. PA
- setName string - The name of the set to which the item belongs, within which there should be uniqueness. e.g. States
Returns
- string - The color in hex, starting with '#'.
hslToHex
string tp\TouchPointWP\Utilities\Colors::hslToHex(int h, int s, int l)
Convert HSL color to RGB Color
- Visibility: public
- This method is static.
Arguments
- h int - Hue (0-365)
- s int - Saturation (0-100)
- l int - Luminosity (0-100)
Returns
- string -