h6. [[OS SWI Calls]] h6(. » [[OS_ScreenMode]] h6((. » Mode String Mode strings consist of a list of space or comma separated attributes, terminated with a control character. For example, "X640 Y480 C256" to describe a 256 colour VGA resolution mode. In addition to the standard attributes, the string may start with a mode number. If this is the case then the additional attributes will act as modifiers on the base attributes of that mode. For example, "28 C16M" for a 16 million colour version of mode 28. h4. Attributes The following attributes are currently defined: |_<^. Attribute |_<^. Details | |<^. X |<^. Mode X resolution in pixels, e.g. X1024 | |<^. Y |<^. Mode Y resolution in pixels, e.g. Y768 | |/10<^. C |<^. Number of colours: | |<^. C2 = 2 colours (1bpp) | |<^. C4 = 4 colours (2bpp) | |<^. C16 = 16 colours (4bpp) | |<^. C64 = 64 colours (VIDC1 style 256 colour mode) (8bpp) | |<^. C256 = 256 colours (8bpp) | |<^. C4K/C4T = 4096 colours (16bpp) | |<^. C32K/C32T = 32768 colours (16bpp) | |<^. C64K/C64T = 65536 colours (16bpp) | |<^. C16M = 16 million colours (32bpp) | |/6^. G |<^. Number of greys/colours: | |<^. G2 = 2 greys (1bpp) | |<^. G4 = 4 greys (2bpp) | |<^. G16 = 16 greys (4bpp) | |<^. G256 = 256 greys (8bpp) | |<^. G16M = 16 million colours (24bpp packed) | |<^. F |<^. Framerate in Hz, e.g. F60 | |<^. EX |<^. X eigen factor (0-3), e.g. EX1 | |<^. EY |<^. Y eigen factor (0-3), e.g. EY1 | |<^. T |<^. Teletext mode with given number of colours, e.g. T16 | |<^. TX |<^. Teletext mode width in characters, e.g. TX40 | |<^. TY |<^. Teletext mode height in characters, e.g. TY25 | |/5<^. L |<^. Pixel layout | |<^. LTBGR = Traditional VIDC format with red in low bits | |<^. LTRGB = Red/blue swapped | |<^. LABGR = VIDC format with alpha channel | |<^. LARGB = Red/blue swapped with alpha channel | h4. Notes Specifying the same attribute more than once, or specifying conflicting attributes (e.g. both C and G attributes) is an invalid string and should result in an error being generated from most APIs. Likewise, it is illegal to omit a required attribute. E.g. for a standard mode the X, Y and C or G attributes must be provided. However if a mode number has been provided, these attributes are optional as the default values will be taken from the definition of that mode. For colour depths which have no space for a transparency/alpha channel (e.g. C64K, G16M) it is an error to specify a pixel layout which contains alpha. If the pixel layout is to be specified then only the LT... transparency-based layouts can be used. Not all versions of RISC OS support all attributes: * RISC OS 3.5 only understands the X, Y, C, G, F, EX and EY attributes. 4096 & 64K colour, and 24bpp packed are not supported, and neither is specifying a base mode number. * RISC OS Select adds support for 64K colour modes, the T, TX and TY attributes, and specifying a base mode number * RISC OS 5.21+ supports all features and attributes except T, TX and TY. ** T, TX and TY support is introduced in RISC OS 5.23 h4. See also * [[Mode Specifier]] * [[OS_ScreenMode]] * [[OS_ScreenMode 13]] * [[OS_ScreenMode 14]] * [[OS_ScreenMode 15]] * [[*WimpMode|*WimpMode]] h5. Other languages documentation [[Mode String (français)|Mode String]]