mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-08 12:30:47 +00:00
hgr: mess around with gimp palettes
This commit is contained in:
parent
d5075e1055
commit
9bcb3dc17e
53
graphics/hgr_viewer/palette/make_pal.c
Normal file
53
graphics/hgr_viewer/palette/make_pal.c
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
static int gradient[9][16]={
|
||||||
|
{0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0},
|
||||||
|
{1,0,1,0, 0,0,0,0, 0,1,0,1, 0,0,0,0},
|
||||||
|
{1,0,1,0, 0,1,0,1, 1,0,1,0, 0,1,0,1},
|
||||||
|
{0,1,0,1, 1,1,1,1, 1,0,1,0, 1,1,1,1},
|
||||||
|
{1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1},
|
||||||
|
{2,1,2,1, 1,1,1,1, 1,2,1,2, 1,1,1,1},
|
||||||
|
{2,1,2,1, 2,1,2,1, 2,1,2,1, 2,1,2,1},
|
||||||
|
{1,2,1,2, 2,2,2,2, 2,1,2,1, 2,2,2,2},
|
||||||
|
{2,2,2,2, 2,2,2,2, 2,2,2,2, 2,2,2,2},
|
||||||
|
};
|
||||||
|
|
||||||
|
static int pal_rgb[6][3]={
|
||||||
|
{0x00,0x00,0x00}, // black
|
||||||
|
{0x1b,0xcb,0x01}, // green
|
||||||
|
{0xe4,0x34,0xfe}, // purple
|
||||||
|
{0xcd,0x5b,0x01}, // orange
|
||||||
|
{0x1b,0x9a,0xfe}, // blue
|
||||||
|
{0x00,0x00,0x00}, // white
|
||||||
|
};
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
|
||||||
|
int which=4;
|
||||||
|
int c,x;
|
||||||
|
|
||||||
|
int r,g,b;
|
||||||
|
|
||||||
|
for(x=0;x<9;x++) {
|
||||||
|
r=0;
|
||||||
|
g=0;
|
||||||
|
b=0;
|
||||||
|
for(c=0;c<16;c++) {
|
||||||
|
if (gradient[x][c]==0) {
|
||||||
|
}
|
||||||
|
if (gradient[x][c]==1) {
|
||||||
|
r=r+(pal_rgb[which][0]*pal_rgb[which][0]);
|
||||||
|
g=g+(pal_rgb[which][1]*pal_rgb[which][1]);
|
||||||
|
b=b+(pal_rgb[which][2]*pal_rgb[which][2]);
|
||||||
|
}
|
||||||
|
if (gradient[x][c]==2) {
|
||||||
|
r=r+(0xff*0xff);
|
||||||
|
g=g+(0xff*0xff);
|
||||||
|
b=b+(0xff*0xff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
printf("%d %d %d\n",(int)sqrt(r/16.0),(int)sqrt(g/16.0),(int)sqrt(b/16.0));
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
21
graphics/hgr_viewer/palette/orange_blue.gpl
Normal file
21
graphics/hgr_viewer/palette/orange_blue.gpl
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
GIMP Palette
|
||||||
|
Name: Hires Gradient
|
||||||
|
Columns: 0
|
||||||
|
#
|
||||||
|
0 0 0 Black
|
||||||
|
102 45 0 Darkest Orange
|
||||||
|
144 64 0 Dark Orange
|
||||||
|
177 78 0 LightDark Orange
|
||||||
|
205 91 1 Orange
|
||||||
|
218 149 127 Darklight Orange
|
||||||
|
231 191 180 Light Orange
|
||||||
|
243 225 220 Lightest Orange
|
||||||
|
255 255 255 White
|
||||||
|
13 77 127 Darkest Blue
|
||||||
|
19 108 179 Dark Blue
|
||||||
|
23 133 219 Lightdark Blue
|
||||||
|
27 154 254 Blue
|
||||||
|
181 210 254 Darlight Blue
|
||||||
|
221 233 254 Light Blue
|
||||||
|
221 233 254 Lightest Blue
|
||||||
|
|
20
graphics/hgr_viewer/palette/orange_blue_half.gpl
Normal file
20
graphics/hgr_viewer/palette/orange_blue_half.gpl
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
GIMP Palette
|
||||||
|
Name: Hires Gradient
|
||||||
|
Columns: 0
|
||||||
|
#
|
||||||
|
0 0 0 Black
|
||||||
|
102 45 0 Darkest Orange
|
||||||
|
144 64 0 Dark Orange
|
||||||
|
177 78 0 LightDark Orange
|
||||||
|
205 91 1 Orange
|
||||||
|
218 149 127 Darklight Orange
|
||||||
|
231 191 180 Light Orange
|
||||||
|
243 225 220 Lightest Orange
|
||||||
|
255 255 255 White
|
||||||
|
13 77 127 Darkest Blue
|
||||||
|
19 108 179 Dark Blue
|
||||||
|
23 133 219 Lightdark Blue
|
||||||
|
27 154 254 Blue
|
||||||
|
129 184 254 Darlight Blue
|
||||||
|
181 210 254 Light Blue
|
||||||
|
221 233 254 Lightest Blue
|
Loading…
x
Reference in New Issue
Block a user