Skip to content

adding properties to color object #7767

Open
@rruubboott

Description

@rruubboott

Increasing access

By simplifying a process, making information more easily accessible by beginners.

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

Feature enhancement details

The color object's r,g,b and a values could be accessible via literal properties called r,g,b,a (or at a push red, green,blue etc.)
So that is to say you could get access to the Red value of a color object via:
color.r or color.red
and not have to go into:
color.levels[0]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions