Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #142130 > unrolled thread

[content] turning words into colors

Started byfir <profesor.fir@gmail.com>
First post2019-03-20 13:58 -0700
Last post2019-03-22 06:59 -0700
Articles 20 on this page of 29 — 5 participants

Back to article view | Back to comp.lang.c


Contents

  [content] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-20 13:58 -0700
    [content] turning words into colors fir is a sexy shemale <cdalten@gmail.com> - 2019-03-20 14:12 -0700
    Re: [content] turning words into colors luser droog <luser.droog@gmail.com> - 2019-03-20 14:36 -0700
      Re: [content] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-20 14:55 -0700
        Re: [content] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-20 15:17 -0700
          Re: [content] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-20 15:18 -0700
        Re: [content] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-20 15:35 -0700
          Re: [content] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-20 16:29 -0700
    Re: [content] turning words into colors Eli the Bearded <*@eli.users.panix.com> - 2019-03-20 21:48 +0000
      Re: [content] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-20 14:58 -0700
        Re: [content] turning words into colors Eli the Bearded <*@eli.users.panix.com> - 2019-03-20 22:37 +0000
          Re: [content] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-20 15:44 -0700
      Re: [content] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-20 16:50 -0700
        Re: [content] turning words into colors Eli the Bearded <*@eli.users.panix.com> - 2019-03-21 00:17 +0000
          Re: [content] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-20 17:42 -0700
      Re: [OT] turning words into colors Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-03-21 01:38 +0000
        Re: [OT] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-20 19:06 -0700
          Re: [OT] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-20 19:39 -0700
            Re: [OT] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-21 08:30 -0700
        Re: [OT] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-21 03:44 -0700
          Re: [OT] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-21 03:53 -0700
        Re: [OT] turning words into colors Eli the Bearded <*@eli.users.panix.com> - 2019-03-21 23:33 +0000
          Re: [OT] turning words into colors Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-03-22 01:14 +0000
            Re: [OT] turning words into colors Eli the Bearded <*@eli.users.panix.com> - 2019-03-22 19:43 +0000
              Re: [OT] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-22 13:31 -0700
          Re: [OT] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-22 01:31 -0700
            Re: [OT] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-22 01:56 -0700
              Re: [OT] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-22 02:11 -0700
                Re: [OT] turning words into colors fir <profesor.fir@gmail.com> - 2019-03-22 06:59 -0700

Page 1 of 2  [1] 2  Next page →


#142130 — [content] turning words into colors

Fromfir <profesor.fir@gmail.com>
Date2019-03-20 13:58 -0700
Subject[content] turning words into colors
Message-ID<23223ab5-54a3-4181-8bc0-bc3c55556c7f@googlegroups.com>
writing 2d simple game prototypes (intentionally simple, when i rather use 
graphical primitives than bitmap sprites)
i must deal a lot with typing it colors
like 0xff0000 for red and so on

this is much wearing, thats why i got idea 
to use some conversion from words (one small letter contains almost five bits of information, and i dont even need full 24 bit of color info) into colors

as i mentioned basic idea was 

 unsigned ColoR(char* str) 
{ 
  int r = 25 - ('z' - str[0]); 
  int g = 25 - ('z' - str[1]); 
  int b = 25 - ('z' - str[2]); 

  unsigned rr = (r*255)/25; 
  unsigned gg = (g*255)/25; 
  unsigned bb = (b*255)/25; 

  return (rr<<16) + (gg<<8) + (bb); 

} 

which converts "zaa" into red "zza" into yellow and so on

but it aso dont seem enough good for me:
humain brain is not so good to guess from
a string say "fir" that it is some kind of boring darkish blue and so on

something better would be needed, but what it could be? (exactly)

some ideas?

[toc] | [next] | [standalone]


#142133

Fromfir is a sexy shemale <cdalten@gmail.com>
Date2019-03-20 14:12 -0700
Message-ID<22e0cc1a-9785-494e-8ddc-a633ba30b33e@googlegroups.com>
In reply to#142130
Get a color monitor.

[toc] | [prev] | [next] | [standalone]


#142135

Fromluser droog <luser.droog@gmail.com>
Date2019-03-20 14:36 -0700
Message-ID<5bdf33c6-e963-4ca7-95e9-23aefb39f9c4@googlegroups.com>
In reply to#142130
On Wednesday, March 20, 2019 at 3:58:22 PM UTC-5, fir wrote:
> writing 2d simple game prototypes (intentionally simple, when i rather use 
[...]
> something better would be needed, but what it could be? (exactly)
> 
> some ideas?

Porter/Duff compositing? Bitblt? Something where you
can do a reversible Op like XOR against the screen
pixels.

[toc] | [prev] | [next] | [standalone]


#142139

Fromfir <profesor.fir@gmail.com>
Date2019-03-20 14:55 -0700
Message-ID<f385a2fe-0ad4-4d23-8f52-a71ed857e5d5@googlegroups.com>
In reply to#142135
W dniu środa, 20 marca 2019 22:37:02 UTC+1 użytkownik luser droog napisał:
> On Wednesday, March 20, 2019 at 3:58:22 PM UTC-5, fir wrote:
> > writing 2d simple game prototypes (intentionally simple, when i rather use 
> [...]
> > something better would be needed, but what it could be? (exactly)
> > 
> > some ideas?
> 
> Porter/Duff compositing? Bitblt? Something where you
> can do a reversible Op like XOR against the screen
> pixels.

dont understand what bitblt has to do wit it... i mean some usable "someword" -> 24 unsigned rgb conversion

i diged out some HSVtoRGB routine which i found in the net somewhere back then, thinking if it wouldnt be usable

void HSVtoRGB( float *r, float *g, float *b, float h, float s, float v )
{
	int i;
	float f, p, q, t;
	if( s == 0 ) {
		// achromatic (grey)
		*r = *g = *b = v;
		return;
	}
	h /= 60;			// sector 0 to 5
	i = floor( h );
	f = h - i;			// factorial part of h
	p = v * ( 1 - s );
	q = v * ( 1 - s * f );
	t = v * ( 1 - s * ( 1 - f ) );
	switch( i ) {
		case 0:
			*r = v;
			*g = t;
			*b = p;
			break;
		case 1:
			*r = q;
			*g = v;
			*b = p;
			break;
		case 2:
			*r = p;
			*g = v;
			*b = t;
			break;
		case 3:
			*r = p;
			*g = q;
			*b = v;
			break;
		case 4:
			*r = t;
			*g = p;
			*b = v;
			break;
		default:		// case 5:
			*r = v;
			*g = p;
			*b = q;
			break;
	}
}

and some wrapper over it

unsigned HSVColor_(float h, float s, float v)
{
  float r,g,b;

  HSVtoRGB( &r,&g,&b,  h,s,v );

  unsigned rr = 255.0*r;
  unsigned gg = 255.0*g;
  unsigned bb = 255.0*b;

   return (rr<<16) + (gg<<8) + (bb);

}

made some test wit it

////////////////////

     for(int i=0; i<360; i++)
     {
      for(int x=0; x<400; x++)
      {
        SetPixelSafe(x,i, HSVColor_(i,1.,x/400.));
      }
     }

////////////////

     for(int i=0; i<360; i++)
     {
      for(int x=0; x<400; x++)
      {
        SetPixelSafe(x,i, HSVColor_(i,x/400.,1.));
      }
     }
/////////////

to see if that HSV routine gives standable results - i mean if that 'rainbov' it generates seem to be
allright or crap, hovever i cannot judge it

links to result picrures

http://minddetonator.htw.pl/hsv1.png

http://minddetonator.htw.pl/hsv2.png

im not sure if those rainbows (i mean mostly this rightsides when full bright and full saturate) are much proper

worry is obviously if i would use this HSV routine do i not lost some colors just becouse it is weak? Or do i really got all the colors i get with pure rgb?

[toc] | [prev] | [next] | [standalone]


#142146

Fromfir <profesor.fir@gmail.com>
Date2019-03-20 15:17 -0700
Message-ID<42704222-e011-4ff2-8d00-6bd09f67426e@googlegroups.com>
In reply to#142139
W dniu środa, 20 marca 2019 22:56:03 UTC+1 użytkownik fir napisał:
> W dniu środa, 20 marca 2019 22:37:02 UTC+1 użytkownik luser droog napisał:
> > On Wednesday, March 20, 2019 at 3:58:22 PM UTC-5, fir wrote:
> > > writing 2d simple game prototypes (intentionally simple, when i rather use 
> > [...]
> > > something better would be needed, but what it could be? (exactly)
> > > 
> > > some ideas?
> > 
> > Porter/Duff compositing? Bitblt? Something where you
> > can do a reversible Op like XOR against the screen
> > pixels.
> 
> dont understand what bitblt has to do wit it... i mean some usable "someword" -> 24 unsigned rgb conversion
> 
> i diged out some HSVtoRGB routine which i found in the net somewhere back then, thinking if it wouldnt be usable
> 
> void HSVtoRGB( float *r, float *g, float *b, float h, float s, float v )
> {
> 	int i;
> 	float f, p, q, t;
> 	if( s == 0 ) {
> 		// achromatic (grey)
> 		*r = *g = *b = v;
> 		return;
> 	}
> 	h /= 60;			// sector 0 to 5
> 	i = floor( h );
> 	f = h - i;			// factorial part of h
> 	p = v * ( 1 - s );
> 	q = v * ( 1 - s * f );
> 	t = v * ( 1 - s * ( 1 - f ) );
> 	switch( i ) {
> 		case 0:
> 			*r = v;
> 			*g = t;
> 			*b = p;
> 			break;
> 		case 1:
> 			*r = q;
> 			*g = v;
> 			*b = p;
> 			break;
> 		case 2:
> 			*r = p;
> 			*g = v;
> 			*b = t;
> 			break;
> 		case 3:
> 			*r = p;
> 			*g = q;
> 			*b = v;
> 			break;
> 		case 4:
> 			*r = t;
> 			*g = p;
> 			*b = v;
> 			break;
> 		default:		// case 5:
> 			*r = v;
> 			*g = p;
> 			*b = q;
> 			break;
> 	}
> }
> 
> and some wrapper over it
> 
> unsigned HSVColor_(float h, float s, float v)
> {
>   float r,g,b;
> 
>   HSVtoRGB( &r,&g,&b,  h,s,v );
> 
>   unsigned rr = 255.0*r;
>   unsigned gg = 255.0*g;
>   unsigned bb = 255.0*b;
> 
>    return (rr<<16) + (gg<<8) + (bb);
> 
> }
> 
> made some test wit it
> 
> ////////////////////
> 
>      for(int i=0; i<360; i++)
>      {
>       for(int x=0; x<400; x++)
>       {
>         SetPixelSafe(x,i, HSVColor_(i,1.,x/400.));
>       }
>      }
> 
> ////////////////
> 
>      for(int i=0; i<360; i++)
>      {
>       for(int x=0; x<400; x++)
>       {
>         SetPixelSafe(x,i, HSVColor_(i,x/400.,1.));
>       }
>      }
> /////////////
> 
> to see if that HSV routine gives standable results - i mean if that 'rainbov' it generates seem to be
> allright or crap, hovever i cannot judge it
> 
> links to result picrures
> 
> http://minddetonator.htw.pl/hsv1.png
> 
> http://minddetonator.htw.pl/hsv2.png
> 
> im not sure if those rainbows (i mean mostly this rightsides when full bright and full saturate) are much proper
> 
> worry is obviously if i would use this HSV routine do i not lost some colors just becouse it is weak? Or do i really got all the colors i get with pure rgb?

ps. if someone would like to experiment youself he can use my library green fire

here is example project over it (you only need mingw (32 bit one) installed and put a path to it in that bat file )

[toc] | [prev] | [next] | [standalone]


#142147

Fromfir <profesor.fir@gmail.com>
Date2019-03-20 15:18 -0700
Message-ID<4a1785f2-3ba9-4f1a-8306-6b0c28fd37f0@googlegroups.com>
In reply to#142146
W dniu środa, 20 marca 2019 23:18:08 UTC+1 użytkownik fir napisał:
> W dniu środa, 20 marca 2019 22:56:03 UTC+1 użytkownik fir napisał:
> > W dniu środa, 20 marca 2019 22:37:02 UTC+1 użytkownik luser droog napisał:
> > > On Wednesday, March 20, 2019 at 3:58:22 PM UTC-5, fir wrote:
> > > > writing 2d simple game prototypes (intentionally simple, when i rather use 
> > > [...]
> > > > something better would be needed, but what it could be? (exactly)
> > > > 
> > > > some ideas?
> > > 
> > > Porter/Duff compositing? Bitblt? Something where you
> > > can do a reversible Op like XOR against the screen
> > > pixels.
> > 
> > dont understand what bitblt has to do wit it... i mean some usable "someword" -> 24 unsigned rgb conversion
> > 
> > i diged out some HSVtoRGB routine which i found in the net somewhere back then, thinking if it wouldnt be usable
> > 
> > void HSVtoRGB( float *r, float *g, float *b, float h, float s, float v )
> > {
> > 	int i;
> > 	float f, p, q, t;
> > 	if( s == 0 ) {
> > 		// achromatic (grey)
> > 		*r = *g = *b = v;
> > 		return;
> > 	}
> > 	h /= 60;			// sector 0 to 5
> > 	i = floor( h );
> > 	f = h - i;			// factorial part of h
> > 	p = v * ( 1 - s );
> > 	q = v * ( 1 - s * f );
> > 	t = v * ( 1 - s * ( 1 - f ) );
> > 	switch( i ) {
> > 		case 0:
> > 			*r = v;
> > 			*g = t;
> > 			*b = p;
> > 			break;
> > 		case 1:
> > 			*r = q;
> > 			*g = v;
> > 			*b = p;
> > 			break;
> > 		case 2:
> > 			*r = p;
> > 			*g = v;
> > 			*b = t;
> > 			break;
> > 		case 3:
> > 			*r = p;
> > 			*g = q;
> > 			*b = v;
> > 			break;
> > 		case 4:
> > 			*r = t;
> > 			*g = p;
> > 			*b = v;
> > 			break;
> > 		default:		// case 5:
> > 			*r = v;
> > 			*g = p;
> > 			*b = q;
> > 			break;
> > 	}
> > }
> > 
> > and some wrapper over it
> > 
> > unsigned HSVColor_(float h, float s, float v)
> > {
> >   float r,g,b;
> > 
> >   HSVtoRGB( &r,&g,&b,  h,s,v );
> > 
> >   unsigned rr = 255.0*r;
> >   unsigned gg = 255.0*g;
> >   unsigned bb = 255.0*b;
> > 
> >    return (rr<<16) + (gg<<8) + (bb);
> > 
> > }
> > 
> > made some test wit it
> > 
> > ////////////////////
> > 
> >      for(int i=0; i<360; i++)
> >      {
> >       for(int x=0; x<400; x++)
> >       {
> >         SetPixelSafe(x,i, HSVColor_(i,1.,x/400.));
> >       }
> >      }
> > 
> > ////////////////
> > 
> >      for(int i=0; i<360; i++)
> >      {
> >       for(int x=0; x<400; x++)
> >       {
> >         SetPixelSafe(x,i, HSVColor_(i,x/400.,1.));
> >       }
> >      }
> > /////////////
> > 
> > to see if that HSV routine gives standable results - i mean if that 'rainbov' it generates seem to be
> > allright or crap, hovever i cannot judge it
> > 
> > links to result picrures
> > 
> > http://minddetonator.htw.pl/hsv1.png
> > 
> > http://minddetonator.htw.pl/hsv2.png
> > 
> > im not sure if those rainbows (i mean mostly this rightsides when full bright and full saturate) are much proper
> > 
> > worry is obviously if i would use this HSV routine do i not lost some colors just becouse it is weak? Or do i really got all the colors i get with pure rgb?
> 
> ps. if someone would like to experiment youself he can use my library green fire
> 
> here is example project over it (you only need mingw (32 bit one) installed and put a path to it in that bat file )

http://minddetonator.htw.pl/hsvtest.zip

[toc] | [prev] | [next] | [standalone]


#142149

Fromfir <profesor.fir@gmail.com>
Date2019-03-20 15:35 -0700
Message-ID<70023b98-0299-40f1-851d-6a3d7b7f309d@googlegroups.com>
In reply to#142139
W dniu środa, 20 marca 2019 22:56:03 UTC+1 użytkownik fir napisał:
> links to result picrures
> 
> http://minddetonator.htw.pl/hsv1.png
> 
> http://minddetonator.htw.pl/hsv2.png
> 
> im not sure if those rainbows (i mean mostly this rightsides when full bright and full saturate) are much proper
> 
> worry is obviously if i would use this HSV routine do i not lost some colors just becouse it is weak? Or do i really got all the colors i get with pure rgb?

on this pictures it imo looks weird that red green blue places (ranges) are like flat and wide where in between yelow cyan magenta are narrow.. but looking on some pictures in the net this looks the same or close (hovever question is if those pictures are not output of bad algorithm and more better wersion looks somewhat different (?) proabbaly no but if not studying deeper theory hard to be sure)


then the translation im saying could be in hsv fir being 'f' on hue 'i' on saturation 'r' on brightnes

[toc] | [prev] | [next] | [standalone]


#142153

Fromfir <profesor.fir@gmail.com>
Date2019-03-20 16:29 -0700
Message-ID<ab9c273a-6652-429c-a209-0b56ae6c3eb5@googlegroups.com>
In reply to#142149
W dniu środa, 20 marca 2019 23:35:22 UTC+1 użytkownik fir napisał:
> W dniu środa, 20 marca 2019 22:56:03 UTC+1 użytkownik fir napisał:
> > links to result picrures
> > 
> > http://minddetonator.htw.pl/hsv1.png
> > 
> > http://minddetonator.htw.pl/hsv2.png
> > 
> > im not sure if those rainbows (i mean mostly this rightsides when full bright and full saturate) are much proper
> > 
> > worry is obviously if i would use this HSV routine do i not lost some colors just becouse it is weak? Or do i really got all the colors i get with pure rgb?
> 
> on this pictures it imo looks weird that red green blue places (ranges) are like flat and wide where in between yelow cyan magenta are narrow.. but looking on some pictures in the net this looks the same or close (hovever question is if those pictures are not output of bad algorithm and more better wersion looks somewhat different (?) proabbaly no but if not studying deeper theory hard to be sure)
> 
> 
> then the translation im saying could be in hsv fir being 'f' on hue 'i' on saturation 'r' on brightnes

if so i took that

unsigned HSVColor(char* txt)
{
  float r,g,b;


  float h = float(txt[0]-'a')/26.0*359.999;
  float s = float(txt[1]-'a')/25.0;
  float v = float(txt[2]-'a')/25.0;


  if(txt[3]>0)  h += (1./26.)*float(txt[3]-'a')/25.*360.0;


     HSVtoRGB( &r,&g,&b,  h,s,v );

  unsigned rr = 255.0*r;
  unsigned gg = 255.0*g;
  unsigned bb = 255.0*b;

   return (rr<<16) + (gg<<8) + (bb);

}

added fourth letter as a fine tuning for
hue.. semms somewhat ok, far better to use than rgb it seems

it is alos interesting as it gives many words for white (like baz faz daz etc)
and many for black like bza fza etc

rage is then like a graphite

http://minddetonator.htw.pl/rage.png

and fury like pea green

http://minddetonator.htw.pl/fury.png

seems not bad maybe i will take it, hard to invent something better at the moment

[toc] | [prev] | [next] | [standalone]


#142136

FromEli the Bearded <*@eli.users.panix.com>
Date2019-03-20 21:48 +0000
Message-ID<eli$1903201738@qaz.wtf>
In reply to#142130
In comp.lang.c, fir  <profesor.fir@gmail.com> wrote:
> which converts "zaa" into red "zza" into yellow and so on
> 
> but it aso dont seem enough good for me:
> humain brain is not so good to guess from
> a string say "fir" that it is some kind of boring darkish blue and so on
> 
> something better would be needed, but what it could be? (exactly)

#define red "zaa"
#define yellow "zza"
#define boring_darkish_blue "fir"

Elijah
------
fir sure, "fir" sounds like a slate blue

[toc] | [prev] | [next] | [standalone]


#142141

Fromfir <profesor.fir@gmail.com>
Date2019-03-20 14:58 -0700
Message-ID<f2667f86-91f5-447b-bb81-30d1631a88be@googlegroups.com>
In reply to#142136
W dniu środa, 20 marca 2019 22:48:21 UTC+1 użytkownik Eli the Bearded napisał:
> In comp.lang.c, fir  <profesor.fir@gmail.com> wrote:
> > which converts "zaa" into red "zza" into yellow and so on
> > 
> > but it aso dont seem enough good for me:
> > humain brain is not so good to guess from
> > a string say "fir" that it is some kind of boring darkish blue and so on
> > 
> > something better would be needed, but what it could be? (exactly)
> 
> #define red "zaa"
> #define yellow "zza"
> #define boring_darkish_blue "fir"
> 

to much defining, you think i not tried it? its to much hard extremally boring work (as i would need to define whole palette probably over 100 carefully chosen colors this cost a hours of very tiremaking work, something like headache
guaranteed)

[toc] | [prev] | [next] | [standalone]


#142150

FromEli the Bearded <*@eli.users.panix.com>
Date2019-03-20 22:37 +0000
Message-ID<eli$1903201836@qaz.wtf>
In reply to#142141
In comp.lang.c, fir  <profesor.fir@gmail.com> wrote:
> W dniu środa, 20 marca 2019 22:48:21 UTC+1 użytkownik Eli the Bearded napisał:
> > #define red "zaa"
> > #define yellow "zza"
> > #define boring_darkish_blue "fir"
> to much defining, you think i not tried it? its to much hard extremally boring
> work (as i would need to define whole palette probably over 100 carefully
> chosen colors this cost a hours of very tiremaking work, something like
> headache guaranteed)

/usr/share/X11/rgb.txt has 782 names on my system. There are a fair
number of duplicate RGB triples for say "gray50" and "grey50", but it's
still 500+ unique, 110 colorless grays (r==g && r==b) and 410 colors
(some difference between r, g, and b). It includes the entirety of the
HTML 1.0 "Web Safe Colors", a 6 bit per channel / 216 total color space.
That seems like it covers your basic color needs and limits you to
#defines only for your extra spot colors.

Elijah
------
wikipedia should have the whole list if you don't have an rgb.txt file

[toc] | [prev] | [next] | [standalone]


#142152

Fromfir <profesor.fir@gmail.com>
Date2019-03-20 15:44 -0700
Message-ID<71f9a2f3-6fad-4ad7-a68f-b904941239a1@googlegroups.com>
In reply to#142150
W dniu środa, 20 marca 2019 23:37:29 UTC+1 użytkownik Eli the Bearded napisał:
> In comp.lang.c, fir  <profesor.fir@gmail.com> wrote:
> > W dniu środa, 20 marca 2019 22:48:21 UTC+1 użytkownik Eli the Bearded napisał:
> > > #define red "zaa"
> > > #define yellow "zza"
> > > #define boring_darkish_blue "fir"
> > to much defining, you think i not tried it? its to much hard extremally boring
> > work (as i would need to define whole palette probably over 100 carefully
> > chosen colors this cost a hours of very tiremaking work, something like
> > headache guaranteed)
> 
> /usr/share/X11/rgb.txt has 782 names on my system. There are a fair
> number of duplicate RGB triples for say "gray50" and "grey50", but it's
> still 500+ unique, 110 colorless grays (r==g && r==b) and 410 colors
> (some difference between r, g, and b). It includes the entirety of the
> HTML 1.0 "Web Safe Colors", a 6 bit per channel / 216 total color space.
> That seems like it covers your basic color needs and limits you to
> #defines only for your extra spot colors.
> 
> Elijah
> ------
> wikipedia should have the whole list if you don't have an rgb.txt file

my system (the one i search for) has much more advantage over those predefines in some cirricumstances

it is becouse if you get one color and want some near, you may move by slight changes to obtain what you can

(an belive me or not, typing all that color names and trying it to make it all
fit together or find a shede that you need is a VERY big pain in head)

[toc] | [prev] | [next] | [standalone]


#142154

Fromfir <profesor.fir@gmail.com>
Date2019-03-20 16:50 -0700
Message-ID<174fc96b-5770-4eeb-92a7-8a514a31e611@googlegroups.com>
In reply to#142136
W dniu środa, 20 marca 2019 22:48:21 UTC+1 użytkownik Eli the Bearded napisał:
> In comp.lang.c, fir  <profesor.fir@gmail.com> wrote:
> > which converts "zaa" into red "zza" into yellow and so on
> > 
> > but it aso dont seem enough good for me:
> > humain brain is not so good to guess from
> > a string say "fir" that it is some kind of boring darkish blue and so on
> > 
> > something better would be needed, but what it could be? (exactly)
> 
> #define red "zaa"
> #define yellow "zza"
> #define boring_darkish_blue "fir"
> 
> Elijah
> ------
> fir sure, "fir" sounds like a slate blue

if you mean that fir means some kind of tree in english i can say in polish word "fir" means totally nothing, though 'looks' sorta interesting (it might riminiscent slightly feathers or something feather-furry or my riminiscent some counds of birds "ćwir, ćwir")
and im rather fir in polish (primarely)

in this sheme i talked this colr look 
like

http://minddetonator.htw.pl/fire.png

e is not mportant as it is some slight adjustment to hue only

[toc] | [prev] | [next] | [standalone]


#142157

FromEli the Bearded <*@eli.users.panix.com>
Date2019-03-21 00:17 +0000
Message-ID<eli$1903202017@qaz.wtf>
In reply to#142154
In comp.lang.c, fir <profesor.fir@gmail.com> wrote:
> Eli the Bearded napisał:
>> #define boring_darkish_blue "fir"
>> fir sure, "fir" sounds like a slate blue
> if you mean that fir means some kind of tree in english i can say in polish

Nope. You described the color you got for "fir" as "boring darkish blue"
and my comment is about boring darkish blue sounds like a shade of slate
blue.

Elijah
------
/usr/share/X11/rgb.txt: 72  61 139              dark slate blue

[toc] | [prev] | [next] | [standalone]


#142159

Fromfir <profesor.fir@gmail.com>
Date2019-03-20 17:42 -0700
Message-ID<ef83ba8b-480a-427f-acf5-8593de00aa8a@googlegroups.com>
In reply to#142157
W dniu czwartek, 21 marca 2019 01:17:34 UTC+1 użytkownik Eli the Bearded napisał:
> In comp.lang.c, fir <profesor.fir@gmail.com> wrote:
> > Eli the Bearded napisał:
> >> #define boring_darkish_blue "fir"
> >> fir sure, "fir" sounds like a slate blue
> > if you mean that fir means some kind of tree in english i can say in polish
> 
> Nope. You described the color you got for "fir" as "boring darkish blue"
> and my comment is about boring darkish blue sounds like a shade of slate
> blue.
> 
> Elijah
> ------
> /usr/share/X11/rgb.txt: 72  61 139              dark slate blue

well maybe, i dont know word slate to be honest
 in that old sheme it was just

('f'-'a')/25*255, 
('i'-'a')/25*255, 
('r'-'a')/25*255, 

new sheme is better

[toc] | [prev] | [next] | [standalone]


#142161 — Re: [OT] turning words into colors

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2019-03-21 01:38 +0000
SubjectRe: [OT] turning words into colors
Message-ID<87zhppxaze.fsf_-_@bsb.me.uk>
In reply to#142136
Eli the Bearded <*@eli.users.panix.com> writes:

> In comp.lang.c, fir  <profesor.fir@gmail.com> wrote:
>> which converts "zaa" into red "zza" into yellow and so on
>> 
>> but it aso dont seem enough good for me:
>> humain brain is not so good to guess from
>> a string say "fir" that it is some kind of boring darkish blue and so on
>> 
>> something better would be needed, but what it could be? (exactly)
>
> #define red "zaa"
> #define yellow "zza"
> #define boring_darkish_blue "fir"

Just for fun, if you have three initials or a three-letter name you can
find your colour here:

  http://bsb.me.uk/testing/colour.php

I quite like mine:

  http://bsb.me.uk/testing/colour.php?name=ben

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#142162 — Re: [OT] turning words into colors

Fromfir <profesor.fir@gmail.com>
Date2019-03-20 19:06 -0700
SubjectRe: [OT] turning words into colors
Message-ID<807098db-1cfd-437e-b7bb-a08858151134@googlegroups.com>
In reply to#142161
W dniu czwartek, 21 marca 2019 02:38:53 UTC+1 użytkownik Ben Bacarisse napisał:
> Eli the Bearded <*@eli.users.panix.com> writes:
> 
> > In comp.lang.c, fir  <profesor.fir@gmail.com> wrote:
> >> which converts "zaa" into red "zza" into yellow and so on
> >> 
> >> but it aso dont seem enough good for me:
> >> humain brain is not so good to guess from
> >> a string say "fir" that it is some kind of boring darkish blue and so on
> >> 
> >> something better would be needed, but what it could be? (exactly)
> >
> > #define red "zaa"
> > #define yellow "zza"
> > #define boring_darkish_blue "fir"
> 
> Just for fun, if you have three initials or a three-letter name you can
> find your colour here:
> 
>   http://bsb.me.uk/testing/colour.php
> 
> I quite like mine:
> 
>   http://bsb.me.uk/testing/colour.php?name=ben
> 

but this mapping is very haotic and it is non usable (slightly better than rgb itself but not much)
where this hsv seems better

for example easy to remember words starting on 
a are red on 
b are red-orange on
c are yellow-orange
d is yellow
e is yellow green
f is green (lime)
g is green 
h i j also (?)
k is what i cal medical green
l is what i dont even gnow name cyan green?
m cyan-azure?
n light blue
o blue
p solid blue
q same 
r same
s blue with slight violet
t some kind of violet
u kinda dark pink
y dark pink yet pinker
w dark pig colour
x kinada pink red
y warm red
z same (and same as a or almost)

those seem to be femilies i meant azz bzz czz dzz.. when next two letters are families

think i may manage to learn it by heart in some extent, and type it from head when needed (maybe)

[toc] | [prev] | [next] | [standalone]


#142163 — Re: [OT] turning words into colors

Fromfir <profesor.fir@gmail.com>
Date2019-03-20 19:39 -0700
SubjectRe: [OT] turning words into colors
Message-ID<037c7a59-818c-4881-9b47-548bc3fca5ba@googlegroups.com>
In reply to#142162
W dniu czwartek, 21 marca 2019 03:07:16 UTC+1 użytkownik fir napisał:
> W dniu czwartek, 21 marca 2019 02:38:53 UTC+1 użytkownik Ben Bacarisse napisał:
> > Eli the Bearded <*@eli.users.panix.com> writes:
> > 
> > > In comp.lang.c, fir  <profesor.fir@gmail.com> wrote:
> > >> which converts "zaa" into red "zza" into yellow and so on
> > >> 
> > >> but it aso dont seem enough good for me:
> > >> humain brain is not so good to guess from
> > >> a string say "fir" that it is some kind of boring darkish blue and so on
> > >> 
> > >> something better would be needed, but what it could be? (exactly)
> > >
> > > #define red "zaa"
> > > #define yellow "zza"
> > > #define boring_darkish_blue "fir"
> > 
> > Just for fun, if you have three initials or a three-letter name you can
> > find your colour here:
> > 
> >   http://bsb.me.uk/testing/colour.php
> > 
> > I quite like mine:
> > 
> >   http://bsb.me.uk/testing/colour.php?name=ben
> > 
> 
> but this mapping is very haotic and it is non usable (slightly better than rgb itself but not much)
> where this hsv seems better
> 
> for example easy to remember words starting on 
> a are red on 
> b are red-orange on
> c are yellow-orange
> d is yellow
> e is yellow green
> f is green (lime)
> g is green 
> h i j also (?)
> k is what i cal medical green
> l is what i dont even gnow name cyan green?
> m cyan-azure?
> n light blue
> o blue
> p solid blue
> q same 
> r same
> s blue with slight violet
> t some kind of violet
> u kinda dark pink
> y dark pink yet pinker
> w dark pig colour
> x kinada pink red
> y warm red
> z same (and same as a or almost)
> 
> those seem to be femilies i meant azz bzz czz dzz.. when next two letters are families
> 
> think i may manage to learn it by heart in some extent, and type it from head when needed (maybe)

yet those next two letters mean like second is how desaturate color is i could say is 'half' (average) and the third how dark it is (m also being half, a means black, z meand full brightness)

this way maybe the order of h.s,v is not proper as s (after h) sont mean any color 
yet as it is just a level of desaturation of h and v

so kinda order is

h - hue
v - how dark
s - how desaturate

in hsv order it has less sense, but maybe i will left it as it is, though 'rading' order is imo hvs not hsv

for example aiz means a-red, z-full bright, less than half saturation
(which make pale boring bright pink)

its a bit confusing that desaturation somewhat brighten as azz full saturated full bright red is just red when it when fully desaturated (aaz) is just white (white seems brighter than red, hovever when looking closer this in fact may be  illusion, such white is such as bright as red only the colour is different)

[toc] | [prev] | [next] | [standalone]


#142182 — Re: [OT] turning words into colors

Fromfir <profesor.fir@gmail.com>
Date2019-03-21 08:30 -0700
SubjectRe: [OT] turning words into colors
Message-ID<d5936eda-3df7-4454-adeb-91af31631f81@googlegroups.com>
In reply to#142163
W dniu czwartek, 21 marca 2019 03:39:37 UTC+1 użytkownik fir napisał:
> W dniu czwartek, 21 marca 2019 03:07:16 UTC+1 użytkownik fir napisał:
> > W dniu czwartek, 21 marca 2019 02:38:53 UTC+1 użytkownik Ben Bacarisse napisał:
> > > Eli the Bearded <*@eli.users.panix.com> writes:
> > > 
> > > > In comp.lang.c, fir  <profesor.fir@gmail.com> wrote:
> > > >> which converts "zaa" into red "zza" into yellow and so on
> > > >> 
> > > >> but it aso dont seem enough good for me:
> > > >> humain brain is not so good to guess from
> > > >> a string say "fir" that it is some kind of boring darkish blue and so on
> > > >> 
> > > >> something better would be needed, but what it could be? (exactly)
> > > >
> > > > #define red "zaa"
> > > > #define yellow "zza"
> > > > #define boring_darkish_blue "fir"
> > > 
> > > Just for fun, if you have three initials or a three-letter name you can
> > > find your colour here:
> > > 
> > >   http://bsb.me.uk/testing/colour.php
> > > 
> > > I quite like mine:
> > > 
> > >   http://bsb.me.uk/testing/colour.php?name=ben
> > > 
> > 
> > but this mapping is very haotic and it is non usable (slightly better than rgb itself but not much)
> > where this hsv seems better
> > 
> > for example easy to remember words starting on 
> > a are red on 
> > b are red-orange on
> > c are yellow-orange
> > d is yellow
> > e is yellow green
> > f is green (lime)
> > g is green 
> > h i j also (?)
> > k is what i cal medical green
> > l is what i dont even gnow name cyan green?
> > m cyan-azure?
> > n light blue
> > o blue
> > p solid blue
> > q same 
> > r same
> > s blue with slight violet
> > t some kind of violet
> > u kinda dark pink
> > y dark pink yet pinker
> > w dark pig colour
> > x kinada pink red
> > y warm red
> > z same (and same as a or almost)
> > 
> > those seem to be femilies i meant azz bzz czz dzz.. when next two letters are families
> > 
> > think i may manage to learn it by heart in some extent, and type it from head when needed (maybe)
> 
> yet those next two letters mean like second is how desaturate color is i could say is 'half' (average) and the third how dark it is (m also being half, a means black, z meand full brightness)
> 
> this way maybe the order of h.s,v is not proper as s (after h) sont mean any color 
> yet as it is just a level of desaturation of h and v
> 
> so kinda order is
> 
> h - hue
> v - how dark
> s - how desaturate
> 
> in hsv order it has less sense, but maybe i will left it as it is, though 'rading' order is imo hvs not hsv
> 
> for example aiz means a-red, z-full bright, less than half saturation
> (which make pale boring bright pink)
> 
> its a bit confusing that desaturation somewhat brighten as azz full saturated full bright red is just red when it when fully desaturated (aaz) is just white (white seems brighter than red, hovever when looking closer this in fact may be  illusion, such white is such as bright as red only the colour is different)

those are hard decisions btw

i alos think on some change here
turning "hsv" string into "hpv"
i mean exchanging saturation for "paleness", (desaturation)

it is then like more readable and
easier to remember for me

in that schema

?za are pale blacks 
?yb are pale color blacks
?yn are pale color grays
?yz are pale color whites
?ac should be color intense darks
?az intense colors 

and so on.. not so easy topic

[toc] | [prev] | [next] | [standalone]


#142167 — Re: [OT] turning words into colors

Fromfir <profesor.fir@gmail.com>
Date2019-03-21 03:44 -0700
SubjectRe: [OT] turning words into colors
Message-ID<027fd1cd-5766-4501-a947-a9600de2f686@googlegroups.com>
In reply to#142161
W dniu czwartek, 21 marca 2019 02:38:53 UTC+1 użytkownik Ben Bacarisse napisał:
> Eli the Bearded <*@eli.users.panix.com> writes:
> 
> > In comp.lang.c, fir  <profesor.fir@gmail.com> wrote:
> >> which converts "zaa" into red "zza" into yellow and so on
> >> 
> >> but it aso dont seem enough good for me:
> >> humain brain is not so good to guess from
> >> a string say "fir" that it is some kind of boring darkish blue and so on
> >> 
> >> something better would be needed, but what it could be? (exactly)
> >
> > #define red "zaa"
> > #define yellow "zza"
> > #define boring_darkish_blue "fir"
> 
> Just for fun, if you have three initials or a three-letter name you can
> find your colour here:
> 
>   http://bsb.me.uk/testing/colour.php
> 
> I quite like mine:
> 
>   http://bsb.me.uk/testing/colour.php?name=ben
> 
ps. you wrote it yourself in php+js?
could you maybe show some source of it
(if no, no problem.. i wanted to learn php a bit but cant find time)

you could implement this scheme hsv function (if js has no built-in maybe better one) and this 4-letter translation i wrote..

this is better encoding and may be really useful..dealing with rgb is to much trash

i would really even want if hardware would suport hsv on hardvare level

Besides i got yet one theoretical problem:

imagine some painting program (some like paint) i would store image in HSV format i think to implement easy retouching, i mean:

if you hold say 'a' and move mouse oer some place you (make it darker, like 1% on each move), if you hold 's' make it brighter, if you hold'd' make it desaturated, 'f' make it more intense

alright

but what if i would like modify a hue, if hue is showed as a rainbow (or this 360 deg circle) it mean i only could sift color left or right 
when in reality i think i can shift any place in more diections than just left-right on the rainbow...


how to do that? (how to make shiftng of hue in more usable way (for panter)?

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.c


csiph-web