Skip to content

class_color

reduz edited this page Feb 23, 2014 · 11 revisions

Color

Brief Description

Color in RGBA format.

Member Functions

Member Variables

Description

A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point, ranging from 0 to 1.

Member Function Description

  • real gray ( ) \ Convert the color to gray.
  • Color inverted ( ) \ Return the inverted color (1-r, 1-g, 1-b, 1-a).
  • int to_32 ( ) \ Convert the color to a 32 its integer (each byte represets a RGBA).
  • int to_ARGB32 ( ) \ Convert color to ARGB32, more compatible with DirectX.
  • String to_html ( bool with_alpha=True ) \ Return the HTML hexadecimal color string.

Clone this wiki locally