News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_mr_lou

When number of colors are limited

Started by mr_lou, 09:27, 14 October 12

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

mr_lou

I was wondering, if you hear that a certain device can only show 256 colors, what are you thinking?

1) The device can show any 256 colors you define? For example, 256 shades of blue.
2) The device has a colortable with predefined colors you can choose from, usually created by dividing each RGB channel with a factor. E.g. having 6 blues, 6 greens and 6 reds gives you the 216-colors defined as the WebSafe colors.

If you picked number 2 then you also think:
2a) These 216 colors are always used on devices that can only show 256 colors, because that's just how it works when limited colors.
2b) These 216 colors are probably used on devices that can only show 256 colors.

Do you need music for your Amstrad CPC game project?
Take a look at IndieGameMusic.com - that's where I put my tracks.

Gryzor

It has a palette of 256 predetermined colours, of which the user can use a predetermined account at any time. Or all, if a mode allows it.

But what's the point of the question?

mr_lou

I think that a lot of people thinks they can use any color they want. Ironically that means that even though they use only 16 colors, they would have gotten a more accurate result using 32.
Do you need music for your Amstrad CPC game project?
Take a look at IndieGameMusic.com - that's where I put my tracks.

TotO

#3
Quote from: mr_lou on 09:27, 14 October 12I was wondering, if you hear that a certain device can only show 256 colors, what are you thinking?
The screen mode allow to display 8bit pixels (1x256 or 16x16 colours) from a 9, 12, 15, 18 or 24 bit palette.

If the device get a LCD display, each R G B component get the same levels. So, it's not possible to be limited to 256 colours.
The 216 colours palette (6x6x6) simulate a true color mode using a fixed palette (and probably dithering) on a 8bit screen mode.

Most existing LCD screens can display 262144 colours (worst can display 4096...).
If your screen mode can display 24bit, you lose shades on display.
But if your screen mode is lower, you can't reach them so all look perfect.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

mr_lou

The Amiga had max 6-bit colors, meaning it could display 64 colors on the screen at the same time.

But could these 64 colors be any color you wanted? Could it be #000001, #000002, #000003, etc?
Or was the Amiga limited in a similar way as the CPC is? (The CPC can display 16 colors on the screen at the same time, but we can't choose any 16 colors we want).
Do you need music for your Amstrad CPC game project?
Take a look at IndieGameMusic.com - that's where I put my tracks.

mr_lou

If I code a gradient for J2ME, then it's very clear that some phones display this gradient very good, while other phones do not.
And I'm not talking about insanely old phones here.

So it's obvious that these phones are limited regarding how many colors they can show. I'm curious to find out how they are limited. How do I find out which colors I can use?

This is where I first assumed that I'd probably be safe if I just used the websafe color-table. But now I just learned that there's actually something called 8-bit color, which uses 3 bits for the red channel, 3 bits for the green channel, but only 2 bits for the blue channel.
http://en.wikipedia.org/wiki/8-bit_color
Maybe that's what's being used in limited devices?
Do you need music for your Amstrad CPC game project?
Take a look at IndieGameMusic.com - that's where I put my tracks.

robcfg

I'm afraid that can vary greatly with each device.


The limitations arise from how the color is coded to how much colors the screen can really show.


For example, there are  Android devices that still have 24-bit color, but 16-bit color screens....

steve

Quote from: mr_lou on 11:30, 14 October 12
The Amiga had max 6-bit colors, meaning it could display 64 colors on the screen at the same time.

But could these 64 colors be any color you wanted? Could it be #000001, #000002, #000003, etc?
Or was the Amiga limited in a similar way as the CPC is? (The CPC can display 16 colors on the screen at the same time, but we can't choose any 16 colors we want).

The earlier Amigas had a 4096 colour pallette from which you could choose a smaller number of colours depending on the video mode, the CPC has a 27 colour pallette, while the Amstrad plus models have a 4096 colour pallette.

mr_lou

Is there no standard term to use when

1) talking about the amount of colors you can choose from
2) talking about the chosen colors that can displayed on the screen at the same time

E.g. the 27 colors of the CPC = "the CPC color table" while the 16 colors I pick from the 27 colors is called "my palette".

Or what?
Do you need music for your Amstrad CPC game project?
Take a look at IndieGameMusic.com - that's where I put my tracks.

TotO

#9
Quote from: mr_lou on 11:30, 14 October 12
The Amiga had max 6-bit colors, meaning it could display 64 colors on the screen at the same time.

But could these 64 colors be any color you wanted? Could it be #000001, #000002, #000003, etc?
Or was the Amiga limited in a similar way as the CPC is? (The CPC can display 16 colors on the screen at the same time, but we can't choose any 16 colors we want).
On CPC Mode 0, you can chose 16 colours from 27 available, because 4bit can index 16 colors.
On Amiga OCS, you can chose 32 colours (5bit index, not 6) from 4096 available.

But, if the program (CPC rasters) or the hardware (Amiga Copper) allow to change the index content while the screen is displayed, then you can fake the user eyes by showing more colours that expected.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

mr_lou

Ok, here's my problem.

I have coded a gradient with J2ME. It displays nicely on a Sony Ericsson Vivaz because J2ME is given 16777216 colors on that device. But Sony Ericsson Aino is only given 65536 colors.

So now I'd like to know how to calculate the colortable used by the Aino.

Looking at the term "8-bit color", this table is calculated by using 3 bits to red, 3 bits to green and 2 bits to blue.

So I thought maybe "16-bit color" was calculated using 6 bits to red, 6 bits to green and 4 bits to blue. But according to this it's more like 5 bits to red, 6 bits to green and 5 bits to blue.

What I'm after, is some kind of colortable, similar to the websafe colors, that are "safe" to use on 16-bit displays such as a Sony Ericsson Aino. And also for devices that can only show 4096 colors. How do I know which 4096 colors that is? (Is it 4 bits for each channel? Or is it 5*5*2? Does it vary that much, or is there some kind of standard?).

How "safe" am I if I with with using 4 bits for each channel all the time?
Do you need music for your Amstrad CPC game project?
Take a look at IndieGameMusic.com - that's where I put my tracks.

TotO

#11


Quote from: mr_lou on 12:59, 14 October 12And also for devices that can only show 4096 colors. How do I know which 4096 colors that is? (Is it 4 bits for each channel? Or is it 5*5*2? Does it vary that much, or is there some kind of standard?). How "safe" am I if I with with using 4 bits for each channel all the time?

It's what I said before... If your LCD is limited, you lose shades. In all cases, the values are 2^n compatible.
To be safe, you have better to use a 12bit color-space (4R4G4B) for your programs, to look the same on all your devices.

That mean 16 shades for each component:
00, 11, 22, 33, 44, 55, 66, 77, 88, 99, AA, BB, CC, DD, EE, FF

If you need to convert GFx (photoshop, paint shop pro, ...), use the Posterize function with the value 16.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

mr_lou

Quote from: TotO on 13:15, 14 October 12
To be safe, you have better to use a 12bit color-space (4R4G4B) for your programs, to look the same on all your  devices.

That mean 16 shades for each components:
00, 11, 22, 33, 44, 55, 66, 77, 88, 99, AA, BB, CC, DD, EE, FF

That's about as far as I've gotten too. Glad to hear someone confirm it.

Posterize, nice. Didn't know I could do that. So far I just tried changing Mode to Indexed colors, and selecting the Web-safe palette. That didn't produce a great result. Posterize works much better. (Using GiMP).
Do you need music for your Amstrad CPC game project?
Take a look at IndieGameMusic.com - that's where I put my tracks.

TotO

#13
Quote from: mr_lou on 13:47, 14 October 12Posterize, nice. Didn't know I could do that. So far I just tried changing Mode to Indexed colors, and selecting the Web-safe palette. That didn't produce a great result. Posterize works much better. (Using GiMP).
Yes, it's the number of shades for recomputing the RGB colour space. ;)
Some values for computers and videogames systems (colours) :

3 = CPC (27)
4 = PC EGA / Master System (64)
8 = ST / Megadrive / PCE (512)
16 = Amiga / CPC+ / STe / Game Gear (4096)
32 = Neo Geo / SNES / GBA (32768)
64 = Falcon / DS (262144)
256 = Amiga AGA / Modern computers and consoles (16777216)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

MaV

Quote from: mr_lou on 12:43, 14 October 12
E.g. the 27 colors of the CPC = "the CPC color table" while the 16 colors I pick from the 27 colors is called "my palette".

Or what?
In CPC terms, the 16 colours you have are called INKs. Each INK can be set to one of the 27 colours of the CPC palette. The term INK is derived from the BASIC command INK and the parameter is called so as well. Likewise PEN and PAPER have this parameter "ink" to denote the same.

That would be the term at least, if people used it.
Black Mesa Transit Announcement System:
"Work safe, work smart. Your future depends on it."

mr_lou

Quote from: MaV on 19:44, 14 October 12That would be the term at least, if people used it.

People don't use that term. And I'm not just thinking CPC here.

People often use the word "palette", and whenever I hear that word I can't help but to think "Oh? But from which color-table?"
A palette is a bunch of colors manually selected by the graphics artist.

But picking any random 16 colors from the 16.7 million choices is not optimal if you don't want the colors to automatically change when displayed on a retro platform (or cellphone).

So I use "color-table" as a term to describe the colors available, and "palette" to describe the colors chosen.
Do you need music for your Amstrad CPC game project?
Take a look at IndieGameMusic.com - that's where I put my tracks.

MaV

Quote from: mr_lou on 19:55, 14 October 12
People don't use that term. And I'm not just thinking CPC here.
Well, that's what I said. INK is not used, although it would fit for the CPC. It would not be understood by others.

Palette and colour-table are perfectly fine.
Black Mesa Transit Announcement System:
"Work safe, work smart. Your future depends on it."

MacDeath

On those limited systems (8bit) having a whole true colour range where you can only display 16 colours is somewhat stupid.


The "Amiga500/Atari STE/Amstrad PLUS" plaette is clearly the maximum you can decently need.


Hell even a "true EGA" palette (4x4x4 = 64 colours) is quite enough actually if theorically limited to 16 inks.
And the Atari ST/SegaMegaDrive palette (512colours) is also quite enough.


Of course those old 2D bitmap displays designed for CRT monitors had a lot of tricks to cheat the number of displayed colours on the screen.


You could flicker, which is sadly not as good as it should and often cause severe epileptic crisis...
Or more simply, Raster and split rasters, even attributes is a nice way to add colours with a notorious RAM gain for Datas.
Many systems had some "software video modes", consisting of various tricks according to what the hardware could allow through experience and tweaks.




As already told, it is important to differenciate colours and inks.


While normal CPC is limited to 16 inks max, it is easily possible to display the whole 27 colours the system can produce, even additional ones through flickerings.
Of course it implies somewhat severe limitations, be it "attributes like" (scanline) or CPU time based (to interrupt, putting rasters or various effects must be processed and programmed, hence it use both RAM and CPU cycles, both being quite limited..

mr_lou

Quote from: MacDeath on 22:21, 14 October 12On those limited systems (8bit) having a whole true colour range where you can only display 16 colours is somewhat stupid.
The "Amiga500/Atari STE/Amstrad PLUS" plaette is clearly the maximum you can decently need.

I agree. I even think the posterize-6 / WebSafe color-table is enough in many cases.

I sometimes take a look at Pixel Art at pixeljoint.com - Forum Avatars, Buddy Icons, Sprites
I thought pixel artists would stick to certain limited color-tables as part of the pixel-retroness, but it doesn't seem so. I asked at their forum, and it seems that while they do enjoy seeing how few colors they can use (e.g. only 16), they still pick these few colors from the huge 16.7 million color-table.
That means that their art will look differently when displayed on certain limited devices.

It surprised me a bit that pixel artists doesn't seem to pay any attention to this. I expected it would be part of the pixel-graphics scope somehow.

Also, I'd love to see a site like IndieGameMusic.com except for graphics at IndieGameGraphics.com some day. Some graphics-artist should do it.
But it would require artists to agree on certain color-tables and palettes and putting their art into certain boxes to make it easier for game-developers to search.
E.g. "Posterize-6 compatible" means all colors used stays within the websafe space.
Or "C64 color-table" tells you all colors used are from the C64 color-table.

Then game-developers should be able to search by how many colors are used in the palette + from which color-table.

E.g. "4 colors used" from "CPC color-table" = MODE 1 compatible, and
"22 colors used" from "WebSafe color-table" = definitely shows correctly on older phones

(Then comes of course a bunch of other search criterias such as tilesize and a bunch of other stuff only a graphics-artist would know).

I made IndieGameMusic.com because I could. Being a webdeveloper + musician, it was kinda in the cards. I just can't seem to find any webdeveloper + graphics-artist anywhere who feels like doing a similar IndieGameGraphics.com
Do you need music for your Amstrad CPC game project?
Take a look at IndieGameMusic.com - that's where I put my tracks.

TotO

#19
Quote from: mr_lou on 07:09, 15 October 12It surprised me a bit that pixel artists doesn't seem to pay any attention to this. I expected it would be part of the pixel-graphics scope somehow.
Sure, but only "old" pixel artists know that and take care about. (more easy to work too)
The 24-bit palette is only usefull if you need gradiants for sky, light effects, etc.
Else, the 12-bit palette is more than enough to get all sort of colours and match with 99% of the LCD device display.
The 9-bit and less palettes lack too much shades to be realistic. (like "skin", "champagne", ...)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

MacDeath

Many moderner pixel artists don't know about the time when computers where in 2D and limitedto bitmap world.


To them, pixel art is a style, not somehing mandatory due to machine logic limitation.
Also due to the modern machines being entirely 3D and having very diverse range of display resolution, you now have to stick to somewhat zoomable "vector pictures" even for portable devices like telephones and Androids tablets all have resolution according to screen they have.


So you can't even do real pixel art unless you autozoom, which add many colours and automatic antialiasings.




TotO

Sure, they know the style, not the limitations...
That was a shame, because they can use the good colours and pixels ratio, to look better too. ;)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Sykobee (Briggsy)

Quote from: mr_lou on 09:27, 14 October 12
I was wondering, if you hear that a certain device can only show 256 colors, what are you thinking?


Commonly, that the device has a 256 entry palette (CLUT) to define which colour to show from a larger palette (12/15/16/18/24-bit) for a given pixel value.


Less commonly, a direct RGB value, I know that R3G3B2 was used by a couple of systems in the past. This bypasses the need for a large CLUT, which could use a lot of die space. Not so many greys available though.


Even less commonly, a set of colours modified from a base palette. The Acorn Archimedes had a 16 entry CLUT, but modified that palette to generate another 15 palettes to get 256 colours.

Sykobee (Briggsy)

Quote from: mr_lou on 11:30, 14 October 12
The Amiga had max 6-bit colors, meaning it could display 64 colors on the screen at the same time.

But could these 64 colors be any color you wanted? Could it be #000001, #000002, #000003, etc?
Or was the Amiga limited in a similar way as the CPC is? (The CPC can display 16 colors on the screen at the same time, but we can't choose any 16 colors we want).


The Amiga (OCS) had a 32-entry CLUT (using a 12-bit palette), and the 6th bitplane, when enabled, would halve the brightness of any given pixel (EHB - Extra-Half-Bright).


As you can imagine, this was very often used for very quick and easy shadows in games - but not many games actually used the EHB mode.


Later Amigas (AGA) had a full 256-entry CLUT and a 24-bit palette.

mr_lou

Quote from: Briggsy on 15:58, 15 October 12Commonly, that the device has a 256 entry palette (CLUT) to define which colour to show from a larger palette (12/15/16/18/24-bit) for a given pixel value.

mkay, CLUT = Color Lookup Table.

Then it's correct call "the colors chosen" for the palette and "the colors you can choose from" for the color-table?

From http://en.wikipedia.org/wiki/Colour_look-up_table
QuoteA CLUT is characterized by the number of entries in the palette: determines the maximum number of colours which can appear on screen simultaneously (a subset of the wider full palette, which is to be understood as the total number of colours that a given system is able to generate or manage, e.g. the full RGB colour palette).

There it says that the CLUT (color-table) is actually the maximum number of colors which can appear on the screen simultaneously. That fits fine with how I see it.

Then I'd say that the color-table on the CPC consists of the 27 colors. And the palette is whatever 4 or 16 colors we choose to use. The socalled "full palette" is not really interesting in this relation, as far as I can see.
Do you need music for your Amstrad CPC game project?
Take a look at IndieGameMusic.com - that's where I put my tracks.

Powered by SMFPacks Menu Editor Mod