h6. [[OS SWI Calls]] h6(. » OS_ReadPalette h2. OS_ReadPalette h5. (SWI &2F) |_<^{width:4em}. Entry | | |<^. R0 |<^. Logical colour | |/4<^. R1 |<^. "Type of colour":#type | |_<^{width:4em}. Exit | | |<^. R0 |<^. Preserved | |<^. R1 |<^. Preserved | |<^. R2 |<^. Setting of colour (or first flashing colour if R2!=R3 on exit) | |<^. R3 |<^. Setting of second flashing colour | h4. Use The purpose of this call is to read the palette setting of a particular colour that is sent to the hardware. R1 selects whether the normal colour, border colour or pointer colour is read as follows: |_<^{width:4em}. #|_<^. Type| |<^. 16 |<^. Normal colour| |<^. 24 |<^. Border colour| |<^. 25 |<^. Pointer colour| h4. Notes If *R2*=*R3* on exit the colour requested is a non-flashing colour. The values are to interpret as follows: |_<^{width:4em}. Bits|_<^. Meaning| |<^. 0-6 |<^. Value showing how colour was programmed| |<^. 7|<^. Supremacy bit| |<^. 8-15|<^. Amount of red| |<^. 16-23|<^. Amount of green| |<^. 24-31|<^. Amount of blue | The bottom byte returns the second parameter to the [[VDU 19]] command. For example: |_<^{width:4em}. Value|_<^. Meaning| |<^. 0-15|<^. Actual colour (BBC compatible)| |<^. 16|<^. Defined by giving amounts of R, G and B| |<^. 17-18|<^. Flashing colour defined by giving amounts of red, green and blue| h4. See also * [[VDU 19]]