bibliopixel.colors.conversions module

bibliopixel.colors.conversions.color_cmp(a, b)[source]

Order colors by hue, saturation and value, in that order.

Returns -1 if a < b, 0 if a == b and 1 if a < b.

bibliopixel.colors.conversions.hsv2rgb(hsv)

Generates RGB values from HSV that have an even visual distribution. Be careful as this method is only have as fast as hsv2rgb_spectrum.

bibliopixel.colors.conversions.hsv2rgb_360(hsv)[source]

Python default hsv to rgb conversion for when hue values in the range 0-359 are preferred. Due to requiring float math, this method is slower than hsv2rgb_rainbow and hsv2rgb_spectrum.

bibliopixel.colors.conversions.hsv2rgb_rainbow(hsv)[source]

Generates RGB values from HSV that have an even visual distribution. Be careful as this method is only have as fast as hsv2rgb_spectrum.

bibliopixel.colors.conversions.hsv2rgb_raw(hsv)[source]

Converts an HSV tuple to RGB. Intended for internal use. You should use hsv2rgb_spectrum or hsv2rgb_rainbow instead.

bibliopixel.colors.conversions.hsv2rgb_spectrum(hsv)[source]

Generates RGB values from HSV values in line with a typical light spectrum.

bibliopixel.colors.conversions.hue2rgb(hue)
bibliopixel.colors.conversions.hue2rgb_360(hue)[source]
bibliopixel.colors.conversions.hue2rgb_rainbow(hue)[source]
bibliopixel.colors.conversions.hue2rgb_raw(hue)[source]
bibliopixel.colors.conversions.hue2rgb_spectrum(hue)[source]
bibliopixel.colors.conversions.hue_gradient(start, stop, steps)[source]
bibliopixel.colors.conversions.hue_helper(pos, length, cycle_step)[source]
bibliopixel.colors.conversions.hue_helper360(pos, length, cycle_step)[source]
bibliopixel.colors.conversions.rgb_to_hsv(pixel)[source]