File ../../LibScriptablePlugins-1.0/LibScriptablePluginColor-1.0/LibScriptablePluginColor-1.0.lua

Functions

AggroColor (unit, The) Wraps UnitSelectionColor
BgColor (r, g, b) Convert an RGB expression into a suitable color for a background behind the RGB value.
ClassColor (unit) Retrieve a color suitable to color a unit's class value
ColorBrightest (col1, col2) Determine and return the brightest of 2 32bit colors.
Colorize (str, r, g, b) Retrieve a string suitable to insert a texture within a fonstring
GradientHealth (perc) This comes from oUF.
HPColor (cur, max) Return a suitable color along a gradient indicating health percentage
HostileColor (unit) Retrieve a color representing a unit's hostility toward's you
PluginColor:RedThroughBlue () Retrieve a table representing the colors along a gradient red through blue
RGB2Black (red, green, blue) Convert an RGB color into its black-white value
RGB2Gray (red, green, blue) Convert an RGB color into its greyscale value
RGB2HSV (r, g, b, a) Returns HSV colorspace values from RGB values
ReputationColor (reaction) Accessor for FACTION_BAR_COLORS, which is suitable for color reputation values
ThreatStatusColor (status) Wraps GetThreatStatus Color
ThreatStatusColor (status) Wraps GetThreatStatus Color


Functions

AggroColor (unit, The)
Wraps UnitSelectionColor

Parameters

  • unit:
  • The: unit in question

Usage:

AggroColor(unit)

Return value:

Red, green, and blue [[
BgColor (r, g, b)
Convert an RGB expression into a suitable color for a background behind the RGB value. This is part of LuaTexts.

Parameters

  • r: The color's red value
  • g: The color's green value
  • b: The color's blue value

Usage:

BgColor(r, g, b)

Return value:

Red, green, and blue representing the new background color
ClassColor (unit)
Retrieve a color suitable to color a unit's class value

Parameters

  • unit: The unit in question

Usage:

ClassColor(unit)

Return value:

red, green, and blue [[
ColorBrightest (col1, col2)
Determine and return the brightest of 2 32bit colors. The alpha channel is ignored.

Parameters

  • col1: The first color to compare.
  • col2: The second color to compare.

Usage:

ColorBrighest(color1, color2)

Return value:

The brighest of the two colors is returned.
Colorize (str, r, g, b)
Retrieve a string suitable to insert a texture within a fonstring

Parameters

  • str: The string to color
  • r: The color's red value
  • g: The color's green value
  • b: The color's blue value

Usage:

Colorize(str, r, g, b)

Return value:

A colorized string suitable to insert in a fonstring [[
GradientHealth (perc)
This comes from oUF. Trivial, but I like to give credit where credit is due.

Parameters

  • perc: A value between 0 and 1 -- The position within the gradient

Usage:

Gradient(perc)

Return value:

Red, green, and blue
HPColor (cur, max)
Return a suitable color along a gradient indicating health percentage

Parameters

  • cur: The percent of health
  • max: The maximum percent of health

Usage:

HPColor(cur, max)

Return value:

Red, green, and blue
HostileColor (unit)
Retrieve a color representing a unit's hostility toward's you

Parameters

  • unit: The unit in question

Usage:

HostileColor(unit)

Return value:

red, green, and blue [[
PluginColor:RedThroughBlue ()
Retrieve a table representing the colors along a gradient red through blue

Usage:

RedThroughBlue()

Return value:

A table of RGB values
RGB2Black (red, green, blue)
Convert an RGB color into its black-white value

Parameters

  • red: The color's red value
  • green: The color's green value
  • blue: The color's blue value

Usage:

RGB2Black(red, green, blue)

Return value:

A boolean representing the color's black format
RGB2Gray (red, green, blue)
Convert an RGB color into its greyscale value

Parameters

  • red: The color's red value
  • green: The color's green value
  • blue: The color's blue value

Usage:

RGB2Gray(red, green, blue)

Return value:

A value in the range of 0-255 representing the color's grayscale format
RGB2HSV (r, g, b, a)
Returns HSV colorspace values from RGB values

Parameters

  • r: Red value, ranging from 0 to 1
  • g: Green value, ranging from 0 to 1
  • b: Blue value, ranging from 0 to 1
  • a:

Usage:

RGB2HSV(r, g, b)

Return value:

Hue, Saturation, and Value values from RGB values
ReputationColor (reaction)
Accessor for FACTION_BAR_COLORS, which is suitable for color reputation values

Parameters

  • reaction: Indicated reaction

Usage:

ReputationColor(reaction)

Return value:

red, green, and blue [[
ThreatStatusColor (status)
Wraps GetThreatStatus Color

Parameters

  • status:

Usage:

ThreatStatusColor(status)

Return value:

Red, green, and blue
ThreatStatusColor (status)
Wraps GetThreatStatus Color

Parameters

  • status:

Usage:

ThreatStatusColor(status)

Return value:

Red, green, and blue

Valid XHTML 1.0!