Skip to content

Setting alpha via an object doesn't work #58

Closed
@derekcicerone-zz

Description

@derekcicerone-zz

$.Color({red: 10, green: 10, blue: 10, alpha: 0.5}) results in a color with alpha set to 1.

The bug appears to be at line 276 in this section:
// everything defined but alpha?
if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
// use the default of 1
inst[ cache ][ 3 ] = 1;
if ( space.from ) {
inst._rgba = space.from( inst[ cache ] );
}
}

It seems to just clear out the alpha every time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions