Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 23 lines (17 sloc) 0.521 kb
206e956 Vladimir Chizhov Added README file
authored
1 Simple command line converter for colors from 24bit format (8 bit per color) to
2 16 bit (5 bit for red, 6 bit for green and 5 bit for blue).
3
4 <pre><code>
5 Usage:
6 colrconv color1 color2 ... colorN
7 where:
8 color - hex rgb, prefixed by 0x. i.e.: 0xFF00FF).
9 </code></pre>
10
2d5bf81 Vladimir Chizhov Added sample output to README
authored
11 Example:
12
13 <pre><code>
14 $ ./colrconv 0xFF00FF 0x000000 0xFF7E00 0xA52A2A
15 0xFF00FF -> 0x00F81F
16 0x000000 -> 0x000000
17 0xFF7E00 -> 0x00FBE0
18 0xA52A2A -> 0x00A145
19 </code></pre>
20
21 NB: You can see, that the output is 24 bit too. But first 8 bits are always '00'.
22
Something went wrong with that request. Please try again.