Color extensions

Home Forums Monkey 2 Code Library Color extensions

Tagged: ,

This topic contains 4 replies, has 3 voices, and was last updated by  nerobot 5 days, 22 hours ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12138

    nerobot
    Participant

    Let’s put all useful color extensions in one place.

    #12139

    nerobot
    Participant

    If you want to make color lighter or darker, you can multiply it with float:

    Local darkerPink:=Color.Pink * .8

    Local lighter:=Color.FromHex("#554488") * 1.2

    #12171

    Hezkore
    Participant

    It’s a shame you can’t use ‘New’ with extensions.
    I’d love to have

    Oh well, you can still do:

    #12179

    cocon
    Participant

    Some updates to the code as nerobot suggested.

    #12185

    nerobot
    Participant

    Code is not mine but good to have it here.:)

    And it’s ABGR¬†format not RGBA. So we must rename that function to be correct.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.