code: def test_transform(self) -> None:
      prop = bcpc.ColorHex()
      assert prop.transform("#ff0000") == "#ff0000"
      assert prop.transform((255, 0, 0)) == "#ff0000"
      assert prop.transform((255, 0, 0, 0.1)) == "#ff00001a"
      assert prop.transform("red") == "#ff0000"
      assert prop.transform("RED") == "#ff0000"
      assert prop.transform("rgba(255, 0, 0, 0.1)") == "#ff00001a"
      assert prop.transform("rgb(255, 0, 0)") == "#ff0000"
      assert prop.transform(RGB(255, 0, 0)) == "#ff0000"
  
file_path: bokeh/tests/unit/bokeh/core/property/test_color__property.py
imports: from __future__ import annotations
  import pytest
  from bokeh.colors import RGB
  from tests.support.util.api import verify_all
  from _util_property import _TestHasProps, _TestModel
  import bokeh.core.property.color
label_desc: Use image node_id 1 for calling the Test_ColorHex obj's underlying member method code with example usage: obj.test_transform() without return types