€•@6Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ./translations/zh_CN/leds/leds-class-multicolor”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/zh_TW/leds/leds-class-multicolor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/it_IT/leds/leds-class-multicolor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/ja_JP/leds/leds-class-multicolor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/ko_KR/leds/leds-class-multicolor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/pt_BR/leds/leds-class-multicolor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/sp_SP/leds/leds-class-multicolor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒH/var/lib/git/docbuild/linux/Documentation/leds/leds-class-multicolor.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ#Multicolor LED handling under Linux”h]”hŒ#Multicolor LED handling under Linux”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ Description”h]”hŒ Description”…””}”(hhàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÝh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒìThe multicolor class groups monochrome LEDs and allows controlling two aspects of the final combined color: hue and lightness. The former is controlled via the multi_intensity array file and the latter is controlled via brightness file.”h]”hŒìThe multicolor class groups monochrome LEDs and allows controlling two aspects of the final combined color: hue and lightness. The former is controlled via the multi_intensity array file and the latter is controlled via brightness file.”…””}”(hhðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K hhÝh²hubeh}”(h]”Œ description”ah ]”h"]”Œ description”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒMulticolor Class Control”h]”hŒMulticolor Class Control”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´Kubhï)”}”(hXThe multicolor class presents files that groups the colors as indexes in an array. These files are children under the LED parent node created by the led_class framework. The led_class framework is documented in led-class.rst within this documentation directory.”h]”hXThe multicolor class presents files that groups the colors as indexes in an array. These files are children under the LED parent node created by the led_class framework. The led_class framework is documented in led-class.rst within this documentation directory.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khjh²hubhï)”}”(hŒ»Each colored LED will be indexed under the ``multi_*`` files. The order of the colors will be arbitrary. The ``multi_index`` file can be read to determine the color name to indexed value.”h]”(hŒ+Each colored LED will be indexed under the ”…””}”(hj%h²hh³Nh´NubhŒliteral”“”)”}”(hŒ ``multi_*``”h]”hŒmulti_*”…””}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j-hj%ubhŒ7 files. The order of the colors will be arbitrary. The ”…””}”(hj%h²hh³Nh´Nubj.)”}”(hŒ``multi_index``”h]”hŒ multi_index”…””}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j-hj%ubhŒ? file can be read to determine the color name to indexed value.”…””}”(hj%h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khjh²hubhï)”}”(hŒ„The ``multi_index`` file is an array that contains the string list of the colors as they are defined in each ``multi_*`` array file.”h]”(hŒThe ”…””}”(hjYh²hh³Nh´Nubj.)”}”(hŒ``multi_index``”h]”hŒ multi_index”…””}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j-hjYubhŒZ file is an array that contains the string list of the colors as they are defined in each ”…””}”(hjYh²hh³Nh´Nubj.)”}”(hŒ ``multi_*``”h]”hŒmulti_*”…””}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j-hjYubhŒ array file.”…””}”(hjYh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khjh²hubhï)”}”(hŒÎThe ``multi_intensity`` is an array that can be read or written to for the individual color intensities. All elements within this array must be written in order for the color LED intensities to be updated.”h]”(hŒThe ”…””}”(hj‹h²hh³Nh´Nubj.)”}”(hŒ``multi_intensity``”h]”hŒmulti_intensity”…””}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j-hj‹ubhŒ· is an array that can be read or written to for the individual color intensities. All elements within this array must be written in order for the color LED intensities to be updated.”…””}”(hj‹h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khjh²hubeh}”(h]”Œmulticolor-class-control”ah ]”h"]”Œmulticolor class control”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒDirectory Layout Example”h]”hŒDirectory Layout Example”…””}”(hj¶h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj³h²hh³hÇh´K!ubhŒ literal_block”“”)”}”(hXHroot:/sys/class/leds/multicolor:status# ls -lR -rw-r--r-- 1 root root 4096 Oct 19 16:16 brightness -r--r--r-- 1 root root 4096 Oct 19 16:16 max_brightness -r--r--r-- 1 root root 4096 Oct 19 16:16 multi_index -rw-r--r-- 1 root root 4096 Oct 19 16:16 multi_intensity”h]”hXHroot:/sys/class/leds/multicolor:status# ls -lR -rw-r--r-- 1 root root 4096 Oct 19 16:16 brightness -r--r--r-- 1 root root 4096 Oct 19 16:16 max_brightness -r--r--r-- 1 root root 4096 Oct 19 16:16 multi_index -rw-r--r-- 1 root root 4096 Oct 19 16:16 multi_intensity”…””}”hjÆsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆŒforce”‰Œlanguage”Œconsole”Œhighlight_args”}”uh1jÄh³hÇh´K"hj³h²hubh¶)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhj³h²hh³hÇh´K*ubeh}”(h]”Œdirectory-layout-example”ah ]”h"]”Œdirectory layout example”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K!ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ#Multicolor Class Brightness Control”h]”hŒ#Multicolor Class Brightness Control”…””}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjêh²hh³hÇh´K-ubhï)”}”(hŒ­The brightness level for each LED is calculated based on the color LED intensity setting divided by the global max_brightness setting multiplied by the requested brightness.”h]”hŒ­The brightness level for each LED is calculated based on the color LED intensity setting divided by the global max_brightness setting multiplied by the requested brightness.”…””}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K.hjêh²hubhï)”}”(hŒ@``led_brightness = brightness * multi_intensity/max_brightness``”h]”j.)”}”(hj h]”hŒ /sys/class/leds/multicolor:status/multi_intensity red - intensity = 138 max_brightness = 255 green - intensity = 43 max_brightness = 255 blue - intensity = 226 max_brightness = 255”h]”hX%# cat /sys/class/leds/multicolor:status/multi_index green blue red # echo 43 226 138 > /sys/class/leds/multicolor:status/multi_intensity red - intensity = 138 max_brightness = 255 green - intensity = 43 max_brightness = 255 blue - intensity = 226 max_brightness = 255”…””}”hj.sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆjÔ‰jÕŒconsole”j×}”uh1jÄh³hÇh´K9hjêh²hubh¶)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhjêh²hh³hÇh´KJubhï)”}”(hXPThe user can control the brightness of that multicolor LED group by writing the global 'brightness' control. Assuming a max_brightness of 255 the user may want to dim the LED color group to half. The user would write a value of 128 to the global brightness file then the values written to each LED will be adjusted base on this value.”h]”hXTThe user can control the brightness of that multicolor LED group by writing the global ‘brightness’ control. Assuming a max_brightness of 255 the user may want to dim the LED color group to half. The user would write a value of 128 to the global brightness file then the values written to each LED will be adjusted base on this value.”…””}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KLhjêh²hubjÅ)”}”(hŒt# cat /sys/class/leds/multicolor:status/max_brightness 255 # echo 128 > /sys/class/leds/multicolor:status/brightness”h]”hŒt# cat /sys/class/leds/multicolor:status/max_brightness 255 # echo 128 > /sys/class/leds/multicolor:status/brightness”…””}”hjUsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆjÔ‰jÕŒconsole”j×}”uh1jÄh³hÇh´KRhjêh²hubh¶)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhjêh²hh³hÇh´KXubjÅ)”}”(hŒzadjusted_red_value = 128 * 138/255 = 69 adjusted_green_value = 128 * 43/255 = 21 adjusted_blue_value = 128 * 226/255 = 113”h]”hŒzadjusted_red_value = 128 * 138/255 = 69 adjusted_green_value = 128 * 43/255 = 21 adjusted_blue_value = 128 * 226/255 = 113”…””}”hjnsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆjÔ‰jÕŒnone”j×}”uh1jÄh³hÇh´KZhjêh²hubh¶)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhjêh²hh³hÇh´K`ubhï)”}”(hŒcReading the global brightness file will return the current brightness value of the color LED group.”h]”hŒcReading the global brightness file will return the current brightness value of the color LED group.”…””}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kbhjêh²hubjÅ)”}”(hŒ6# cat /sys/class/leds/multicolor:status/brightness 128”h]”hŒ6# cat /sys/class/leds/multicolor:status/brightness 128”…””}”hj•sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆjÔ‰jÕŒconsole”j×}”uh1jÄh³hÇh´Kehjêh²hubh¶)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhjêh²hh³hÇh´Kjubeh}”(h]”Œ#multicolor-class-brightness-control”ah ]”h"]”Œ#multicolor class brightness control”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K-ubeh}”(h]”Œ#multicolor-led-handling-under-linux”ah ]”h"]”Œ#multicolor led handling under linux”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jáŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j»j¸jjj°j­jçjäj³j°uŒ nametypes”}”(j»‰j‰j°‰jç‰j³‰uh}”(j¸hÊjhÝj­jjäj³j°jêuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.