Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1000 Bytes

notes.org

File metadata and controls

44 lines (34 loc) · 1000 Bytes

Mapping RGB Triples Onto 16 Distinct Value

coderedGB
0000
10.50.50
20.50.5
3100
400.5.5
5010
6001
70.330.33.33
80.660.66.66
9110
10101
1110.5.5
12011
13.51.5
14.50.51
15111

from graphics gems II

struct rgb_color cc[] = { { 1 , 0 , 0 }, { 1 , 1 , 0 }, { 0 , 1 , 1 }, { 0 , 0 , 1 }, };

algorithm to fill in colormap

  1. subdivide
base poscolormap posindex
00
119.75
239.5
379

given an index, find the range and interpolate