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: Return a corresponding HSL color for this RGB color.
  
  Returns:
      :class:`~bokeh.colors.HSL`
docstr_tok: ["Return","a","corresponding","HSL","color","for","this","RGB","color",".","Returns",":",":","class",":","`","~bokeh.colors.HSL","`"]
code: def to_hsl(self) -> HSL:
      """Return a corresponding HSL color for this RGB color.
  
      Returns:
          :class:`~bokeh.colors.HSL`
  
      """
      h, l, s = colorsys.rgb_to_hls(
          float(self.r) / 255, float(self.g) / 255, float(self.b) / 255
      )
      return HSL(round(h * 360), s, l, self.a)
  
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 9 for calling the RGB obj's underlying member method code with example usage: obj.to_hsl() and returns: HSL