class_docstr: Represent colors by specifying their Red, Green, and Blue channels.
  
  Alpha values may also optionally be provided. Otherwise, alpha values
  default to 1.
class_docstr_tok: ["Represent","colors","by","specifying","their","Red",",","Green",",","and","Blue","channels",".","Alpha","values","may","also","optionally","be","provided",".","Otherwise",",","alpha","values","default","to","1","."]
docstr: Perceived brightness of a color in [0, 1] range. 
docstr_tok: ["Perceived","brightness","of","a","color","in","[","0",",","1","]","range","."]
code: def brightness(self) -> float:
      """Perceived brightness of a color in [0, 1] range."""
      # http://alienryderflex.com/hsp.html
      r, g, b = self.r, self.g, self.b
      return (
          sqrt(0.299 * r**2 + 0.587 * g**2 + 0.114 * b**2) / 255
      )
  
imports: from __future__ import annotations
  import logging
  import colorsys
  from abc import ABCMeta, abstractmethod
  from math import sqrt
  from re import match
  from typing import TYPE_CHECKING, Union
  from ..core.serialization import AnyRep, Serializable, Serializer
  from ..util.deprecation import deprecated
label_desc: Use image node_id 11 for calling the RGB obj's underlying member method code with example usage: obj.brightness() and returns: unknown