How do you work out colours?

natclarkenatclarke Brisbane, AustraliaMember, PRO Posts: 243

How do you work out the combination of colours, blue, red and green?

Is there are simple way to do so to get yellow, lavender and lighter colours or do you just have to experiment?

thanks

Nat

Nat Clarke
Life Cleansing

Comments

  • ToqueToque Member Posts: 1,188
    edited March 2017

    Your asking changing an actor's colour using the RGB numbers in that actor?

    I usually go into actor. Click on Color. White will be 0,0,0. Then I will click on the colour box (opens up the colour box) and use the colour eye dropper tool (near the bottom of the box) to pick up a colour I want.

    Then the RGB numbers for that colour will show up below.

    Like yellow is R .992 G .98 Blue .161

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2017

    You can look up RGB numbers online by googling the color name with "RGB". For example, if you google lavender rgb you get this: http://www.rapidtables.com/web/color/lavender-color.htm

    Then divide the integer value by a constant. So your change attribute values would be something like this:

    self.Color.Red: 230/255
    self.Color.Green: 230/255
    self.Color.Blue: 250/255

    I usually Group those three behaviors and label it with the name of the color ("Lavender").

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2017

  • natclarkenatclarke Brisbane, AustraliaMember, PRO Posts: 243
    edited April 2017

    I am wanting to change the background colour of a scene for the sky to various colours depending on what is selected. I have clouds moving over it. I have an attribute backgroundcolour. When background colour is 1 for blue:

    change attribute red to ?
    change attribute green to ?
    change attribute blue to?

    When background colour is 1 for purple:
    change attribute red to ?
    change attribute green to ?
    change attribute blue to?

    and so on...

    Thanks for everyone's help. Very much appreciated.

    Happy Easter

    Nat Clarke
    Life Cleansing

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    If you look at @Socks' gif above, you can click on a color in the color wheel or the crayon tab or whatever you prefer. Then, click on the color sliders tab (it's one of the five small buttons above the color wheel) and you will see the RGB values to include in your change attribute expressions.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    For example, here's blue:

    So you would use 0/255, 0/255, and 255/255 as the values.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • natclarkenatclarke Brisbane, AustraliaMember, PRO Posts: 243

    Thanks. This method was the easiest. I have attached how to do the code for the background scene actor.

    Nat Clarke
    Life Cleansing

Sign In or Register to comment.