Coverage for models/__init__.py: 0%

1 import sys

2 from typing import Annotated

3

4 from colour.hints import NDArrayFloat

5 from colour.utilities import copy_definition, get_domain_range_scale_metadata

6

7# isort: split

8

9 from .common import (

10 COLOURSPACE_MODELS,

11 COLOURSPACE_MODELS_AXIS_LABELS,

12 COLOURSPACE_MODELS_DOMAIN_RANGE_SCALE_1_TO_REFERENCE,

13 Iab_to_XYZ,

14 Jab_to_JCh,

15 JCh_to_Jab,

16 XYZ_to_Iab,

17)

18

19# isort: split

20

21 from .cam02_ucs import (

22 CAM02LCD_to_JMh_CIECAM02,

23 CAM02LCD_to_XYZ,

24 CAM02SCD_to_JMh_CIECAM02,

25 CAM02SCD_to_XYZ,

26 CAM02UCS_to_JMh_CIECAM02,

27 CAM02UCS_to_XYZ,

28 JMh_CIECAM02_to_CAM02LCD,

29 JMh_CIECAM02_to_CAM02SCD,

30 JMh_CIECAM02_to_CAM02UCS,

31 XYZ_to_CAM02LCD,

32 XYZ_to_CAM02SCD,

33 XYZ_to_CAM02UCS,

34)

35 from .cam16_ucs import (

36 CAM16LCD_to_JMh_CAM16,

37 CAM16LCD_to_XYZ,

38 CAM16SCD_to_JMh_CAM16,

39 CAM16SCD_to_XYZ,

40 CAM16UCS_to_JMh_CAM16,

41 CAM16UCS_to_XYZ,

42 JMh_CAM16_to_CAM16LCD,

43 JMh_CAM16_to_CAM16SCD,

44 JMh_CAM16_to_CAM16UCS,

45 XYZ_to_CAM16LCD,

46 XYZ_to_CAM16SCD,

47 XYZ_to_CAM16UCS,

48)

49 from .cie_xyy import (

50 XYZ_to_xy,

51 XYZ_to_xyY,

52 xy_to_xyY,

53 xy_to_XYZ,

54 xyY_to_xy,

55 xyY_to_XYZ,

56)

57

58# isort: split

59

60 from .cie_lab import Lab_to_XYZ, XYZ_to_Lab

61 from .cie_luv import (

62 CIE1976UCS_to_XYZ,

63 Luv_to_uv,

64 Luv_to_XYZ,

65 Luv_uv_to_xy,

66 XYZ_to_CIE1976UCS,

67 XYZ_to_Luv,

68 uv_to_Luv,

69 xy_to_Luv_uv,

70)

71 from .cie_ucs import (

72 CIE1960UCS_to_XYZ,

73 UCS_to_uv,

74 UCS_to_XYZ,

75 UCS_uv_to_xy,

76 XYZ_to_CIE1960UCS,

77 XYZ_to_UCS,

78 uv_to_UCS,

79 xy_to_UCS_uv,

80)

81 from .cie_uvw import UVW_to_XYZ, XYZ_to_UVW

82 from .din99 import DIN99_to_Lab, DIN99_to_XYZ, Lab_to_DIN99, XYZ_to_DIN99

83 from .hdr_cie_lab import (

84 HDR_CIELAB_METHODS,

85 XYZ_to_hdr_CIELab,

86 hdr_CIELab_to_XYZ,

87)

88 from .hunter_lab import (

89 Hunter_Lab_to_XYZ,

90 XYZ_to_Hunter_Lab,

91 XYZ_to_K_ab_HunterLab1966,

92)

93 from .hunter_rdab import Hunter_Rdab_to_XYZ, XYZ_to_Hunter_Rdab

94 from .icacb import ICaCb_to_XYZ, XYZ_to_ICaCb

95 from .igpgtg import IgPgTg_to_XYZ, XYZ_to_IgPgTg

96 from .ipt import IPT_hue_angle, IPT_to_XYZ, XYZ_to_IPT

97 from .jzazbz import (

98 IZAZBZ_METHODS,

99 Izazbz_to_XYZ,

100 Jzazbz_to_XYZ,

101 XYZ_to_Izazbz,

102 XYZ_to_Jzazbz,

103)

104

105# isort: split

106

107 from .hdr_ipt import HDR_IPT_METHODS, XYZ_to_hdr_IPT, hdr_IPT_to_XYZ

108 from .oklab import Oklab_to_XYZ, XYZ_to_Oklab

109 from .osa_ucs import OSA_UCS_to_XYZ, XYZ_to_OSA_UCS

110 from .prolab import ProLab_to_XYZ, XYZ_to_ProLab

111 from .ragoo2021 import IPT_Ragoo2021_to_XYZ, XYZ_to_IPT_Ragoo2021

112 from .sucs import (

113 XYZ_to_sUCS,

114 sUCS_chroma,

115 sUCS_hue_angle,

116 sUCS_Iab_to_sUCS_ICh,

117 sUCS_ICh_to_sUCS_Iab,

118 sUCS_to_XYZ,

119)

120 from .yrg import LMS_to_Yrg, XYZ_to_Yrg, Yrg_to_LMS, Yrg_to_XYZ

121

122# isort: split

123

124 from .datasets import (

125 CCS_ILLUMINANT_POINTER_GAMUT,

126 CCS_POINTER_GAMUT_BOUNDARY,

127 DATA_MACADAM_1942_ELLIPSES,

128 DATA_POINTER_GAMUT_VOLUME,

129)

130

131# isort: split

132

133 from .rgb import (

134 BT2100_HLG_EOTF_INVERSE_METHODS,

135 BT2100_HLG_EOTF_METHODS,

136 BT2100_HLG_OOTF_INVERSE_METHODS,

137 BT2100_HLG_OOTF_METHODS,

138 CCTF_DECODINGS,

139 CCTF_ENCODINGS,

140 COLOUR_PRIMARIES_ITUTH273,

141 EOTF_INVERSES,

142 EOTFS,

143 LOG3G10_DECODING_METHODS,

144 LOG3G10_ENCODING_METHODS,

145 LOG_DECODINGS,

146 LOG_ENCODINGS,

147 MATRIX_COEFFICIENTS_ITUTH273,

148 OETF_INVERSES,

149 OETFS,

150 OOTF_INVERSES,

151 OOTFS,

152 RGB_COLOURSPACE_ACES2065_1,

153 RGB_COLOURSPACE_ACESCC,

154 RGB_COLOURSPACE_ACESCCT,

155 RGB_COLOURSPACE_ACESCG,

156 RGB_COLOURSPACE_ACESPROXY,

157 RGB_COLOURSPACE_ADOBE_RGB1998,

158 RGB_COLOURSPACE_ADOBE_WIDE_GAMUT_RGB,

159 RGB_COLOURSPACE_APPLE_RGB,

160 RGB_COLOURSPACE_ARRI_WIDE_GAMUT_3,

161 RGB_COLOURSPACE_ARRI_WIDE_GAMUT_4,

162 RGB_COLOURSPACE_BEST_RGB,

163 RGB_COLOURSPACE_BETA_RGB,

164 RGB_COLOURSPACE_BLACKMAGIC_WIDE_GAMUT,

165 RGB_COLOURSPACE_BT470_525,

166 RGB_COLOURSPACE_BT470_625,

167 RGB_COLOURSPACE_BT709,

168 RGB_COLOURSPACE_BT2020,

169 RGB_COLOURSPACE_CIE_RGB,

170 RGB_COLOURSPACE_CINEMA_GAMUT,

171 RGB_COLOURSPACE_COLOR_MATCH_RGB,

172 RGB_COLOURSPACE_DAVINCI_WIDE_GAMUT,

173 RGB_COLOURSPACE_DCDM_XYZ,

174 RGB_COLOURSPACE_DCI_P3,

175 RGB_COLOURSPACE_DCI_P3_P,

176 RGB_COLOURSPACE_DISPLAY_P3,

177 RGB_COLOURSPACE_DJI_D_GAMUT,

178 RGB_COLOURSPACE_DON_RGB_4,

179 RGB_COLOURSPACE_DRAGON_COLOR,

180 RGB_COLOURSPACE_DRAGON_COLOR_2,

181 RGB_COLOURSPACE_EBU_3213_E,

182 RGB_COLOURSPACE_ECI_RGB_V2,

183 RGB_COLOURSPACE_EKTA_SPACE_PS_5,

184 RGB_COLOURSPACE_ERIMM_RGB,

185 RGB_COLOURSPACE_F_GAMUT,

186 RGB_COLOURSPACE_F_GAMUT_C,

187 RGB_COLOURSPACE_FILMLIGHT_E_GAMUT,

188 RGB_COLOURSPACE_FILMLIGHT_E_GAMUT_2,

189 RGB_COLOURSPACE_G18_REC709_SCENE,

190 RGB_COLOURSPACE_G22_ADOBERGB_SCENE,

191 RGB_COLOURSPACE_G22_AP1_SCENE,

192 RGB_COLOURSPACE_G22_REC709_SCENE,

193 RGB_COLOURSPACE_H273_22_UNSPECIFIED,

194 RGB_COLOURSPACE_H273_GENERIC_FILM,

195 RGB_COLOURSPACE_LIN_ADOBERGB_SCENE,

196 RGB_COLOURSPACE_LIN_CIEXYZD65_SCENE,

197 RGB_COLOURSPACE_LIN_P3D65_SCENE,

198 RGB_COLOURSPACE_LIN_REC709_SCENE,

199 RGB_COLOURSPACE_LIN_REC2020_SCENE,

200 RGB_COLOURSPACE_MAX_RGB,

201 RGB_COLOURSPACE_N_GAMUT,

202 RGB_COLOURSPACE_NTSC1953,

203 RGB_COLOURSPACE_NTSC1987,

204 RGB_COLOURSPACE_P3_D65,

205 RGB_COLOURSPACE_PAL_SECAM,

206 RGB_COLOURSPACE_PLASA_ANSI_E154,

207 RGB_COLOURSPACE_PROPHOTO_RGB,

208 RGB_COLOURSPACE_PROTUNE_NATIVE,

209 RGB_COLOURSPACE_RED_COLOR,

210 RGB_COLOURSPACE_RED_COLOR_2,

211 RGB_COLOURSPACE_RED_COLOR_3,

212 RGB_COLOURSPACE_RED_COLOR_4,

213 RGB_COLOURSPACE_RED_WIDE_GAMUT_RGB,

214 RGB_COLOURSPACE_RIMM_RGB,

215 RGB_COLOURSPACE_ROMM_RGB,

216 RGB_COLOURSPACE_RUSSELL_RGB,

217 RGB_COLOURSPACE_S_GAMUT,

218 RGB_COLOURSPACE_S_GAMUT3,

219 RGB_COLOURSPACE_S_GAMUT3_CINE,

220 RGB_COLOURSPACE_SHARP_RGB,

221 RGB_COLOURSPACE_SMPTE_240M,

222 RGB_COLOURSPACE_SMPTE_C,

223 RGB_COLOURSPACE_SRGB_AP1_SCENE,

224 RGB_COLOURSPACE_SRGB_P3D65_SCENE,

225 RGB_COLOURSPACE_SRGB_REC709_SCENE,

226 RGB_COLOURSPACE_V_GAMUT,

227 RGB_COLOURSPACE_VENICE_S_GAMUT3,

228 RGB_COLOURSPACE_VENICE_S_GAMUT3_CINE,

229 RGB_COLOURSPACE_XTREME_RGB,

230 RGB_COLOURSPACES,

231 RGB_COLOURSPACES_TEXTURE_ASSETS_AND_CG_RENDERING_CIF,

232 TRANSFER_CHARACTERISTICS_ITUTH273,

233 WEIGHTS_YCBCR,

234 CMY_to_CMYK,

235 CMY_to_RGB,

236 CMYK_to_CMY,

237 CV_range,

238 HCL_to_RGB,

239 HSL_to_RGB,

240 HSV_to_RGB,

241 ICtCp_to_RGB,

242 ICtCp_to_XYZ,

243 IHLS_to_RGB,

244 Prismatic_to_RGB,

245 RGB_Colourspace,

246 RGB_COLOURSPACE_sRGB,

247 RGB_luminance,

248 RGB_luminance_equation,

249 RGB_to_CMY,

250 RGB_to_HCL,

251 RGB_to_HSL,

252 RGB_to_HSV,

253 RGB_to_ICtCp,

254 RGB_to_IHLS,

255 RGB_to_Prismatic,

256 RGB_to_RGB,

257 RGB_to_XYZ,

258 RGB_to_YCbCr,

259 RGB_to_YcCbcCrc,

260 RGB_to_YCoCg,

261 XYZ_to_ICtCp,

262 XYZ_to_RGB,

263 XYZ_to_sRGB,

264 YCbCr_to_RGB,

265 YcCbcCrc_to_RGB,

266 YCoCg_to_RGB,

267 cctf_decoding,

268 cctf_decoding_ProPhotoRGB,

269 cctf_decoding_RIMMRGB,

270 cctf_decoding_ROMMRGB,

271 cctf_encoding,

272 cctf_encoding_ProPhotoRGB,

273 cctf_encoding_RIMMRGB,

274 cctf_encoding_ROMMRGB,

275 chromatically_adapted_primaries,

276 describe_video_signal_colour_primaries,

277 describe_video_signal_matrix_coefficients,

278 describe_video_signal_transfer_characteristics,

279 eotf,

280 eotf_BT1886,

281 eotf_BT2100_HLG,

282 eotf_BT2100_PQ,

283 eotf_DCDM,

284 eotf_DICOMGSDF,

285 eotf_H273_ST428_1,

286 eotf_inverse,

287 eotf_inverse_BT1886,

288 eotf_inverse_BT2100_HLG,

289 eotf_inverse_BT2100_PQ,

290 eotf_inverse_DCDM,

291 eotf_inverse_DICOMGSDF,

292 eotf_inverse_H273_ST428_1,

293 eotf_inverse_sRGB,

294 eotf_inverse_ST2084,

295 eotf_SMPTE240M,

296 eotf_sRGB,

297 eotf_ST2084,

298 exponent_function_basic,

299 exponent_function_monitor_curve,

300 full_to_legal,

301 gamma_function,

302 legal_to_full,

303 linear_function,

304 log_decoding,

305 log_decoding_ACEScc,

306 log_decoding_ACEScct,

307 log_decoding_ACESproxy,

308 log_decoding_AppleLogProfile,

309 log_decoding_ARRILogC3,

310 log_decoding_ARRILogC4,

311 log_decoding_CanonLog,

312 log_decoding_CanonLog2,

313 log_decoding_CanonLog3,

314 log_decoding_Cineon,

315 log_decoding_DJIDLog,

316 log_decoding_ERIMMRGB,

317 log_decoding_FilmicPro6,

318 log_decoding_FilmLightTLog,

319 log_decoding_FLog,

320 log_decoding_FLog2,

321 log_decoding_LLog,

322 log_decoding_Log2,

323 log_decoding_Log3G10,

324 log_decoding_Log3G12,

325 log_decoding_MiLog,

326 log_decoding_NLog,

327 log_decoding_Panalog,

328 log_decoding_PivotedLog,

329 log_decoding_Protune,

330 log_decoding_REDLog,

331 log_decoding_REDLogFilm,

332 log_decoding_SLog,

333 log_decoding_SLog2,

334 log_decoding_SLog3,

335 log_decoding_ViperLog,

336 log_decoding_VLog,

337 log_encoding,

338 log_encoding_ACEScc,

339 log_encoding_ACEScct,

340 log_encoding_ACESproxy,

341 log_encoding_AppleLogProfile,

342 log_encoding_ARRILogC3,

343 log_encoding_ARRILogC4,

344 log_encoding_CanonLog,

345 log_encoding_CanonLog2,

346 log_encoding_CanonLog3,

347 log_encoding_Cineon,

348 log_encoding_DJIDLog,

349 log_encoding_ERIMMRGB,

350 log_encoding_FilmicPro6,

351 log_encoding_FilmLightTLog,

352 log_encoding_FLog,

353 log_encoding_FLog2,

354 log_encoding_LLog,

355 log_encoding_Log2,

356 log_encoding_Log3G10,

357 log_encoding_Log3G12,

358 log_encoding_MiLog,

359 log_encoding_NLog,

360 log_encoding_Panalog,

361 log_encoding_PivotedLog,

362 log_encoding_Protune,

363 log_encoding_REDLog,

364 log_encoding_REDLogFilm,

365 log_encoding_SLog,

366 log_encoding_SLog2,

367 log_encoding_SLog3,

368 log_encoding_ViperLog,

369 log_encoding_VLog,

370 logarithmic_function_basic,

371 logarithmic_function_camera,

372 logarithmic_function_quasilog,

373 matrix_RGB_to_RGB,

374 matrix_YCbCr,

375 normalised_primary_matrix,

376 oetf,

377 oetf_ARIBSTDB67,

378 oetf_BlackmagicFilmGeneration5,

379 oetf_BT601,

380 oetf_BT709,

381 oetf_BT1361,

382 oetf_BT2020,

383 oetf_BT2100_HLG,

384 oetf_BT2100_PQ,

385 oetf_DaVinciIntermediate,

386 oetf_H273_IEC61966_2,

387 oetf_H273_Log,

388 oetf_H273_LogSqrt,

389 oetf_inverse,

390 oetf_inverse_ARIBSTDB67,

391 oetf_inverse_BlackmagicFilmGeneration5,

392 oetf_inverse_BT601,

393 oetf_inverse_BT709,

394 oetf_inverse_BT1361,

395 oetf_inverse_BT2020,

396 oetf_inverse_BT2100_HLG,

397 oetf_inverse_BT2100_PQ,

398 oetf_inverse_DaVinciIntermediate,

399 oetf_inverse_H273_IEC61966_2,

400 oetf_inverse_H273_Log,

401 oetf_inverse_H273_LogSqrt,

402 oetf_SMPTE240M,

403 offset_YCbCr,

404 ootf,

405 ootf_BT2100_HLG,

406 ootf_BT2100_PQ,

407 ootf_inverse,

408 ootf_inverse_BT2100_HLG,

409 ootf_inverse_BT2100_PQ,

410 primaries_whitepoint,

411 sRGB_to_XYZ,

412)

413

414 __all__ = [

415 "COLOURSPACE_MODELS",

416 "COLOURSPACE_MODELS_AXIS_LABELS",

417 "COLOURSPACE_MODELS_DOMAIN_RANGE_SCALE_1_TO_REFERENCE",

418 "Iab_to_XYZ",

419 "Jab_to_JCh",

420 "JCh_to_Jab",

421 "XYZ_to_Iab",

422]

423 __all__ += [

424 "CAM02LCD_to_JMh_CIECAM02",

425 "CAM02LCD_to_XYZ",

426 "CAM02SCD_to_JMh_CIECAM02",

427 "CAM02SCD_to_XYZ",

428 "CAM02UCS_to_JMh_CIECAM02",

429 "CAM02UCS_to_XYZ",

430 "JMh_CIECAM02_to_CAM02LCD",

431 "JMh_CIECAM02_to_CAM02SCD",

432 "JMh_CIECAM02_to_CAM02UCS",

433 "XYZ_to_CAM02LCD",

434 "XYZ_to_CAM02SCD",

435 "XYZ_to_CAM02UCS",

436]

437 __all__ += [

438 "CAM16LCD_to_JMh_CAM16",

439 "CAM16LCD_to_XYZ",

440 "CAM16SCD_to_JMh_CAM16",

441 "CAM16SCD_to_XYZ",

442 "CAM16UCS_to_JMh_CAM16",

443 "CAM16UCS_to_XYZ",

444 "JMh_CAM16_to_CAM16LCD",

445 "JMh_CAM16_to_CAM16SCD",

446 "JMh_CAM16_to_CAM16UCS",

447 "XYZ_to_CAM16LCD",

448 "XYZ_to_CAM16SCD",

449 "XYZ_to_CAM16UCS",

450]

451 __all__ += [

452 "XYZ_to_xy",

453 "XYZ_to_xyY",

454 "xy_to_xyY",

455 "xy_to_XYZ",

456 "xyY_to_xy",

457 "xyY_to_XYZ",

458]

459 __all__ += [

460 "Lab_to_XYZ",

461 "XYZ_to_Lab",

462]

463 __all__ += [

464 "CIE1976UCS_to_XYZ",

465 "Luv_to_uv",

466 "Luv_to_XYZ",

467 "Luv_uv_to_xy",

468 "XYZ_to_CIE1976UCS",

469 "XYZ_to_Luv",

470 "uv_to_Luv",

471 "xy_to_Luv_uv",

472]

473 __all__ += [

474 "CIE1960UCS_to_XYZ",

475 "UCS_to_uv",

476 "UCS_to_XYZ",

477 "UCS_uv_to_xy",

478 "XYZ_to_CIE1960UCS",

479 "XYZ_to_UCS",

480 "uv_to_UCS",

481 "xy_to_UCS_uv",

482]

483 __all__ += [

484 "UVW_to_XYZ",

485 "XYZ_to_UVW",

486]

487 __all__ += [

488 "DIN99_to_Lab",

489 "DIN99_to_XYZ",

490 "Lab_to_DIN99",

491 "XYZ_to_DIN99",

492]

493 __all__ += [

494 "HDR_CIELAB_METHODS",

495 "XYZ_to_hdr_CIELab",

496 "hdr_CIELab_to_XYZ",

497]

498 __all__ += [

499 "Hunter_Lab_to_XYZ",

500 "XYZ_to_Hunter_Lab",

501 "XYZ_to_K_ab_HunterLab1966",

502]

503 __all__ += [

504 "Hunter_Rdab_to_XYZ",

505 "XYZ_to_Hunter_Rdab",

506]

507 __all__ += [

508 "ICaCb_to_XYZ",

509 "XYZ_to_ICaCb",

510]

511 __all__ += [

512 "IgPgTg_to_XYZ",

513 "XYZ_to_IgPgTg",

514]

515 __all__ += [

516 "IPT_hue_angle",

517 "IPT_to_XYZ",

518 "XYZ_to_IPT",

519]

520 __all__ += [

521 "IZAZBZ_METHODS",

522 "Izazbz_to_XYZ",

523 "Jzazbz_to_XYZ",

524 "XYZ_to_Izazbz",

525 "XYZ_to_Jzazbz",

526]

527 __all__ += [

528 "HDR_IPT_METHODS",

529 "XYZ_to_hdr_IPT",

530 "hdr_IPT_to_XYZ",

531]

532 __all__ += [

533 "Oklab_to_XYZ",

534 "XYZ_to_Oklab",

535]

536 __all__ += [

537 "OSA_UCS_to_XYZ",

538 "XYZ_to_OSA_UCS",

539]

540 __all__ += [

541 "ProLab_to_XYZ",

542 "XYZ_to_ProLab",

543]

544 __all__ += [

545 "IPT_Ragoo2021_to_XYZ",

546 "XYZ_to_IPT_Ragoo2021",

547]

548 __all__ += [

549 "XYZ_to_sUCS",

550 "sUCS_chroma",

551 "sUCS_hue_angle",

552 "sUCS_Iab_to_sUCS_ICh",

553 "sUCS_ICh_to_sUCS_Iab",

554 "sUCS_to_XYZ",

555]

556 __all__ += [

557 "LMS_to_Yrg",

558 "XYZ_to_Yrg",

559 "Yrg_to_LMS",

560 "Yrg_to_XYZ",

561]

562 __all__ += [

563 "CCS_ILLUMINANT_POINTER_GAMUT",

564 "CCS_POINTER_GAMUT_BOUNDARY",

565 "DATA_MACADAM_1942_ELLIPSES",

566 "DATA_POINTER_GAMUT_VOLUME",

567]

568 __all__ += [

569 "BT2100_HLG_EOTF_INVERSE_METHODS",

570 "BT2100_HLG_EOTF_METHODS",

571 "BT2100_HLG_OOTF_INVERSE_METHODS",

572 "BT2100_HLG_OOTF_METHODS",

573 "CCTF_DECODINGS",

574 "CCTF_ENCODINGS",

575 "COLOUR_PRIMARIES_ITUTH273",

576 "EOTF_INVERSES",

577 "EOTFS",

578 "LOG3G10_DECODING_METHODS",

579 "LOG3G10_ENCODING_METHODS",

580 "LOG_DECODINGS",

581 "LOG_ENCODINGS",

582 "MATRIX_COEFFICIENTS_ITUTH273",

583 "OETF_INVERSES",

584 "OETFS",

585 "OOTF_INVERSES",

586 "OOTFS",

587 "RGB_COLOURSPACE_ACES2065_1",

588 "RGB_COLOURSPACE_ACESCC",

589 "RGB_COLOURSPACE_ACESCCT",

590 "RGB_COLOURSPACE_ACESCG",

591 "RGB_COLOURSPACE_ACESPROXY",

592 "RGB_COLOURSPACE_ADOBE_RGB1998",

593 "RGB_COLOURSPACE_ADOBE_WIDE_GAMUT_RGB",

594 "RGB_COLOURSPACE_APPLE_RGB",

595 "RGB_COLOURSPACE_ARRI_WIDE_GAMUT_3",

596 "RGB_COLOURSPACE_ARRI_WIDE_GAMUT_4",

597 "RGB_COLOURSPACE_BEST_RGB",

598 "RGB_COLOURSPACE_BETA_RGB",

599 "RGB_COLOURSPACE_BLACKMAGIC_WIDE_GAMUT",

600 "RGB_COLOURSPACE_BT470_525",

601 "RGB_COLOURSPACE_BT470_625",

602 "RGB_COLOURSPACE_BT709",

603 "RGB_COLOURSPACE_BT2020",

604 "RGB_COLOURSPACE_CIE_RGB",

605 "RGB_COLOURSPACE_CINEMA_GAMUT",

606 "RGB_COLOURSPACE_COLOR_MATCH_RGB",

607 "RGB_COLOURSPACE_DAVINCI_WIDE_GAMUT",

608 "RGB_COLOURSPACE_DCDM_XYZ",

609 "RGB_COLOURSPACE_DCI_P3",

610 "RGB_COLOURSPACE_DCI_P3_P",

611 "RGB_COLOURSPACE_DISPLAY_P3",

612 "RGB_COLOURSPACE_DJI_D_GAMUT",

613 "RGB_COLOURSPACE_DON_RGB_4",

614 "RGB_COLOURSPACE_DRAGON_COLOR",

615 "RGB_COLOURSPACE_DRAGON_COLOR_2",

616 "RGB_COLOURSPACE_EBU_3213_E",

617 "RGB_COLOURSPACE_ECI_RGB_V2",

618 "RGB_COLOURSPACE_EKTA_SPACE_PS_5",

619 "RGB_COLOURSPACE_ERIMM_RGB",

620 "RGB_COLOURSPACE_F_GAMUT",

621 "RGB_COLOURSPACE_F_GAMUT_C",

622 "RGB_COLOURSPACE_FILMLIGHT_E_GAMUT",

623 "RGB_COLOURSPACE_FILMLIGHT_E_GAMUT_2",

624 "RGB_COLOURSPACE_G18_REC709_SCENE",

625 "RGB_COLOURSPACE_G22_ADOBERGB_SCENE",

626 "RGB_COLOURSPACE_G22_AP1_SCENE",

627 "RGB_COLOURSPACE_G22_REC709_SCENE",

628 "RGB_COLOURSPACE_H273_22_UNSPECIFIED",

629 "RGB_COLOURSPACE_H273_GENERIC_FILM",

630 "RGB_COLOURSPACE_LIN_ADOBERGB_SCENE",

631 "RGB_COLOURSPACE_LIN_CIEXYZD65_SCENE",

632 "RGB_COLOURSPACE_LIN_P3D65_SCENE",

633 "RGB_COLOURSPACE_LIN_REC709_SCENE",

634 "RGB_COLOURSPACE_LIN_REC2020_SCENE",

635 "RGB_COLOURSPACE_MAX_RGB",

636 "RGB_COLOURSPACE_N_GAMUT",

637 "RGB_COLOURSPACE_NTSC1953",

638 "RGB_COLOURSPACE_NTSC1987",

639 "RGB_COLOURSPACE_P3_D65",

640 "RGB_COLOURSPACE_PAL_SECAM",

641 "RGB_COLOURSPACE_PLASA_ANSI_E154",

642 "RGB_COLOURSPACE_PROPHOTO_RGB",

643 "RGB_COLOURSPACE_PROTUNE_NATIVE",

644 "RGB_COLOURSPACE_RED_COLOR",

645 "RGB_COLOURSPACE_RED_COLOR_2",

646 "RGB_COLOURSPACE_RED_COLOR_3",

647 "RGB_COLOURSPACE_RED_COLOR_4",

648 "RGB_COLOURSPACE_RED_WIDE_GAMUT_RGB",

649 "RGB_COLOURSPACE_RIMM_RGB",

650 "RGB_COLOURSPACE_ROMM_RGB",

651 "RGB_COLOURSPACE_RUSSELL_RGB",

652 "RGB_COLOURSPACE_S_GAMUT",

653 "RGB_COLOURSPACE_S_GAMUT3",

654 "RGB_COLOURSPACE_S_GAMUT3_CINE",

655 "RGB_COLOURSPACE_SHARP_RGB",

656 "RGB_COLOURSPACE_SMPTE_240M",

657 "RGB_COLOURSPACE_SMPTE_C",

658 "RGB_COLOURSPACE_SRGB_AP1_SCENE",

659 "RGB_COLOURSPACE_SRGB_P3D65_SCENE",

660 "RGB_COLOURSPACE_SRGB_REC709_SCENE",

661 "RGB_COLOURSPACE_V_GAMUT",

662 "RGB_COLOURSPACE_VENICE_S_GAMUT3",

663 "RGB_COLOURSPACE_VENICE_S_GAMUT3_CINE",

664 "RGB_COLOURSPACE_XTREME_RGB",

665 "RGB_COLOURSPACES",

666 "RGB_COLOURSPACES_TEXTURE_ASSETS_AND_CG_RENDERING_CIF",

667 "TRANSFER_CHARACTERISTICS_ITUTH273",

668 "WEIGHTS_YCBCR",

669 "CMY_to_CMYK",

670 "CMY_to_RGB",

671 "CMYK_to_CMY",

672 "CV_range",

673 "HCL_to_RGB",

674 "HSL_to_RGB",

675 "HSV_to_RGB",

676 "ICtCp_to_RGB",

677 "ICtCp_to_XYZ",

678 "IHLS_to_RGB",

679 "Prismatic_to_RGB",

680 "RGB_Colourspace",

681 "RGB_COLOURSPACE_sRGB",

682 "RGB_luminance",

683 "RGB_luminance_equation",

684 "RGB_to_CMY",

685 "RGB_to_HCL",

686 "RGB_to_HSL",

687 "RGB_to_HSV",

688 "RGB_to_ICtCp",

689 "RGB_to_IHLS",

690 "RGB_to_Prismatic",

691 "RGB_to_RGB",

692 "RGB_to_XYZ",

693 "RGB_to_YCbCr",

694 "RGB_to_YcCbcCrc",

695 "RGB_to_YCoCg",

696 "XYZ_to_ICtCp",

697 "XYZ_to_RGB",

698 "XYZ_to_sRGB",

699 "YCbCr_to_RGB",

700 "YcCbcCrc_to_RGB",

701 "YCoCg_to_RGB",

702 "cctf_decoding",

703 "cctf_decoding_ProPhotoRGB",

704 "cctf_decoding_RIMMRGB",

705 "cctf_decoding_ROMMRGB",

706 "cctf_encoding",

707 "cctf_encoding_ProPhotoRGB",

708 "cctf_encoding_RIMMRGB",

709 "cctf_encoding_ROMMRGB",

710 "chromatically_adapted_primaries",

711 "describe_video_signal_colour_primaries",

712 "describe_video_signal_matrix_coefficients",

713 "describe_video_signal_transfer_characteristics",

714 "eotf",

715 "eotf_BT1886",

716 "eotf_BT2100_HLG",

717 "eotf_BT2100_PQ",

718 "eotf_DCDM",

719 "eotf_DICOMGSDF",

720 "eotf_H273_ST428_1",

721 "eotf_inverse",

722 "eotf_inverse_BT1886",

723 "eotf_inverse_BT2100_HLG",

724 "eotf_inverse_BT2100_PQ",

725 "eotf_inverse_DCDM",

726 "eotf_inverse_DICOMGSDF",

727 "eotf_inverse_H273_ST428_1",

728 "eotf_inverse_sRGB",

729 "eotf_inverse_ST2084",

730 "eotf_SMPTE240M",

731 "eotf_sRGB",

732 "eotf_ST2084",

733 "exponent_function_basic",

734 "exponent_function_monitor_curve",

735 "full_to_legal",

736 "gamma_function",

737 "legal_to_full",

738 "linear_function",

739 "log_decoding",

740 "log_decoding_ACEScc",

741 "log_decoding_ACEScct",

742 "log_decoding_ACESproxy",

743 "log_decoding_AppleLogProfile",

744 "log_decoding_ARRILogC3",

745 "log_decoding_ARRILogC4",

746 "log_decoding_CanonLog",

747 "log_decoding_CanonLog2",

748 "log_decoding_CanonLog3",

749 "log_decoding_Cineon",

750 "log_decoding_DJIDLog",

751 "log_decoding_ERIMMRGB",

752 "log_decoding_FilmicPro6",

753 "log_decoding_FilmLightTLog",

754 "log_decoding_FLog",

755 "log_decoding_FLog2",

756 "log_decoding_LLog",

757 "log_decoding_Log2",

758 "log_decoding_Log3G10",

759 "log_decoding_Log3G12",

760 "log_decoding_MiLog",

761 "log_decoding_NLog",

762 "log_decoding_Panalog",

763 "log_decoding_PivotedLog",

764 "log_decoding_Protune",

765 "log_decoding_REDLog",

766 "log_decoding_REDLogFilm",

767 "log_decoding_SLog",

768 "log_decoding_SLog2",

769 "log_decoding_SLog3",

770 "log_decoding_ViperLog",

771 "log_decoding_VLog",

772 "log_encoding",

773 "log_encoding_ACEScc",

774 "log_encoding_ACEScct",

775 "log_encoding_ACESproxy",

776 "log_encoding_AppleLogProfile",

777 "log_encoding_ARRILogC3",

778 "log_encoding_ARRILogC4",

779 "log_encoding_CanonLog",

780 "log_encoding_CanonLog2",

781 "log_encoding_CanonLog3",

782 "log_encoding_Cineon",

783 "log_encoding_DJIDLog",

784 "log_encoding_ERIMMRGB",

785 "log_encoding_FilmicPro6",

786 "log_encoding_FilmLightTLog",

787 "log_encoding_FLog",

788 "log_encoding_FLog2",

789 "log_encoding_LLog",

790 "log_encoding_Log2",

791 "log_encoding_Log3G10",

792 "log_encoding_Log3G12",

793 "log_encoding_MiLog",

794 "log_encoding_NLog",

795 "log_encoding_Panalog",

796 "log_encoding_PivotedLog",

797 "log_encoding_Protune",

798 "log_encoding_REDLog",

799 "log_encoding_REDLogFilm",

800 "log_encoding_SLog",

801 "log_encoding_SLog2",

802 "log_encoding_SLog3",

803 "log_encoding_ViperLog",

804 "log_encoding_VLog",

805 "logarithmic_function_basic",

806 "logarithmic_function_camera",

807 "logarithmic_function_quasilog",

808 "matrix_RGB_to_RGB",

809 "matrix_YCbCr",

810 "normalised_primary_matrix",

811 "oetf",

812 "oetf_ARIBSTDB67",

813 "oetf_BlackmagicFilmGeneration5",

814 "oetf_BT601",

815 "oetf_BT709",

816 "oetf_BT1361",

817 "oetf_BT2020",

818 "oetf_BT2100_HLG",

819 "oetf_BT2100_PQ",

820 "oetf_DaVinciIntermediate",

821 "oetf_H273_IEC61966_2",

822 "oetf_H273_Log",

823 "oetf_H273_LogSqrt",

824 "oetf_inverse",

825 "oetf_inverse_ARIBSTDB67",

826 "oetf_inverse_BlackmagicFilmGeneration5",

827 "oetf_inverse_BT601",

828 "oetf_inverse_BT709",

829 "oetf_inverse_BT1361",

830 "oetf_inverse_BT2020",

831 "oetf_inverse_BT2100_HLG",

832 "oetf_inverse_BT2100_PQ",

833 "oetf_inverse_DaVinciIntermediate",

834 "oetf_inverse_H273_IEC61966_2",

835 "oetf_inverse_H273_Log",

836 "oetf_inverse_H273_LogSqrt",

837 "oetf_SMPTE240M",

838 "offset_YCbCr",

839 "ootf",

840 "ootf_BT2100_HLG",

841 "ootf_BT2100_PQ",

842 "ootf_inverse",

843 "ootf_inverse_BT2100_HLG",

844 "ootf_inverse_BT2100_PQ",

845 "primaries_whitepoint",

846 "sRGB_to_XYZ",

847]

848

849# Programmatically defining the colourspace models polar conversions.

850 COLOURSPACE_MODELS_POLAR_CONVERSIONS = (

851 ("hdr_CIELab", "hdr_CIELCHab"),

852 ("hdr_IPT", "hdr_ICH"),

853 ("Hunter_Lab", "Hunter_LCHab"),

854 ("Hunter_Rdab", "Hunter_RdCHab"),

855 ("ICaCb", "ICHab"),

856 ("ICtCp", "ICHtp"),

857 ("IPT", "ICH"),

858 ("IPT_Ragoo2021", "ICH_Ragoo2021"),

859 ("IgPgTg", "IgCHpt"),

860 ("Izazbz", "IzCHab"),

861 ("Jzazbz", "JzCHab"),

862 ("Lab", "LCHab"),

863 ("Luv", "LCHuv"),

864 ("Oklab", "Oklch"),

865 ("ProLab", "ProLCHab"),

866 ("sUCS", "sUCSICH"),

867)

868

869 _DOCSTRING_JAB_TO_JCH = """

870 Convert from *{Jab}* colourspace to *{JCh}* colourspace.

871

872 This is a convenient definition wrapping :func:`colour.models.Jab_to_JCh`

873 definition.

874

875 Parameters

876----------

877 Jab

878 *{Jab}* colourspace array.

879

880 Returns

881-------

882:class:`numpy.ndarray`

883 *{JCh}* colourspace array.

884"""

885

886 _DOCSTRING_JCH_TO_JAB = """

887 Convert from *{JCh}* colourspace to *{Jab}* colourspace.

888

889 This is a convenient definition wrapping :func:`colour.models.JCh_to_Jab`

890 definition.

891

892 Parameters

893----------

894 JCh

895 *{JCh}* colourspace array.

896

897 Returns

898-------

899:class:`numpy.ndarray`

900 *{Jab}* colourspace array.

901"""

902

903 for _Jab, _JCh in COLOURSPACE_MODELS_POLAR_CONVERSIONS:

904 # Derive the correct annotation scale from the source model's XYZ_to_Jab function

905 _scale = 1 # Default scale for most models

906 _XYZ_to_Jab_name = f"XYZ_to_{_Jab}"

907 _module = sys.modules["colour.models"]

908

909 if hasattr(_module, _XYZ_to_Jab_name):

910 _XYZ_to_Jab_callable = getattr(_module, _XYZ_to_Jab_name)

911 _metadata = get_domain_range_scale_metadata(_XYZ_to_Jab_callable)

912 _range_scale = _metadata.get("range")

913

914 # If the source model uses scale 100, the polar form should too

915 if _range_scale == 100:

916 _scale = 100

917

918 # Create Jab_to_JCh wrapper with correct annotation

919 name = f"{_Jab}_to_{_JCh}"

920 _callable = copy_definition(Jab_to_JCh, name)

921 _callable.__doc__ = _DOCSTRING_JAB_TO_JCH.format(Jab=_Jab, JCh=_JCh)

922 # Update the return annotation with the derived scale

923 _callable.__annotations__["return"] = Annotated[NDArrayFloat, (_scale, _scale, 360)]

924 setattr(_module, name, _callable)

925 __all__.append(name)

926

927 # Create JCh_to_Jab wrapper with correct annotation

928 name = f"{_JCh}_to_{_Jab}"

929 _callable = copy_definition(JCh_to_Jab, name)

930 _callable.__doc__ = _DOCSTRING_JCH_TO_JAB.format(JCh=_JCh, Jab=_Jab)

931 # Update the parameter annotation with the derived scale

932 _parameter = next(iter(_callable.__annotations__.keys()))

933 _callable.__annotations__[_parameter] = Annotated[

934 NDArrayFloat, (_scale, _scale, 360)

935 ]

936 setattr(_module, name, _callable)

937 __all__.append(name)

938

939 del (

940 _DOCSTRING_JAB_TO_JCH,

941 _DOCSTRING_JCH_TO_JAB,

942 _JCh,

943 _Jab,

944 _callable,

945 _module,

946 _scale,

947 _XYZ_to_Jab_name,

948 _metadata,

949 _range_scale,

950 _XYZ_to_Jab_callable,

951 _parameter,

952)

953

954 __all__ += ["COLOURSPACE_MODELS_POLAR"]