Jump to content


Photo

Color > Tint-Splitter v1.0


9 replies to this topic

#1 Xhin

Xhin
  • Members
  • 83 posts
  • Reputation:6

Posted 10 September 2012 - 08:41 AM

I make a lot of abstract art. A problem I sometimes run into is the colors being god-awful. There's a couple tricks I've learned to fix that, for example making the piece black and white and applying http://forums.getpai...gation-now-v11/ or a color zoom blur to it. That can mess up the textures though, so isn't always useful.

If you have that problem, this plugin will permanently fix it.

Overview

What this plugin essentially does is it tints the image two different colors that you determine.

It does this by taking one RGB channel and shifting it to another, for example shifting green to red. This leaves a blue channel which depending on its value and the "gray" value will turn a piece a contrast of blue and yellow. You can then shift the blue to whatever color you want and the yellow to whatever color you want.

Let's look at the menu:

menu.png

Shift: Which channels become equal, and what they become equal to. So for example, R --> B makes the Red channel equal to the Blue channel, with the Green channel determining the Split. In non-technical terms, you should probably play around with this if you don't like the split you're getting. R --> G seems to be the most stable.

Dominant Hue:
Secondary Hue:: These determine the two hues that the image is split into.

Here are some examples, since none of my plugins make sense without them:

seed.png
Seed Image

default.png
Default settings (R-->G, no hue changes)

d-red.png
Changed the dominant hue to a reddish color

s-blue.png
Same as above, but changed the secondary color to a bluish color.

greentored.png
Changed the Shift to G-->R. Notice the slightly different pattern.

Download (V1.0)
Attached File  Tint-Splitter.zip   4.9KB   538 downloads
  • 0

Posted Image


#2 AhmedElyamani

AhmedElyamani
  • Members
  • 205 posts
  • LocationEgypt
  • Reputation:8

Posted 10 September 2012 - 02:45 PM

it's very useful , i liked it a lot !
it'd be much more awesome if you add an ' Effect mix slider ' , it'll help me to use it to clarify some images :D
thanks for your effort.
Ahmed.
  • 0

#3 Xhin

Xhin
  • Members
  • 83 posts
  • Reputation:6

Posted 10 September 2012 - 04:02 PM

Yeah, there's an idea. Until I do that, you could do:

1. Duplicate layer
2. Apply Tint-Splitter
3. Adjust transparency of top layer
  • 2

Posted Image


#4 AhmedElyamani

AhmedElyamani
  • Members
  • 205 posts
  • LocationEgypt
  • Reputation:8

Posted 10 September 2012 - 04:32 PM

Yeah, there's an idea. Until I do that, you could do: 1. Duplicate layer 2. Apply Tint-Splitter 3. Adjust transparency of top layer

i know and you can do that directly in code lap btw
  • 0

#5 Xhin

Xhin
  • Members
  • 83 posts
  • Reputation:6

Posted 10 September 2012 - 08:29 PM

Yeah, if I can get my color-averaging script to work...
  • 0

Posted Image


#6 AhmedElyamani

AhmedElyamani
  • Members
  • 205 posts
  • LocationEgypt
  • Reputation:8

Posted 11 September 2012 - 03:59 PM

Yeah, if I can get my color-averaging script to work...


CurrentPixel.R=(oldPixel.R+CurrentPixel.R)/2
CurrentPixel.G=(oldPixel.G+CurrentPixel.G)/2
CurrentPixel.B=(oldPixel.B+CurrentPixel.<img src='http://forums.getpaint.net/public/style_emoticons/<#EMO_DIR#>/boltbait.cool.png' class='bbc_emoticon' alt='B)' />/2

?
edit that to fit your needs.
  • 0

#7 Xhin

Xhin
  • Members
  • 83 posts
  • Reputation:6

Posted 12 September 2012 - 09:51 PM

Yeah, but that only averages two colors together. I want to do it on a gradient, so you can go, say, 15% between #ffc00 and #195682.
  • 0

Posted Image


#8 Ego Eram Reputo

Ego Eram Reputo

    2013 Proton Award Winner

  • Moderators
  • 7,639 posts
  • LocationNorth Canterbury, New Zealand
  • Reputation:578

Posted 12 September 2012 - 10:16 PM

Off the top of my head:

New.R = Start.R - (Start.R - End.R) x 0.15
New.G = Start.G - (Start.G - End.G) x 0.15
New.B = Start.B - (Start.B - End.B) x 0.15

(don't quote me - test it for yourself)
  • 0

#9 Red ochre

Red ochre

    2013 Plugin of the Year Author

  • Members
  • 983 posts
  • LocationSurrey, England
  • Reputation:323

Posted 12 September 2012 - 10:21 PM

Hi Xhin,
I don't use hex numbers but the way I add an effect slider would be to add double slider from 0 to 1.
Then multiply the source BGRA values by this and the effect BGRA values by the inverse of it.
eg.
// psuedo code
double Amount1 = 0; // [0,1] effect colour			blend				 source colour
double rat = Amount1;double irat = 1 - rat;
// let B,G,R be the values you want on the dst canvas
// let Bs,Gs,Rs be the src values
// let Be,Ge,Re be the effect values you have created
B = (int)((Bs * rat) + (Be * irat));
G = (int)((Gs * rat) + (Ge * irat));
R = (int)((Rs * rat) + (Re * irat));
// then recombine these (with A) and write to the dst canvas
hope that helps - I'm sure there are more correct ways of doing it, but it works for me!
  • 0
glasssig.png
Red ochre Plugin pack............................................................... Diabolical Drawings

#10 Xhin

Xhin
  • Members
  • 83 posts
  • Reputation:6

Posted 15 September 2012 - 08:08 PM

Thanks Ochre, I'll maybe try to fix it once I get some free time (this weekend probably).
  • 1

Posted Image