Adjust Colors Script

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Oops, wrong version.

I'm not near my computer for the right version, so don't download this one until I write here again (this was an old, old old version).

Sorry -- the pain meds are clouding my mind
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Sorry -- the pain meds are clouding my mind
:lol: I guess so. I've only seen the original link here. :wink:
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Well, I keep updating the file there.

But the meds were *really* clouding my mind -- as that version there IS the correct version. Sigh. So folks can download with assurance.

Okay, time to go for bed (well, at least to lay in bed and watch TV the rest of the evening).
Ovjeh
Posts: 26
Joined: Tue Nov 07, 2006 11:53 pm

Post by Ovjeh »

mkelley wrote:I'll let Wes deal with the issue of applying this to anything more than the selected layer, if he wants. Right now I just don't have the time to work on something that I'd never use (because of my workflow).
I'm not pushing anyone, just writing about possible solutions.
mkelley wrote:The mouse wheel thing is in there -- I'm guessing what you are saying is that you noticed it. For the others, you can turn the wheel of the mouse and it will increment and decrement the number in the field you have selected (I assume it works with negative numbers too, although I haven't yet tried it).
I tried to say that I rediscovered it.

Thank you for new version.:D



Take your time :) Wes (Wesley?).

Good to know Layer Include/Exclude thing is doable(?).


Good night folks, afterhours here.



--
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Take your time Wes (Wesley?).

Good to know Layer Include/Exclude thing is doable(?).
That's me. :)

There is more doable with the current scripting than any of us are likely to make use of. But of course we still ask for more scripting features. Go figure, we want to mess with the few things not accessible.

:wink:
User avatar
DK
Posts: 2849
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

WOW!!!! Thanks for this script mkelley. It's brilliant!!! I use a lot of monocoloured backgrounds and it was suc a pain to go resetting all the shape colours when using complicated backgrounds.

Cheers
D.K
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Glad it could help, D.K. I know I'll be using it a lot.

I'm still working on having presets -- got sidetracked trying to deal with styles, but apparently Mike never did add that to the API. The only real thing you can do with a style is copy it from one shape to another. So if folks are using styles this won't be of any use (and that's a bummer).

I was thinking I might even be able to disable all the styles in a doc, and while you can do that by manipulating the file itself there just isn't any sort of Style access at all via scripting. And given that Mike will be releasing another version (soon?) I don't think I'll worry about this for now.

And, truth be told, I've kind of stopped using them due to the oh so many limitations (things which, if there were script access, could easily be fixed). With a script like mine there really isn't any advantage to a style at all -- indeed, I could easily emulate styles (and do it in a much better manner). Once again -- we'll wait and see what Mike has to offer.

In any case, I'll post this last version (which also warns about using it on frame 0 -- you can still do it if you say yes, but otherwise it keeps you from screwing up your construction colors) and if anyone has any ideas I'll be glad to consider them but for my purposes it will be finished.
User avatar
DK
Posts: 2849
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

I've found setting the hue and saturation to say 5 then just hitting apply repeatedly will keep generating tons of background colour combinations. Colours are not my strong point so this script, in my book, is just fantastic! Thanks again.

Oh one thing....i'm not sure if the brightness has a bug but sometimes it just wont apply. I have to set it to -100 to get it to do anything but then it seems to come good.

Cheers
D.K
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

D.K.

I hate intermittent bugs, but I'll see if I can find out what might be affecting brightness (usually boundary conditions -- programmers *hate* boundary conditions :>).

I just uploaded one more version you might want to try -- not a huge change per se, but one that might work for you extremely well. I added a "randomize" checkbox.

What's really cool is to create, oh, ten or twenty objects all the same color and then start randomizing the hues and saturations. Or, for your monochrome stuff, just add 100 blue and randomize that addition.

It works by taking the limit entered as the upper or lower amount (depending on whether you enter a positive or negative number) and then 0 as the upper or lower -- so with this iteration at least you can't generate randoms that cross the 0 boundary (see? Boundary conditions again :>). If anyone wants I can probably change this, but it seemed so very elegant to just have the one switch I didn't want to get too complicated here.

I'm having fun just setting keys and letting the colors mix and match as you add various random color combinations -- way too much fun for this late at night (need to go to bed now).

(Note: There's a tiny bug that sometimes causes the randomize switch to get turned on after a normal apply. I'll fix this but I wanted to get it out for people to play with first, and it's no show stopper -- just hit reset).
User avatar
DK
Posts: 2849
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

WOW!!! Brilliant mkelley!!! This is a must have script and getting better! Some of the colour combinations are simply amazing. Colours I would never think of mixing. I can't stop playing with it.

:lol:
D.K
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

It's very fun to keep shifting colors -- there are so many things you can do with it, from simply varying your foliage or bricks on a building, to creating an entire background color scheme.

I've posted one last small fix to version 2.0 (so it's now 2.1) -- it corrects a bug where if you added a value to a hue (either on force or randomly) that resulted in the hue being 360 it would turn the color to black (NOT a desired behavior). Once again, boundary conditions -- my HSB to RGB routine did not handle 360 as a hue properly.

Anyway, it's fixed and I would recommend anyone using this script to make sure they have version 2.1. For now, until I add presets, that's going to be it (and it may be a while before I add presets, as I have a lot on my plate).
User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

this script is incredibly useful!. thanks. I just back from my vacations and I have a lot of topics to read here in the forum, so I can't read all the replies right now, but I'll be looking when have more time.
User avatar
PARKER
Posts: 1020
Joined: Sat Oct 25, 2008 4:26 am
Location: Animation World

Post by PARKER »

Thanks alot for the script.
User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

little question:
Is there anyway this script works on gradients too?

thanks!
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

As far as I can tell, the only fill effects open to scripting are soft edge and shading. Yet more that could be exposed to the scripting interface. :roll: :wink:
Post Reply