Color Palette Select

For questions about using Classic.

Post » Mon Sep 12, 2011 11:28 pm

I want to create a color pallete for my application.The problem is that i have no idea how to change the color of the brush whenever i click on a certain part of the color pallete.Creating color boxes for each color would take forever.

Is there any way that this could be achieved through Python??.
B
22
S
3
G
6
Posts: 1,356
Reputation: 7,141

Post » Mon Sep 12, 2011 11:37 pm

what about Arrays? You could make an array to create ie. 18 different White sprites (small box or whatever), arrange them on grid, change their colors and pv.
You would have:
sprite1 - white, pv0
sprite2 - grey, pv1
sprite3 - red, pv2
...
not sure how to make an expression for assigning colors, but it's just an idea :)
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Tue Sep 13, 2011 12:04 am

I could do that shinkan ,But i want the color pallete to work like photoshop's color pallete for instance.If the cursor is over a certain area of the color pallete then the color box would show that certain color
where the cursor is at that particular part of the color pallete.

Here is an example of what i am trying to do.







B
22
S
3
G
6
Posts: 1,356
Reputation: 7,141

Post » Tue Sep 13, 2011 12:20 am

Allright then. You will need extreamly large Array ;P
but seriously, I'am affraid you have to options only, made a plugin for color pallete or find as You say something in Python maybe :/
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Tue Sep 13, 2011 12:32 am

@Shinkan Lol yes i think the array idea would be a bad move.I see that i would have to choose each color on a per pixel base.Thank's for the help shinkan.
B
22
S
3
G
6
Posts: 1,356
Reputation: 7,141

Post » Tue Sep 13, 2011 12:39 am

hmm another one.
ImageManipulator object. You could load image with color pallete and then using expression "Get B", "Get G", Get R" get color from mouse X and Y position.

ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Tue Sep 13, 2011 12:41 am

Image Image
B
161
S
48
G
90
Posts: 7,348
Reputation: 66,751

Post » Tue Sep 13, 2011 12:43 am

heh newt that's to simple ;P he's aiming for more pro like :)
good start anyway :)
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Tue Sep 13, 2011 1:16 am

Thanks newt ,But that's only for the canvas ,I need to change the color to a sprite or particle.Sprite's And particles has fixed color filters as far as i know.:)
B
22
S
3
G
6
Posts: 1,356
Reputation: 7,141

Post » Tue Sep 13, 2011 1:34 am

You can set the initial color for particles by right clicking, and selecting use expression.
CommonDialog.Colour
Like wise you can set sprite to pure white, and use a color filter for it.
Same goes for particles, you can use a color filter on them, just set the preferences to black, or white, or gray.
Image Image
B
161
S
48
G
90
Posts: 7,348
Reputation: 66,751

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests