Next: , Previous: Color Operators, Up: Color Reference


16.4 Modifying

— Function: void set_name (const string s)

Sets name to s. use_name is not reset.

— Function: void set_use_name (const bool b)

Sets use_name to b.

— Function: void modify (const real r, [const real g = 0, [const real b = 0]])

Adds r, g, and b to red_part, green_part, and blue_part, respectively. Following the addition, if red_part, green_part, and/or blue_part is greater than 1, it is reduced to 1. If it is less than 0, it is increased to 0.

— Function: void set_red_part (const real q)
— Function: void set_green_part (const real q)
— Function: void set_blue_part (const real q)

Let p stand for red_part, green_part, or blue_part, depending upon which function is used. If 0 <= q <= 1, p is set to q. If q < 0, p is set to 0. If q > 1, p is set to 1.