Recent

Author Topic: LazPaint Change range of a colour in bmp  (Read 4409 times)

Zath

  • Sr. Member
  • ****
  • Posts: 391
LazPaint Change range of a colour in bmp
« on: October 23, 2016, 12:30:39 pm »
Change range of a colour

Hello.
Is it possible to alter a bmp image where a section is a colour and shades of this colour into another colour but keeping the equivalent shading and not affect the rest of the image ?
A game I'm working on uses multiple bmp images in a library to represent animals, people, items, scenery etc. and a simple way to add new content is to recolour old images.
A library can be one image or many so a macro feature would be helpful too.
I've tried in Fireworks but it's not really geared up for the task.

Thanks.
« Last Edit: October 23, 2016, 12:37:15 pm by Zath »

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: LazPaint Change range of a colour in bmp
« Reply #1 on: October 23, 2016, 05:29:07 pm »
I suppose you would like to change the hue. You can do that with the menu Colors > Shift colors or Colors > Colorise.
Conscience is the debugger of the mind

Zath

  • Sr. Member
  • ****
  • Posts: 391
Re: LazPaint Change range of a colour in bmp
« Reply #2 on: October 24, 2016, 12:31:54 am »
I suppose you would like to change the hue. You can do that with the menu Colors > Shift colors or Colors > Colorise.
Yes that works but it changes the whole image.
If the images include a human face, I don't want that to change to green or something if I change the colour of its clothing.

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: LazPaint Change range of a colour in bmp
« Reply #3 on: October 24, 2016, 12:53:47 am »
Then you need to select the clothing. You can draw a selection shape or use the magic wand. Then when you do Shift colors or Colorize it will be applied only to the selection.
Conscience is the debugger of the mind

Zath

  • Sr. Member
  • ****
  • Posts: 391
Re: LazPaint Change range of a colour in bmp
« Reply #4 on: October 24, 2016, 06:09:43 pm »
The image library could contain several hundred images and the character will move direction and action etc.
So there's no way to shift a hex code of colours eg.

 000000 - 0000FF becomes 005500 0055FF ?

No idea what the colours are here !

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: LazPaint Change range of a colour in bmp
« Reply #5 on: October 24, 2016, 11:02:46 pm »
I see, you would like to change certain colors only. There isn't a straightforward way of doing it using LazPaint. You can do it programmatically though. In all cases you would need to first determine the area in the colorspace that you would like to affect. Is it colors that are close to one reference color (like what is done for green backgrounds) or is it everything with a certain hue...?
Conscience is the debugger of the mind

Zath

  • Sr. Member
  • ****
  • Posts: 391
Re: LazPaint Change range of a colour in bmp
« Reply #6 on: October 25, 2016, 04:13:28 pm »
Ignore the speed and movement of the anim.
It's composed of 5 individual frames for this example but will have many more in live play.

This is an "NPC" character that a player interacts with.
I might want to change the peach colour to a another and maintain the remaining colours and shading etc.
There's not a lot of colour change with this example but greens and reds can have quite a wider range of shades.


circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: LazPaint Change range of a colour in bmp
« Reply #7 on: October 25, 2016, 10:40:58 pm »
I had a look. The same color range is used for the skin and for the clothing. So there is no way of distinguishing them based on that.
Conscience is the debugger of the mind

Zath

  • Sr. Member
  • ****
  • Posts: 391
Re: LazPaint Change range of a colour in bmp
« Reply #8 on: October 26, 2016, 12:40:56 am »
Ok.
Thanks for replying.

 

TinyPortal © 2005-2018