API Docs for: 0.0.2
Show:

color.Color Class

Module: Canvas

Color functions

Methods

offsetBrightness

(
  • color
  • offset
)
String

Return rgb code after hue has been adjusted by a number of degrees

Parameters:

Returns:

offsetHue

(
  • color
  • offset
)
String

Return rgb code after hue has been adjusted by a number of degrees

Parameters:

Returns:

offsetSaturation

(
  • color
  • offset
)
String

Return rgb code after hue has been adjusted by a number of degrees

Parameters:

Returns:

rgbCode

(
  • a
  • b
  • c
)
String

Converts RGB or HSV color object to rgb code

Parameters:

Returns:

rgbObject

(
  • rgbColor
)
Object

Converts rgb color string to rgb color object

Parameters:

Returns:

Example:

var c = new ludo.color.Color(); console.log(c.rgbObject('#FFEEDD'); // returns { 'r': 'FF','g' : 'EE', 'b' : 'DD' }

toHSVFromRGB

(
  • r
  • g
  • b
)
Object

Converts red,green and blue to hsv h,s v

Parameters:

Returns:

toRGB

(
  • red
  • green
  • blue
)
String

Converts rgb object to rgb string

Parameters:

Returns:

Attributes

boxStyles

Object

Styling of box where the tooltip is rendered

Default: { "fill":"#fff", "fill-opacity":.8, "stroke-width" : 1, "stroke-location": "inside" }

textStyles

Object

Overall styling of text

Default: { "fill" : "#000" }