Please Login First
×
Create a new article
Write your page title here:
We currently have 322 articles on Inside. Type your article name above or click on one of the titles below and start writing!



    Inside

    GSDP:GAM100/CProcessing/alpha()

    alpha()

    Description

    Retrieve the alpha value from a given PColor object.

    Parameters

    alpha(PColor c)

    • c - (PColor) the Color to retrieve the alpha value from

    Example

    void init() 
    {
        // Create a slightly transparent white color
        pColor white = color(255,255,255,128);
    
       // Retrieve the alpha value
       // alpha will be 128
       int alpha = alpha(white);
    }
    

    Related