Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- const char *colors[] = {
- "2b303b",
- "343d46",
- "4f5b66",
- "65737e",
- "a7adba",
- "c0c5ce",
- "dfe1e8",
- "eff1f5",
- "bf616a",
- "d08770",
- "ebcb8b",
- "a3be8c",
- "96b5b4",
- "8fa1b3",
- "b48ead",
- "ab7967"
- };
- int main() {
- char r[3]; r[2] = 0;
- char g[3]; g[2] = 0;
- char b[3]; b[2] = 0;
- for (int i = 0; i < 16; i++) {
- int i_r, i_g, i_b;
- r[0] = colors[i][0], r[1] = colors[i][1];
- g[0] = colors[i][2], g[1] = colors[i][3];
- b[0] = colors[i][4], b[1] = colors[i][5];
- sscanf(r, "%x", &i_r);
- sscanf(g, "%x", &i_g);
- sscanf(b, "%x", &i_b);
- printf("%d: %d %d %d 255\n", i, i_r, i_g, i_b);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement