1 /*
2    Copyright 2016 Dejan D. M. Milosavljevic
3 
4    Licensed under the Apache License, Version 2.0 (the "License");
5    you may not use this file except in compliance with the License.
6    You may obtain a copy of the License at
7 
8        http://www.apache.org/licenses/LICENSE-2.0
9 
10    Unless required by applicable law or agreed to in writing, software
11    distributed under the License is distributed on an "AS IS" BASIS,
12    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    See the License for the specific language governing permissions and
14    limitations under the License.
15 */
16 /*
17  Project Name: Color
18  Description: Handle and play with color(s)
19  Source: http://github.com/dmilos/color
20 */
21 namespace color {
22 namespace akin {
23 
24 template< typename category_name >
25 struct gray {
26 	typedef category_name category_type;
27 	typedef void akin_type;
28 };
29 
30 }
31 }
32 
33 namespace color {
34 namespace akin {
35 
36 template< typename category_name >
37 struct cmy {
38 	typedef category_name category_type;
39 	typedef void akin_type;
40 };
41 
42 }
43 }
44 
45 namespace color {
46 namespace akin {
47 
48 template< typename category_name >
49 struct cmyk {
50 	typedef category_name category_type;
51 	typedef void akin_type;
52 };
53 
54 }
55 }
56 
57 namespace color {
58 namespace akin {
59 
60 template< typename category_name >
61 struct hsl {
62 	typedef category_name category_type;
63 	typedef void akin_type;
64 };
65 
66 }
67 }
68 
69 namespace color {
70 namespace akin {
71 
72 template< typename category_name >
73 struct hsv {
74 	typedef category_name category_type;
75 	typedef void akin_type;
76 };
77 
78 }
79 }
80 
81 namespace color {
82 namespace akin {
83 
84 template< typename category_name >
85 struct hsi {
86 	typedef category_name category_type;
87 	typedef void akin_type;
88 };
89 
90 }
91 }
92 
93 namespace color {
94 namespace akin {
95 
96 template
97 <
98 	typename category_name
99 
100 	>
101 struct hwb {
102 	typedef category_name category_type;
103 	typedef void akin_type;
104 };
105 
106 }
107 }
108 
109 namespace color {
110 namespace akin {
111 
112 template< typename category_name >
113 struct rgb {
114 	typedef category_name category_type;
115 	typedef void akin_type;
116 };
117 
118 }
119 }
120 
121 namespace color {
122 namespace akin {
123 
124 template< typename category_name >
125 struct yiq {
126 	typedef category_name category_type;
127 	typedef void akin_type;
128 };
129 
130 }
131 }
132 
133 namespace color {
134 namespace constant {
135 namespace yuv {
136 
137 enum reference_enum {
138 	error_entity
139 	,BT_601_entity
140 	,BT_709_entity
141 
142 };
143 
144 }
145 }
146 }
147 
148 namespace color {
149 namespace akin {
150 
151 template< typename category_name, ::color::constant::yuv::reference_enum reference_number >
152 struct yuv {
153 	typedef category_name category_type;
154 	typedef void akin_type;
155 };
156 
157 }
158 }
159 
160 namespace color {
161 namespace akin {
162 
163 template< typename category_name >
164 struct YCgCo {
165 	typedef category_name category_type;
166 	typedef void akin_type;
167 };
168 
169 }
170 }
171 
172 namespace color {
173 namespace akin {
174 
175 template< typename category_name >
176 struct YDbDr {
177 	typedef category_name category_type;
178 	typedef void akin_type;
179 };
180 
181 }
182 }
183 
184 namespace color {
185 namespace constant {
186 namespace YPbPr {
187 
188 enum reference_enum {
189 	error_entity
190 	,BT_601_entity
191 	,BT_709_entity
192 	,BT_2020_entity
193 };
194 
195 }
196 }
197 }
198 
199 namespace color {
200 namespace akin {
201 
202 template< typename category_name, ::color::constant::YPbPr::reference_enum reference_number >
203 struct YPbPr {
204 	typedef category_name category_type;
205 	typedef void akin_type;
206 };
207 
208 }
209 }
210 
211 namespace color {
212 namespace akin {
213 
214 template< typename category_name >
215 struct xyz {
216 	typedef category_name category_type;
217 	typedef void akin_type;
218 };
219 
220 }
221 }
222 
223 namespace color {
224 namespace constant {
225 namespace lab {
226 
227 enum reference_enum {
228 	error_entity
229 	,CIE_entity
230 	,Hunter_entity
231 };
232 
233 }
234 }
235 }
236 
237 namespace color {
238 namespace akin {
239 
240 template
241 <
242 	typename category_name
243 	,::color::constant::lab::reference_enum lab_reference_number
244 	>
245 struct lab {
246 	typedef category_name category_type;
247 	typedef void akin_type;
248 };
249 
250 }
251 }
252 
253 namespace color {
254 namespace akin {
255 
256 template< typename category_name >
257 struct xyy {
258 	typedef category_name category_type;
259 	typedef void akin_type;
260 };
261 
262 }
263 }
264 
265 namespace color {
266 namespace constant {
267 namespace lms {
268 
269 enum reference_enum {
270 	error_entity
271 	,von_Kries_D65_entity
272 	,von_Kries_E_entity
273 	,BFD_entity
274 	,MCAT02_entity
275 };
276 
277 }
278 }
279 }
280 
281 namespace color {
282 namespace akin {
283 
284 template
285 <
286 	typename category_name
287 	,::color::constant::lms::reference_enum lms_reference_number
288 	>
289 struct lms {
290 	typedef category_name category_type;
291 	typedef void akin_type;
292 };
293 
294 }
295 }
296 
297 namespace color {
298 namespace akin {
299 
300 template< typename category_name >
301 struct luv {
302 	typedef category_name category_type;
303 	typedef void akin_type;
304 };
305 
306 }
307 }
308 
309 namespace color {
310 namespace akin {
311 
312 template< typename category_name >
313 struct LabCH {
314 	typedef category_name category_type;
315 	typedef void akin_type;
316 };
317 
318 }
319 }
320 
321 namespace color {
322 namespace akin {
323 
324 template< typename category_name >
325 struct LuvCH {
326 	typedef category_name category_type;
327 	typedef void akin_type;
328 };
329 
330 }
331 }
332 
333 namespace color {
334 namespace _internal {
335 namespace utility {
336 namespace type {
337 
338 template < typename type_name >
339 struct traitC {
340 public:
341 	typedef type_name instance_type;
342 
343 	typedef type_name const const_type, instance_const_type;
344 
345 	typedef instance_type & original_type;
346 
347 	typedef instance_type * pointer_type;
348 	typedef instance_type const* pointer_const_type;
349 
350 	typedef instance_type const& return_image_type, image_type;
351 	typedef instance_type return_type, pretender_type;
352 	typedef original_type return_original_type;
353 
354 	typedef instance_type const& model_type;
355 	typedef instance_type input_type;
356 	typedef instance_type & output_type;
357 	typedef instance_type & transmit_type;
358 
359 	typedef model_type param_model_type;
360 	typedef instance_type param_input_type;
361 	typedef output_type param_output_type;
362 	typedef transmit_type param_transmit_type;
363 	typedef original_type param_original_type;
364 };
365 
366 }
367 }
368 }
369 }
370 
371 namespace color {
372 namespace _internal {
373 namespace utility {
374 namespace type {
375 
376 template< typename index_name >
377 struct index
378 	: public ::color::_internal::utility::type::traitC< index_name > {
379 };
380 
381 }
382 }
383 }
384 }
385 
386 namespace color {
387 namespace trait {
388 
389 template< typename category_name >
390 struct index
391 	: public ::color::_internal::utility::type::index< std::size_t > {
392 public:
393 
394 	typedef ::color::_internal::utility::type::index< std::size_t > utility_type;
395 
396 	typedef typename utility_type::instance_type instance_type;
397 
398 	typedef typename utility_type::const_type const_type, instance_const_type;
399 
400 	typedef typename utility_type::return_image_type return_image_type;
401 	typedef typename utility_type::return_original_type return_original_type;
402 
403 	typedef typename utility_type::model_type model_type;
404 	typedef typename utility_type::input_type input_type;
405 	typedef typename utility_type::output_type output_type;
406 };
407 
408 }
409 }
410 
411 namespace color {
412 namespace _internal {
413 namespace utility {
414 namespace type {
415 
416 template< typename size_name >
417 struct size
418 	: public ::color::_internal::utility::type::traitC< size_name > {
419 };
420 
421 }
422 }
423 }
424 }
425 
426 namespace color {
427 namespace trait {
428 
429 template< typename category_name >
430 struct size
431 	: public ::color::_internal::utility::type::size< std::size_t > {
432 public:
433 
434 	typedef ::color::_internal::utility::type::size< std::size_t > utility_type;
435 
436 	typedef typename utility_type::instance_type instance_type;
437 
438 	typedef typename utility_type::const_type const_type;
439 
440 	typedef typename utility_type::return_image_type return_image_type;
441 	typedef typename utility_type::return_original_type return_original_type;
442 
443 	typedef typename utility_type::model_type model_type;
444 	typedef typename utility_type::input_type input_type;
445 	typedef typename utility_type::output_type output_type;
446 };
447 
448 }
449 }
450 
451 namespace color {
452 namespace trait {
453 
454 template< typename category_name, unsigned index_size = 0 >
455 struct component {
456 public:
457 	typedef unsigned char instance_type;
458 	typedef instance_type const const_type;
459 
460 	typedef instance_type const return_image_type;
461 	typedef instance_type return_type;
462 	typedef instance_type const& return_original_type;
463 
464 	typedef instance_type const& model_type;
465 	typedef instance_type & input_type;
466 
467 	typedef instance_type const* pointer_const_type;
468 	typedef instance_type * pointer_type;
469 
470 };
471 
472 }
473 }
474 
475 namespace color {
476 namespace trait {
477 
478 template< typename category_name >
479 struct container {
480 public:
481 	typedef unsigned int instance_type;
482 
483 	typedef ::color::trait::container< category_name > this_type;
484 
485 	typedef instance_type const const_type;
486 
487 	typedef instance_type const return_image_type;
488 	typedef instance_type & return_type;
489 	typedef instance_type & return_original_type;
490 
491 	typedef instance_type const& model_type;
492 	typedef instance_type & input_type;
493 	typedef instance_type & output_type, param_output_type;
494 
495 	typedef ::color::trait::index< category_name > index_trait_type;
496 	typedef typename index_trait_type::instance_type index_instance_type;
497 	typedef typename index_trait_type::const_type index_const_type;
498 	typedef typename index_trait_type::model_type index_input_const_type;
499 	typedef typename index_trait_type::return_image_type index_return_image_type;
500 
501 	typedef ::color::trait::component< category_name > component_trait_type;
502 	typedef typename component_trait_type::const_type component_const_type;
503 	typedef typename component_trait_type::return_image_type component_return_const_type;
504 	typedef typename component_trait_type::model_type component_input_const_type;
505 	typedef typename component_trait_type::instance_type component_type;
506 
507 	typedef ::color::trait::size< category_name > size_trait_type;
508 	typedef typename size_trait_type::return_image_type size_return_image_type;
509 	typedef typename size_trait_type::instance_type size_instance_type;
510 
511 	typedef void set_return_type;
512 
513 	enum { size_entity = 4 };
514 
initcolor::trait::container515 	static set_return_type init(input_type container, index_input_const_type index, component_input_const_type value) {
516 		this_type::set(container, index, value);
517 	}
518 
519 	template< index_instance_type index >
initcolor::trait::container520 	static set_return_type init(input_type container, component_input_const_type value) {
521 		this_type:: template set<index>(container, value);
522 	}
523 
getcolor::trait::container524 	static component_return_const_type get(model_type container, index_input_const_type index) {
525 		return (component_type)((container >> (index << 3)) & 0xFF);
526 	}
527 
528 	template< index_instance_type index >
getcolor::trait::container529 	static component_return_const_type get(model_type container) {
530 		return (component_type)((container >> (index << 3)) & 0xFF);
531 	}
532 
setcolor::trait::container533 	static set_return_type set(input_type container, index_input_const_type index, component_input_const_type value) {
534 		container = (container & ~(0xFF << (index << 3))) | (((instance_type)value) << (index << 3));
535 	}
536 
537 	template< index_instance_type index >
setcolor::trait::container538 	static set_return_type set(input_type container, component_input_const_type value) {
539 		container = (container & ~(0xFF << (index << 3))) | (((instance_type)value) << (index << 3));
540 	}
541 
sizecolor::trait::container542 	static size_return_image_type size() {
543 		static size_instance_type length = 4;
544 		return length;
545 	}
546 };
547 
548 }
549 }
550 
551 namespace color {
552 namespace _internal {
553 namespace utility {
554 namespace type {
555 
556 template < typename number_name, typename image_name = number_name const& >
557 struct bound {
558 public:
559 	typedef number_name number_type;
560 	typedef image_name image_type;
561 
maximumcolor::_internal::utility::type::bound562 	static image_type maximum() {
563 		static const number_type value=0;
564 		return value;
565 	}
566 
minimumcolor::_internal::utility::type::bound567 	static image_type minimum() {
568 		static const number_type value=0;
569 		return value;
570 	}
571 
rangecolor::_internal::utility::type::bound572 	static image_type range() {
573 		static const number_type value = 0;
574 		return value;
575 	}
576 };
577 
578 template <>
579 struct bound<bool, bool const& > {
580 	typedef bool number_type;
581 	typedef bool const& image_type;
582 
583 	typedef bound<number_type,image_type> this_type;
584 
maximumcolor::_internal::utility::type::bound585 	static image_type maximum() {
586 		static const number_type value = true;
587 		return value;
588 	}
589 
minimumcolor::_internal::utility::type::bound590 	static image_type minimum() {
591 		static const number_type value = false;
592 		return value;
593 	}
594 
rangecolor::_internal::utility::type::bound595 	static image_type range() {
596 		static const number_type value = true ;
597 		return value;
598 	}
599 };
600 
601 template <>
602 struct bound< std::int8_t, std::int8_t const& > {
603 	typedef std::int8_t number_type;
604 	typedef std::int8_t const& image_type;
605 	typedef std::uint8_t range_type;
606 
607 	typedef bound<number_type,image_type> this_type;
608 
maximumcolor::_internal::utility::type::bound609 	static image_type maximum() {
610 		static const number_type value = std::numeric_limits< number_type >::max();
611 		return value;
612 	}
613 
minimumcolor::_internal::utility::type::bound614 	static image_type minimum() {
615 		static const number_type value = std::numeric_limits< number_type >::min();
616 		return value;
617 	}
618 
rangecolor::_internal::utility::type::bound619 	static range_type range() {
620 		static const number_type value = this_type::maximum() - this_type::minimum();
621 		return value;
622 	}
623 };
624 
625 template <>
626 struct bound<std::int16_t, std::int16_t const& > {
627 	typedef std::int16_t number_type;
628 	typedef std::int16_t const& image_type;
629 	typedef std::uint16_t range_type;
630 
631 	typedef bound<number_type,image_type> this_type;
632 
maximumcolor::_internal::utility::type::bound633 	static image_type maximum() {
634 		static const number_type value = std::numeric_limits< number_type >::max();
635 		return value;
636 	}
637 
minimumcolor::_internal::utility::type::bound638 	static image_type minimum() {
639 		static const number_type value = std::numeric_limits< number_type >::min();
640 		return value;
641 	}
642 
rangecolor::_internal::utility::type::bound643 	static image_type range() {
644 		static const number_type value = number_type(this_type::maximum()) - number_type(this_type::minimum());
645 		return value;
646 	}
647 };
648 
649 template <>
650 struct bound<std::int32_t, std::int32_t const& > {
651 	typedef std::int32_t number_type;
652 	typedef std::int32_t const& image_type;
653 	typedef std::uint32_t range_type;
654 
655 	typedef bound<number_type,image_type> this_type;
656 
maximumcolor::_internal::utility::type::bound657 	static image_type maximum() {
658 		static const number_type value = std::numeric_limits< number_type >::max();
659 		return value;
660 	}
661 
minimumcolor::_internal::utility::type::bound662 	static image_type minimum() {
663 		static const number_type value = std::numeric_limits< number_type>::min();
664 		return value;
665 	}
666 
rangecolor::_internal::utility::type::bound667 	static range_type range() {
668 		static const range_type value = number_type(this_type::maximum()) - number_type(this_type::minimum());
669 		return value;
670 	}
671 };
672 
673 template <>
674 struct bound<std::int64_t, std::int64_t const& > {
675 	typedef std::int64_t number_type;
676 	typedef std::int64_t const& image_type;
677 	typedef std::uint64_t range_type;
678 
679 	typedef bound<number_type,image_type> this_type;
680 
maximumcolor::_internal::utility::type::bound681 	static image_type maximum() {
682 		static const number_type value = std::numeric_limits< number_type >::max();
683 		return value;
684 	}
685 
minimumcolor::_internal::utility::type::bound686 	static image_type minimum() {
687 		static const number_type value = std::numeric_limits< number_type >::min();
688 		return value;
689 	}
690 
rangecolor::_internal::utility::type::bound691 	static range_type range() {
692 		static const range_type value = number_type(this_type::maximum()) - number_type(this_type::minimum());
693 		return value;
694 	}
695 };
696 
697 template <>
698 struct bound< std::uint8_t, std::uint8_t const& > {
699 	typedef std::uint8_t number_type;
700 	typedef std::uint8_t const& image_type;
701 
702 	typedef bound<number_type,image_type> this_type;
703 
maximumcolor::_internal::utility::type::bound704 	static image_type maximum() {
705 		static const number_type value = 255;
706 		return value;
707 	}
708 
minimumcolor::_internal::utility::type::bound709 	static image_type minimum() {
710 		static const number_type value = 0;
711 		return value;
712 	}
713 
rangecolor::_internal::utility::type::bound714 	static image_type range() {
715 		static const number_type value = this_type::maximum() - this_type::minimum();
716 		return value;
717 	}
718 };
719 
720 template <>
721 struct bound<std::uint16_t, std::uint16_t const& > {
722 	typedef std::uint16_t number_type;
723 	typedef std::uint16_t const& image_type;
724 
725 	typedef bound<number_type,image_type> this_type;
726 
maximumcolor::_internal::utility::type::bound727 	static image_type maximum() {
728 		static const number_type value = 0xFFFF;
729 		return value;
730 	}
731 
minimumcolor::_internal::utility::type::bound732 	static image_type minimum() {
733 		static const number_type value = 0;
734 		return value;
735 	}
736 
rangecolor::_internal::utility::type::bound737 	static image_type range() {
738 		static const number_type value = this_type::maximum() - this_type::minimum();
739 		return value;
740 	}
741 };
742 
743 template <>
744 struct bound<std::uint32_t, std::uint32_t const& > {
745 	typedef std::uint32_t number_type;
746 	typedef std::uint32_t const& image_type;
747 
748 	typedef bound<number_type,image_type> this_type;
749 
maximumcolor::_internal::utility::type::bound750 	static image_type maximum() {
751 		static const number_type value = 0xFFFFFFFF;
752 		return value;
753 	}
754 
minimumcolor::_internal::utility::type::bound755 	static image_type minimum() {
756 		static const number_type value = 0;
757 		return value;
758 	}
759 
rangecolor::_internal::utility::type::bound760 	static image_type range() {
761 		static const number_type value = this_type::maximum() - this_type::minimum();
762 		return value;
763 	}
764 };
765 
766 template <>
767 struct bound<std::uint64_t, std::uint64_t const& > {
768 	typedef std::uint64_t number_type;
769 	typedef std::uint64_t const& image_type;
770 
771 	typedef bound<number_type,image_type> this_type;
772 
maximumcolor::_internal::utility::type::bound773 	static image_type maximum() {
774 		static const number_type value = 0xFFFFFFFFFFFFFFFFu;
775 		return value;
776 	}
777 
minimumcolor::_internal::utility::type::bound778 	static image_type minimum() {
779 		static const number_type value = 0;
780 		return value;
781 	}
782 
rangecolor::_internal::utility::type::bound783 	static image_type range() {
784 		static const number_type value = this_type::maximum() - this_type::minimum();
785 		return value;
786 	}
787 };
788 
789 template <>
790 struct bound<float, float const& > {
791 	typedef float number_type;
792 	typedef float const& image_type;
793 
794 	typedef bound<number_type,image_type> this_type;
795 
maximumcolor::_internal::utility::type::bound796 	static image_type maximum() {
797 		static const number_type value=1;
798 		return value;
799 	}
800 
minimumcolor::_internal::utility::type::bound801 	static image_type minimum() {
802 		static const number_type value=0;
803 		return value;
804 	}
805 
rangecolor::_internal::utility::type::bound806 	static image_type range() {
807 		static const number_type value = this_type::maximum() - this_type::minimum();
808 		return value;
809 	}
810 };
811 
812 template <>
813 struct bound<double, double const& > {
814 	typedef double number_type;
815 	typedef double const& image_type;
816 
817 	typedef bound<number_type,image_type> this_type;
818 
maximumcolor::_internal::utility::type::bound819 	static image_type maximum() {
820 		static const number_type value=1;
821 		return value;
822 	}
823 
minimumcolor::_internal::utility::type::bound824 	static image_type minimum() {
825 		static const number_type value=0;
826 		return value;
827 	}
828 
rangecolor::_internal::utility::type::bound829 	static image_type range() {
830 		static const number_type value = this_type::maximum() - this_type::minimum();
831 		return value;
832 	}
833 };
834 
835 template <>
836 struct bound<long double, long double const& > {
837 	typedef long double number_type;
838 	typedef long double const& image_type;
839 
840 	typedef bound<number_type,image_type> this_type;
841 
maximumcolor::_internal::utility::type::bound842 	static image_type maximum() {
843 		static const number_type value = 1;
844 		return value;
845 	}
846 
minimumcolor::_internal::utility::type::bound847 	static image_type minimum() {
848 		static const number_type value = 0;
849 		return value;
850 	}
851 
rangecolor::_internal::utility::type::bound852 	static image_type range() {
853 		static const number_type value = this_type::maximum() - this_type::minimum();
854 		return value;
855 	}
856 
857 };
858 
859 }
860 }
861 }
862 }
863 
864 namespace color {
865 namespace _internal {
866 namespace utility {
867 namespace bound {
868 
869 template< typename value_name, typename index_name >
870 struct general {
871 public:
872 	typedef value_name value_type;
873 	typedef index_name index_type;
874 
875 	typedef ::color::_internal::utility::type::traitC< value_name > component_trait_type;
876 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
877 
878 	typedef typename component_trait_type::instance_type component_instance_type;
879 	typedef typename component_trait_type::return_image_type component_return_const_type;
880 
881 	typedef typename index_trait_type::instance_type index_instance_type;
882 	typedef typename index_trait_type::model_type index_input_const_type;
883 
884 	typedef ::color::_internal::utility::type::bound< component_instance_type, component_return_const_type > bound_type;
885 
886 	template< index_instance_type index >
maximumcolor::_internal::utility::bound::general887 	static component_return_const_type maximum() {
888 		static const component_instance_type component = bound_type::maximum();
889 		return component;
890 	}
891 
maximumcolor::_internal::utility::bound::general892 	static component_return_const_type maximum(index_input_const_type index) {
893 		static const component_instance_type component = bound_type::maximum();
894 		return component;
895 	}
896 
897 	template< index_instance_type index >
minimumcolor::_internal::utility::bound::general898 	static component_return_const_type minimum() {
899 		static const component_instance_type component = bound_type::minimum();
900 		return component;
901 	}
902 
minimumcolor::_internal::utility::bound::general903 	static component_return_const_type minimum(index_input_const_type index) {
904 		static const component_instance_type component = bound_type::minimum();
905 		return component;
906 	}
907 
908 	template< index_instance_type index >
rangecolor::_internal::utility::bound::general909 	static component_return_const_type range() {
910 		static const component_instance_type component = bound_type::range();
911 		return component;
912 	}
913 
rangecolor::_internal::utility::bound::general914 	static component_return_const_type range(index_input_const_type index) {
915 		static const component_instance_type component = bound_type::range();
916 		return component;
917 	}
918 };
919 
920 }
921 }
922 }
923 }
924 
925 namespace color {
926 
927 namespace trait {
928 template< typename category_name >
929 struct bound
930 	: public ::color::_internal::utility::bound::general
931 	  <
932 	  typename ::color::trait::component< category_name >::instance_type
933 	,typename ::color::trait::index< category_name >::instance_type
934 	  > {
935 public:
936 	typedef category_name category_type;
937 
938 	typedef ::color::trait::component< category_name > component_trait_type;
939 	typedef ::color::trait::index< category_name > index_trait_type;
940 
941 	typedef typename component_trait_type::instance_type component_instance_type;
942 	typedef typename index_trait_type::instance_type index_instance_type;
943 
944 	typedef ::color::_internal::utility::bound::general<component_instance_type, index_instance_type > general_type;
945 
946 	using general_type::minimum;
947 	using general_type::maximum;
948 	using general_type::range;
949 
950 };
951 
952 }
953 }
954 
955 namespace color {
956 namespace trait {
957 
958 template< typename category_name >
959 struct scalar
960 	: public ::color::_internal::utility::type::traitC< long double > {
961 public:
962 	typedef long double instance_type;
963 
is_smallcolor::trait::scalar964 	static bool is_small(instance_type const& value) {
965 		return (-1e-6 < value) && (value < 1e-6);
966 	}
967 };
968 
969 }
970 }
971 
972 namespace color {
973 namespace _internal {
974 
975 template< typename category_name >
976 struct diverse {
977 public:
978 	typedef typename ::color::trait::scalar<category_name>::instance_type scalar_type;
979 	typedef ::color::trait::bound< category_name > bound_trait_type;
980 	typedef ::color::trait::component< category_name > component_trait_type;
981 	typedef ::color::trait::index< category_name > index_trait_type;
982 
983 	typedef typename component_trait_type::instance_type component_instance_type;
984 	typedef typename component_trait_type::return_type component_return_type;
985 
986 	typedef typename index_trait_type::instance_type index_instance_type;
987 	typedef typename index_trait_type::model_type index_input_const_type;
988 
989 	static
990 	component_return_type
processcolor::_internal::diverse991 	process(scalar_type const& normal, index_input_const_type index) {
992 		scalar_type divergent = normal;
993 		divergent *= scalar_type(bound_trait_type::range(index));
994 		divergent += scalar_type(bound_trait_type::minimum(index));
995 		return component_instance_type(divergent);
996 	}
997 
998 	template< index_instance_type index_size >
999 	static
1000 	component_return_type
processcolor::_internal::diverse1001 	process(scalar_type const& normal) {
1002 		scalar_type divergent = normal;
1003 		divergent *= scalar_type(bound_trait_type::template range<index_size>());
1004 		divergent += scalar_type(bound_trait_type::template minimum<index_size>());
1005 		return component_instance_type(divergent);
1006 	}
1007 };
1008 
1009 }
1010 }
1011 namespace color {
1012 namespace _internal {
1013 
1014 template< typename category_name >
1015 struct normalize {
1016 public:
1017 	typedef typename ::color::trait::scalar<category_name>::instance_type scalar_type;
1018 	typedef ::color::trait::bound< category_name > bound_trait_type;
1019 	typedef ::color::trait::component< category_name > component_trait_type;
1020 	typedef ::color::trait::index< category_name > index_trait_type;
1021 
1022 	typedef typename component_trait_type::instance_type component_instance_type;
1023 	typedef typename component_trait_type::model_type component_input_const_type;
1024 
1025 	typedef typename index_trait_type::instance_type index_instance_type;
1026 	typedef typename index_trait_type::model_type index_input_const_type;
1027 
1028 	static
1029 	scalar_type
processcolor::_internal::normalize1030 	process(component_input_const_type divergent, index_input_const_type index) {
1031 		scalar_type normal = scalar_type(divergent);
1032 		normal -= scalar_type(bound_trait_type::minimum(index));
1033 		normal /= scalar_type(bound_trait_type::range(index));
1034 		return normal;
1035 	}
1036 
1037 	template< index_instance_type index_size >
1038 	static
1039 	scalar_type
processcolor::_internal::normalize1040 	process(component_input_const_type divergent) {
1041 		scalar_type normal = scalar_type(divergent);
1042 		normal -= scalar_type(bound_trait_type::template minimum<index_size>());
1043 		normal /= scalar_type(bound_trait_type::template range<index_size>());
1044 		return normal;
1045 	}
1046 
1047 };
1048 
1049 }
1050 }
1051 
1052 namespace color {
1053 namespace _internal {
1054 
1055 template
1056 <
1057 	typename category_left_name
1058 	,typename category_right_name
1059 	>
1060 struct reformat {
1061 public:
1062 	typedef category_left_name category_left_type;
1063 	typedef category_right_name category_right_type;
1064 
1065 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
1066 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
1067 
1068 	typedef typename ::color::trait::component< category_left_name >::return_type left_component_return_type;
1069 	typedef typename ::color::trait::index< category_left_name >::model_type left_index_const_input_type;
1070 	typedef typename ::color::trait::index< category_left_name >::instance_type left_index_instance_type;
1071 
1072 	typedef typename ::color::trait::component< category_right_name >::model_type right_component_const_input_type;
1073 	typedef typename ::color::trait::index< category_right_name >::model_type right_index_const_input_type;
1074 	typedef typename ::color::trait::index< category_right_name >::instance_type right_index_instance_type;
1075 
1076 	static
1077 	left_component_return_type
processcolor::_internal::reformat1078 	process
1079 	(
1080 		left_index_const_input_type left_index
1081 		,right_component_const_input_type right_component
1082 		,right_index_const_input_type right_index
1083 	) {
1084 		return diverse_type::process
1085 			   (
1086 				   normalize_type::process
1087 				   (
1088 					   right_component
1089 					   ,right_index
1090 				   )
1091 				   , left_index
1092 			   );
1093 	}
1094 
1095 	template
1096 	<
1097 		left_index_instance_type left_index_size
1098 		>
1099 	static
1100 	left_component_return_type
processcolor::_internal::reformat1101 	process
1102 	(
1103 		right_component_const_input_type right_component
1104 		,right_index_const_input_type right_index
1105 	) {
1106 		return diverse_type::template process< left_index_size >
1107 		(
1108 			normalize_type::process
1109 			(
1110 				right_component
1111 				,right_index
1112 			)
1113 		);
1114 	}
1115 
1116 	template
1117 	<
1118 		left_index_instance_type left_index_size
1119 		,right_index_instance_type right_index_size
1120 		>
1121 	static
1122 	left_component_return_type
processcolor::_internal::reformat1123 	process
1124 	(
1125 		right_component_const_input_type right_component
1126 	) {
1127 		return diverse_type::template process< left_index_size >
1128 		(
1129 			normalize_type::template process< right_index_size >
1130 			(
1131 				right_component
1132 			)
1133 											);
1134 	}
1135 };
1136 
1137 template
1138 <
1139 	typename category_name
1140 	>
1141 struct reformat< category_name, category_name > {
1142 public:
1143 	typedef category_name category_type;
1144 
1145 	typedef typename ::color::trait::scalar<category_name>::instance_type scalar_type;
1146 
1147 	typedef typename ::color::trait::component< category_type >::return_type component_return_type;
1148 	typedef typename ::color::trait::index< category_type >::model_type index_const_input_type;
1149 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
1150 
1151 	typedef typename ::color::trait::component< category_type >::model_type component_const_input_type;
1152 
1153 	static
1154 	component_return_type
processcolor::_internal::reformat1155 	process
1156 	(
1157 		index_const_input_type left_index
1158 		,component_const_input_type right_component
1159 		,index_const_input_type right_index
1160 	) {
1161 		return right_component;
1162 	}
1163 
1164 	template
1165 	<
1166 		index_instance_type left_index_size
1167 		>
1168 	static
1169 	component_return_type
processcolor::_internal::reformat1170 	process
1171 	(
1172 		component_const_input_type right_component
1173 		,index_const_input_type right_index
1174 	) {
1175 		return right_component;
1176 	}
1177 
1178 	template
1179 	<
1180 		index_instance_type left_index_size
1181 		,index_instance_type right_index_size
1182 		>
1183 	static
1184 	component_return_type
processcolor::_internal::reformat1185 	process
1186 	(
1187 		component_const_input_type right_component
1188 	) {
1189 		return right_component;
1190 	}
1191 };
1192 
1193 }
1194 }
1195 
1196 namespace color {
1197 namespace _internal {
1198 
1199 template< typename category_left_name, typename category_right_name >
1200 struct convert {
1201 public:
1202 	typedef category_left_name category_left_type;
1203 	typedef category_right_name category_right_type;
1204 
1205 	typedef ::color::trait::index<category_left_type> index_trait_type;
1206 	typedef typename index_trait_type::instance_type index_type;
1207 
1208 	typedef ::color::trait::container< category_left_type > container_left_trait_type;
1209 	typedef ::color::trait::container< category_right_type > container_right_trait_type;
1210 
1211 	typedef ::color::trait::component<category_left_type> component_trait_type;
1212 	typedef typename component_trait_type::instance_type component_left_type;
1213 
1214 	typedef typename container_left_trait_type::input_type container_left_input_type;
1215 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
1216 
1217 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
1218 
1219 	static
1220 	void
processcolor::_internal::convert1221 	process
1222 	(
1223 		container_left_input_type left
1224 		,container_right_const_input_type right
1225 	) {
1226 		static const index_type min_common_size = std::min< index_type >(container_left_trait_type::size(), container_right_trait_type::size());
1227 		component_left_type value;
1228 		for(index_type index=0; index < min_common_size; ++index) {
1229 			value = reformat_type::process(index, container_right_trait_type::get(right, index), index);
1230 			container_left_trait_type::set(left, index, value);
1231 		}
1232 	}
1233 };
1234 
1235 template< typename category_name >
1236 struct convert< category_name, category_name > {
1237 public:
1238 
1239 	typedef ::color::trait::container< category_name > container_trait_type;
1240 
1241 	typedef typename container_trait_type::input_type container_input_type;
1242 	typedef typename container_trait_type::model_type container_const_input_type;
1243 
1244 	static
1245 	void
processcolor::_internal::convert1246 	process
1247 	(
1248 		container_input_type left
1249 		,container_const_input_type right
1250 	) {
1251 		left = right;
1252 	}
1253 
1254 };
1255 
1256 }
1257 }
1258 namespace color {
1259 namespace _internal {
1260 
1261 template< typename category_name >
init(typename::color::trait::container<category_name>::output_type container,std::initializer_list<typename::color::trait::component<category_name>::instance_type> const & ilist)1262 void init
1263 (
1264 	typename ::color::trait::container< category_name >::output_type container
1265 	,std::initializer_list< typename ::color::trait::component< category_name >::instance_type > const& ilist
1266 ) {
1267 	typedef ::color::trait::container< category_name > container_trait_type;
1268 	typedef typename ::color::trait::index< category_name >::instance_type index_type;
1269 	const index_type min_common_size = std::min<index_type>(container_trait_type::size(), ilist.size());
1270 	index_type index=0;
1271 	auto iterator = ilist.begin();
1272 	for(; index < min_common_size; ++index, ++iterator) {
1273 		container_trait_type::init(container, index, *iterator);
1274 	}
1275 }
1276 }
1277 }
1278 namespace color {
1279 namespace _internal {
1280 
1281 template< typename category_name >
1282 class proxy {
1283 public:
1284 	typedef ::color::trait::component< category_name > component_trait_type;
1285 	typedef ::color::trait::container< category_name > container_trait_type;
1286 	typedef ::color::trait::scalar< category_name > scalar_trait_type;
1287 
1288 	typedef typename ::color::trait::container< category_name >::instance_type constainer_type;
1289 	typedef typename ::color::trait::index< category_name >::instance_type index_type;
1290 
1291 	typedef typename component_trait_type::instance_type component_type;
1292 	typedef typename component_trait_type::model_type component_input_const_type;
1293 	typedef typename scalar_trait_type::model_type scalar_input_const_type;
1294 
1295 	typedef ::color::_internal::proxy<category_name> this_type;
1296 
1297 public:
proxy(constainer_type & container,index_type const & index)1298 	proxy(constainer_type & container, index_type const& index)
1299 		: m_container(container), m_index(index) {
1300 	}
1301 
proxy(this_type const & that)1302 	proxy(this_type const& that)
1303 		: m_container(that.m_container), m_index(that.m_index) {
1304 	}
1305 
operator =(this_type const & that)1306 	proxy & operator=(this_type const& that) {
1307 		container_trait_type::set(this->m_container, this->m_index, container_trait_type::get(that.m_container, that.m_index));
1308 		return *this;
1309 	}
1310 
operator component_type() const1311 	operator component_type()const {
1312 		return container_trait_type::get(this->m_container, this->m_index);
1313 	}
1314 
operator =(component_input_const_type component)1315 	this_type & operator=(component_input_const_type component) {
1316 		container_trait_type::set(this->m_container, this->m_index, component);
1317 		return *this;
1318 	}
1319 
operator +=(component_input_const_type component)1320 	this_type & operator+=(component_input_const_type component) {
1321 		container_trait_type::set(this->m_container, this->m_index, container_trait_type::get(this->m_container, this->m_index) + component);
1322 		return *this;
1323 	}
1324 
operator -=(component_input_const_type component)1325 	this_type & operator-=(component_input_const_type component) {
1326 		container_trait_type::set(this->m_container, this->m_index, container_trait_type::get(this->m_container, this->m_index) - component);
1327 		return *this;
1328 	}
1329 
operator *=(scalar_input_const_type scalar)1330 	this_type & operator*=(scalar_input_const_type scalar) {
1331 		container_trait_type::set(this->m_container, this->m_index, component_type(container_trait_type::get(this->m_container, this->m_index) * scalar));
1332 		return *this;
1333 	}
1334 
operator /=(scalar_input_const_type scalar)1335 	this_type & operator/=(scalar_input_const_type scalar) {
1336 		container_trait_type::set(this->m_container, this->m_index, component_type(container_trait_type::get(this->m_container, this->m_index) / scalar));
1337 		return *this;
1338 	}
1339 
operator ++()1340 	this_type & operator++() {
1341 		container_trait_type::set(this->m_container, this->m_index, container_trait_type::get(this->m_container, this->m_index) + component_type(1));
1342 		return *this;
1343 	}
1344 
operator ++(int k)1345 	component_type operator++(int k) {
1346 		component_type value = container_trait_type::get(this->m_container, this->m_index);
1347 		container_trait_type::set(this->m_container, this->m_index, value + component_type(1));
1348 		return value;
1349 	}
1350 
operator --()1351 	this_type & operator--() {
1352 		container_trait_type::set(this->m_container, this->m_index, container_trait_type::get(this->m_container, this->m_index) - component_type(1));
1353 		return *this;
1354 	}
1355 
operator --(int k)1356 	component_type operator--(int k) {
1357 		component_type value = container_trait_type::get(this->m_container, this->m_index);
1358 		container_trait_type::set(this->m_container, this->m_index, value - component_type(1));
1359 		return value;
1360 	}
1361 
1362 private:
1363 	constainer_type & m_container;
1364 	index_type m_index;
1365 };
1366 
1367 }
1368 }
1369 
1370 namespace color {
1371 namespace constant {
1372 
1373 template < typename tag_name >
1374 struct base {
1375 };
1376 
1377 }
1378 }
1379 
1380 namespace color {
1381 namespace constant {
1382 
1383 template< typename constant_name, typename category_name >
1384 struct make {
1385 	typedef category_name category_type;
1386 	typedef constant_name constant_type;
1387 
1388 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
1389 
processcolor::constant::make1390 	static void process(container_output_type & m) {
1391 	}
1392 };
1393 
1394 }
1395 }
1396 
1397 namespace color {
1398 
1399 template< typename category_name >
1400 class model {
1401 public:
1402 	typedef category_name category_type;
1403 
1404 	typedef ::color::trait::index< category_name > index_trait_type;
1405 	typedef ::color::trait::size< category_name > size_trait_type;
1406 	typedef ::color::trait::component< category_name > component_trait_type;
1407 	typedef ::color::trait::container< category_name > container_trait_type;
1408 	typedef ::color::trait::bound< category_name > bound_trait_type, bound_type;
1409 	typedef ::color::trait::scalar< category_name > scalar_trait_type;
1410 
1411 	typedef ::color::model<category_type> this_type, model_type;
1412 
1413 	typedef typename index_trait_type::instance_type index_type;
1414 	typedef typename index_trait_type::const_type index_const_type;
1415 	typedef typename index_trait_type::model_type index_input_const_type;
1416 	typedef typename index_trait_type::return_image_type index_return_image_type;
1417 
1418 	typedef typename size_trait_type::instance_type size_type;
1419 	typedef typename size_trait_type::return_image_type size_return_image_type;
1420 
1421 	typedef typename component_trait_type::instance_type component_type;
1422 	typedef typename component_trait_type::const_type component_const_type;
1423 	typedef typename component_trait_type::return_image_type component_return_const_type;
1424 	typedef typename component_trait_type::return_type component_return_type;
1425 	typedef typename component_trait_type::model_type component_input_const_type;
1426 	typedef typename component_trait_type::input_type component_input_type;
1427 
1428 	typedef typename container_trait_type::instance_type container_type;
1429 	typedef typename container_trait_type::const_type container_const_type;
1430 	typedef typename container_trait_type::return_image_type container_return_const_type;
1431 	typedef typename container_trait_type::return_original_type container_return_original_type;
1432 	typedef typename container_trait_type::model_type container_input_const_type;
1433 	typedef typename container_trait_type::input_type container_input_type;
1434 
1435 	typedef typename container_trait_type::set_return_type set_return_type;
1436 
1437 	typedef typename scalar_trait_type::model_type scalar_input_const_type;
1438 
model()1439 	model() {
1440 	}
1441 
model(container_input_const_type container)1442 	explicit model(container_input_const_type container)
1443 		:m_container(container) {
1444 	}
1445 
1446 	template< typename tag_name >
model(::color::constant::base<tag_name> const & constant)1447 	model(::color::constant::base< tag_name > const& constant) {
1448 		*this = constant;
1449 	}
1450 
model(std::initializer_list<component_type> const & ilist)1451 	explicit model(std::initializer_list<component_type> const& ilist) {
1452 		::color::_internal::init<category_name>(this->m_container, ilist);
1453 	}
model(::color::model<category_type> const & that)1454 	model(::color::model<category_type> const& that) {
1455 		this->m_container = that.container();
1456 	}
1457 
1458 	template< typename other_category_name >
model(::color::model<other_category_name> const & that)1459 	explicit model(::color::model<other_category_name> const& that) {
1460 		*this = that;
1461 	}
1462 
1463 	template< typename tag_name >
operator =(::color::constant::base<tag_name> const &)1464 	model & operator=(::color::constant::base< tag_name > const&) {
1465 		::color::constant::make< ::color::constant::base< tag_name >,category_name>::process(this->m_container);
1466 		return *this;
1467 	}
1468 
1469 	template< typename other_category_name >
operator =(::color::model<other_category_name> const & that)1470 	model & operator=(::color::model<other_category_name> const& that) {
1471 		::color::_internal::convert< category_name, other_category_name>::process(this->m_container, that.container());
1472 		return *this;
1473 	}
1474 
1475 	component_return_const_type
get(index_input_const_type index) const1476 	get(index_input_const_type index)const {
1477 		return container_trait_type::get(this->m_container, index);
1478 	}
1479 
1480 	template< index_type index >
1481 	component_return_const_type
get() const1482 	get()const {
1483 		return container_trait_type::template get<index>(this->m_container);
1484 	}
1485 
1486 	set_return_type
set(index_input_const_type index,component_input_const_type component)1487 	set(index_input_const_type index, component_input_const_type component) {
1488 		return container_trait_type::set(this->m_container, index, component);
1489 	}
1490 
1491 	template< index_type index >
1492 	set_return_type
set(component_input_const_type component)1493 	set(component_input_const_type component) {
1494 		container_trait_type::template set<index>(this->m_container, component);
1495 	}
1496 
1497 	void
set(std::initializer_list<component_type> const & ilist)1498 	set(std::initializer_list<component_type> const& ilist) {
1499 		return ::color::_internal::init<category_name>(this->m_container, ilist);
1500 	}
1501 
operator [](index_input_const_type index) const1502 	component_return_const_type operator[](index_input_const_type index)const {
1503 		return this->get(index);
1504 	}
1505 
1506 private:
1507 	typedef typename ::color::_internal::proxy< category_name > proxy_type;
1508 
1509 public:
operator [](index_input_const_type index)1510 	proxy_type operator[](index_input_const_type index) {
1511 		return proxy_type{ this->m_container, index };
1512 	}
1513 
container() const1514 	container_return_const_type container()const {
1515 		return this->m_container;
1516 	}
1517 
container()1518 	container_return_original_type container() {
1519 		return this->m_container;
1520 	}
1521 
container(container_input_const_type container)1522 	void container(container_input_const_type container) {
1523 		this->m_container = container;
1524 	}
1525 
size()1526 	static size_return_image_type size() {
1527 		return container_trait_type::size();
1528 	}
1529 
1530 private:
1531 	container_type m_container;
1532 };
1533 
1534 }
1535 
1536 namespace color {
1537 namespace check {
1538 namespace _internal {
1539 
1540 template< typename category_name >
1541 struct integrity {
1542 public:
1543 	typedef category_name category_type;
1544 
1545 	typedef ::color::model<category_type> model_type;
1546 
processcolor::check::_internal::integrity1547 	static bool process(model_type const&) {
1548 		return true;
1549 	}
1550 
1551 };
1552 }
1553 
1554 template< typename category_name >
1555 inline
integrity(::color::model<category_name> const & m)1556 bool integrity(::color::model<category_name> const& m) {
1557 	return ::color::check::_internal::integrity<category_name>::process(m);
1558 }
1559 
1560 }
1561 }
1562 
1563 namespace color {
1564 namespace check {
1565 namespace _internal {
1566 
1567 template< typename category_name >
1568 struct overburn {
1569 public:
1570 	typedef category_name category_type;
1571 
1572 	typedef ::color::model<category_type> model_type;
1573 	typedef ::color::trait::bound<category_type> bound_type;
1574 	typedef ::color::trait::container< category_name > container_trait_type;
1575 	typedef ::color::trait::index<category_type> index_trait_type;
1576 
1577 	typedef typename index_trait_type::instance_type index_type;
1578 
processcolor::check::_internal::overburn1579 	static bool process(model_type const& m) {
1580 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
1581 			if(m.get(index) < bound_type::minimum(index)) {
1582 				return true;
1583 				continue;
1584 			}
1585 			if(bound_type::maximum(index) < m.get(index)) {
1586 				return true;
1587 				continue;
1588 			}
1589 		}
1590 		return false;
1591 	}
1592 
1593 };
1594 }
1595 
1596 template< typename category_name >
1597 inline
1598 bool
overburn(::color::model<category_name> const & m)1599 overburn(::color::model<category_name> const& m) {
1600 	return ::color::check::_internal::overburn<category_name>::process(m);
1601 }
1602 
1603 }
1604 }
1605 
1606 namespace color {
1607 namespace check {
1608 namespace _internal {
1609 
1610 template< typename category_name >
1611 struct unique {
1612 public:
1613 	typedef category_name category_type;
1614 
1615 	typedef ::color::model<category_type> model_type;
1616 
processcolor::check::_internal::unique1617 	static bool process(model_type const&) {
1618 		return true;
1619 	}
1620 
1621 };
1622 }
1623 
1624 template< typename category_name >
1625 inline
unique(::color::model<category_name> const & m)1626 bool unique(::color::model<category_name> const& m) {
1627 	return ::color::check::_internal::unique<category_name>::process(m);
1628 }
1629 
1630 }
1631 }
1632 
1633 namespace color {
1634 namespace constant {
1635 
1636 namespace _internal {
1637 namespace w3c {
1638 struct aqua_t {};
1639 }
1640 }
1641 
1642 namespace w3c {
1643 typedef ::color::constant::base< ::color::constant::_internal::w3c::aqua_t > aqua_t;
1644 }
1645 
1646 typedef ::color::constant::w3c::aqua_t aqua_t;
1647 
1648 }
1649 }
1650 
1651 namespace color {
1652 namespace constant {
1653 
1654 namespace _internal {
1655 namespace w3c {
1656 struct aquamarine_t {};
1657 }
1658 }
1659 
1660 namespace w3c {
1661 typedef ::color::constant::base< ::color::constant::_internal::w3c::aquamarine_t > aquamarine_t;
1662 }
1663 
1664 typedef ::color::constant::w3c::aquamarine_t aquamarine_t;
1665 
1666 }
1667 }
1668 
1669 namespace color {
1670 namespace constant {
1671 
1672 namespace _internal {
1673 namespace w3c {
1674 struct azure_t {};
1675 }
1676 }
1677 
1678 namespace w3c {
1679 typedef ::color::constant::base< ::color::constant::_internal::w3c::azure_t > azure_t;
1680 }
1681 
1682 typedef ::color::constant::w3c::azure_t azure_t;
1683 
1684 }
1685 }
1686 
1687 namespace color {
1688 namespace constant {
1689 
1690 namespace _internal {
1691 namespace w3c {
1692 struct beige_t {};
1693 }
1694 }
1695 
1696 namespace w3c {
1697 typedef ::color::constant::base< ::color::constant::_internal::w3c::beige_t > beige_t;
1698 }
1699 
1700 typedef ::color::constant::w3c::beige_t beige_t;
1701 
1702 }
1703 }
1704 
1705 namespace color {
1706 namespace constant {
1707 
1708 namespace _internal {
1709 namespace w3c {
1710 struct bisque_t {};
1711 }
1712 }
1713 
1714 namespace w3c {
1715 typedef ::color::constant::base< ::color::constant::_internal::w3c::bisque_t > bisque_t;
1716 }
1717 
1718 typedef ::color::constant::w3c::bisque_t bisque_t;
1719 
1720 }
1721 }
1722 
1723 namespace color {
1724 namespace constant {
1725 
1726 namespace _internal {
1727 namespace w3c {
1728 struct black_t {};
1729 }
1730 }
1731 
1732 namespace w3c {
1733 typedef ::color::constant::base< ::color::constant::_internal::w3c::black_t > black_t;
1734 }
1735 
1736 typedef ::color::constant::w3c::black_t black_t;
1737 
1738 }
1739 }
1740 
1741 namespace color {
1742 namespace constant {
1743 
1744 namespace _internal {
1745 namespace w3c {
1746 struct blue_t {};
1747 }
1748 }
1749 
1750 namespace w3c {
1751 typedef ::color::constant::base< ::color::constant::_internal::w3c::blue_t > blue_t;
1752 }
1753 
1754 typedef ::color::constant::w3c::blue_t blue_t;
1755 
1756 }
1757 }
1758 
1759 namespace color {
1760 namespace constant {
1761 
1762 namespace _internal {
1763 namespace w3c {
1764 struct brown_t {};
1765 }
1766 }
1767 
1768 namespace w3c {
1769 typedef ::color::constant::base< ::color::constant::_internal::w3c::brown_t > brown_t;
1770 }
1771 
1772 typedef ::color::constant::w3c::brown_t brown_t;
1773 
1774 }
1775 }
1776 
1777 namespace color {
1778 namespace constant {
1779 
1780 namespace _internal {
1781 namespace w3c {
1782 struct chocolate_t {};
1783 }
1784 }
1785 
1786 namespace w3c {
1787 typedef ::color::constant::base< ::color::constant::_internal::w3c::chocolate_t > chocolate_t;
1788 }
1789 
1790 typedef ::color::constant::w3c::chocolate_t chocolate_t;
1791 
1792 }
1793 }
1794 
1795 namespace color {
1796 namespace constant {
1797 
1798 namespace _internal {
1799 namespace w3c {
1800 struct coral_t {};
1801 }
1802 }
1803 
1804 namespace w3c {
1805 typedef ::color::constant::base< ::color::constant::_internal::w3c::coral_t > coral_t;
1806 }
1807 
1808 typedef ::color::constant::w3c::coral_t coral_t;
1809 
1810 }
1811 }
1812 
1813 namespace color {
1814 namespace constant {
1815 
1816 namespace _internal {
1817 namespace w3c {
1818 struct crimson_t {};
1819 }
1820 }
1821 
1822 namespace w3c {
1823 typedef ::color::constant::base< ::color::constant::_internal::w3c::crimson_t > crimson_t;
1824 }
1825 
1826 typedef ::color::constant::w3c::crimson_t crimson_t;
1827 
1828 }
1829 }
1830 
1831 namespace color {
1832 namespace constant {
1833 
1834 namespace _internal {
1835 namespace w3c {
1836 struct cyan_t {};
1837 }
1838 }
1839 
1840 namespace w3c {
1841 typedef ::color::constant::base< ::color::constant::_internal::w3c::cyan_t > cyan_t;
1842 }
1843 
1844 typedef ::color::constant::w3c::cyan_t cyan_t;
1845 
1846 }
1847 }
1848 
1849 namespace color {
1850 namespace constant {
1851 
1852 namespace _internal {
1853 namespace w3c {
1854 struct fuchsia_t {};
1855 }
1856 }
1857 
1858 namespace w3c {
1859 typedef ::color::constant::base< ::color::constant::_internal::w3c::fuchsia_t > fuchsia_t;
1860 }
1861 
1862 typedef ::color::constant::w3c::fuchsia_t fuchsia_t;
1863 
1864 }
1865 }
1866 
1867 namespace color {
1868 namespace constant {
1869 
1870 namespace _internal {
1871 namespace w3c {
1872 struct gainsboro_t {};
1873 }
1874 }
1875 
1876 namespace w3c {
1877 typedef ::color::constant::base< ::color::constant::_internal::w3c::gainsboro_t > gainsboro_t;
1878 }
1879 
1880 typedef ::color::constant::w3c::gainsboro_t gainsboro_t;
1881 
1882 }
1883 }
1884 
1885 namespace color {
1886 namespace constant {
1887 
1888 namespace _internal {
1889 namespace w3c {
1890 struct gold_t {};
1891 }
1892 }
1893 
1894 namespace w3c {
1895 typedef ::color::constant::base< ::color::constant::_internal::w3c::gold_t > gold_t;
1896 }
1897 
1898 typedef ::color::constant::w3c::gold_t gold_t;
1899 
1900 }
1901 }
1902 
1903 namespace color {
1904 namespace constant {
1905 
1906 namespace _internal {
1907 
1908 template< std::uintmax_t black_number, std::uintmax_t white_number = 1 >
1909 struct gray {};
1910 
1911 }
1912 
1913 template< std::uintmax_t black_number = 50, std::uintmax_t white_number = 50 >
1914 using gray_t= ::color::constant::base< ::color::constant::_internal::gray< black_number, white_number > > ;
1915 
1916 typedef ::color::constant::gray_t< 99, 1 > gray01_t;
1917 typedef ::color::constant::gray_t< 95, 5 > gray05_t;
1918 typedef ::color::constant::gray_t< 90, 10 > gray10_t;
1919 typedef ::color::constant::gray_t< 80, 20 > gray20_t;
1920 typedef ::color::constant::gray_t< 75, 25 > gray25_t;
1921 typedef ::color::constant::gray_t< 70, 30 > gray30_t;
1922 typedef ::color::constant::gray_t< 2, 1 > gray33_t;
1923 typedef ::color::constant::gray_t< 60, 40 > gray40_t;
1924 typedef ::color::constant::gray_t< 50, 50 > gray50_t;
1925 typedef ::color::constant::gray_t< 40, 60 > gray60_t;
1926 typedef ::color::constant::gray_t< 1, 2 > gray66_t;
1927 typedef ::color::constant::gray_t< 30, 70 > gray70_t;
1928 typedef ::color::constant::gray_t< 25, 75 > gray75_t;
1929 typedef ::color::constant::gray_t< 20, 80 > gray80_t;
1930 typedef ::color::constant::gray_t< 10, 90 > gray90_t;
1931 typedef ::color::constant::gray_t< 5, 95 > gray95_t;
1932 typedef ::color::constant::gray_t< 1, 99 > gray99_t;
1933 
1934 namespace w3c {
1935 typedef ::color::constant::gray50_t gray_t;
1936 }
1937 
1938 namespace x11 {
1939 typedef ::color::constant::gray75_t gray_t;
1940 }
1941 
1942 }
1943 }
1944 
1945 namespace color {
1946 namespace constant {
1947 
1948 namespace _internal {
1949 namespace w3c {
1950 struct green_t {};
1951 }
1952 }
1953 
1954 namespace w3c {
1955 typedef ::color::constant::base< ::color::constant::_internal::w3c::green_t > green_t;
1956 }
1957 
1958 namespace _internal {
1959 namespace x11 {
1960 struct green_t {};
1961 }
1962 }
1963 
1964 namespace x11 {
1965 typedef ::color::constant::base< ::color::constant::_internal::x11::green_t > green_t;
1966 }
1967 
1968 typedef ::color::constant::w3c::green_t green_t;
1969 
1970 }
1971 }
1972 
1973 namespace color {
1974 namespace constant {
1975 
1976 namespace _internal {
1977 namespace w3c {
1978 struct indigo_t {};
1979 }
1980 }
1981 
1982 namespace w3c {
1983 typedef ::color::constant::base< ::color::constant::_internal::w3c::indigo_t > indigo_t;
1984 }
1985 
1986 typedef ::color::constant::w3c::indigo_t indigo_t;
1987 
1988 }
1989 }
1990 
1991 namespace color {
1992 namespace constant {
1993 
1994 namespace _internal {
1995 namespace w3c {
1996 struct ivory_t {};
1997 }
1998 }
1999 
2000 namespace w3c {
2001 typedef ::color::constant::base< ::color::constant::_internal::w3c::ivory_t > ivory_t;
2002 }
2003 
2004 typedef ::color::constant::w3c::ivory_t ivory_t;
2005 
2006 }
2007 }
2008 
2009 namespace color {
2010 namespace constant {
2011 
2012 namespace _internal {
2013 namespace w3c {
2014 struct khaki_t {};
2015 }
2016 }
2017 
2018 namespace w3c {
2019 typedef ::color::constant::base< ::color::constant::_internal::w3c::khaki_t > khaki_t;
2020 }
2021 
2022 typedef ::color::constant::w3c::khaki_t khaki_t;
2023 
2024 }
2025 }
2026 
2027 namespace color {
2028 namespace constant {
2029 
2030 namespace _internal {
2031 namespace w3c {
2032 struct lavender_t {};
2033 }
2034 }
2035 
2036 namespace w3c {
2037 typedef ::color::constant::base< ::color::constant::_internal::w3c::lavender_t > lavender_t;
2038 }
2039 
2040 typedef ::color::constant::w3c::lavender_t lavender_t;
2041 
2042 }
2043 }
2044 
2045 namespace color {
2046 namespace constant {
2047 
2048 namespace _internal {
2049 namespace w3c {
2050 struct lime_t {};
2051 }
2052 }
2053 
2054 namespace w3c {
2055 typedef ::color::constant::base< ::color::constant::_internal::w3c::lime_t > lime_t;
2056 }
2057 
2058 typedef ::color::constant::w3c::lime_t lime_t;
2059 
2060 }
2061 }
2062 
2063 namespace color {
2064 namespace constant {
2065 
2066 namespace _internal {
2067 namespace w3c {
2068 struct linen_t {};
2069 }
2070 }
2071 
2072 namespace w3c {
2073 typedef ::color::constant::base< ::color::constant::_internal::w3c::linen_t > linen_t;
2074 }
2075 
2076 typedef ::color::constant::w3c::linen_t linen_t;
2077 
2078 }
2079 }
2080 
2081 namespace color {
2082 namespace constant {
2083 
2084 namespace _internal {
2085 namespace w3c {
2086 struct magenta_t {};
2087 }
2088 }
2089 
2090 namespace w3c {
2091 typedef ::color::constant::base< ::color::constant::_internal::w3c::magenta_t > magenta_t;
2092 }
2093 
2094 typedef ::color::constant::w3c::magenta_t magenta_t;
2095 
2096 }
2097 }
2098 
2099 namespace color {
2100 namespace constant {
2101 
2102 namespace _internal {
2103 namespace w3c {
2104 struct maroon_t {};
2105 }
2106 }
2107 
2108 namespace w3c {
2109 typedef ::color::constant::base< ::color::constant::_internal::w3c::maroon_t > maroon_t;
2110 }
2111 
2112 namespace _internal {
2113 namespace x11 {
2114 struct maroon_t {};
2115 }
2116 }
2117 
2118 namespace x11 {
2119 typedef ::color::constant::base< ::color::constant::_internal::x11::maroon_t > maroon_t;
2120 }
2121 
2122 typedef ::color::constant::w3c::maroon_t maroon_t;
2123 
2124 }
2125 }
2126 
2127 namespace color {
2128 namespace constant {
2129 
2130 namespace _internal {
2131 namespace w3c {
2132 struct moccasin_t {};
2133 }
2134 }
2135 
2136 namespace w3c {
2137 typedef ::color::constant::base< ::color::constant::_internal::w3c::moccasin_t > moccasin_t;
2138 }
2139 
2140 typedef ::color::constant::w3c::moccasin_t moccasin_t;
2141 
2142 }
2143 }
2144 
2145 namespace color {
2146 namespace constant {
2147 
2148 namespace _internal {
2149 namespace w3c {
2150 struct navy_t {};
2151 }
2152 }
2153 
2154 namespace w3c {
2155 typedef ::color::constant::base< ::color::constant::_internal::w3c::navy_t > navy_t;
2156 }
2157 
2158 typedef ::color::constant::w3c::navy_t navy_t;
2159 
2160 }
2161 }
2162 
2163 namespace color {
2164 namespace constant {
2165 
2166 namespace _internal {
2167 namespace w3c {
2168 struct olive_t {};
2169 }
2170 }
2171 
2172 namespace w3c {
2173 typedef ::color::constant::base< ::color::constant::_internal::w3c::olive_t > olive_t;
2174 }
2175 
2176 typedef ::color::constant::w3c::olive_t olive_t;
2177 
2178 }
2179 }
2180 
2181 namespace color {
2182 namespace constant {
2183 
2184 namespace _internal {
2185 namespace w3c {
2186 struct orange_t {};
2187 }
2188 }
2189 
2190 namespace w3c {
2191 typedef ::color::constant::base< ::color::constant::_internal::w3c::orange_t > orange_t;
2192 }
2193 
2194 typedef ::color::constant::w3c::orange_t orange_t;
2195 
2196 }
2197 }
2198 
2199 namespace color {
2200 namespace constant {
2201 
2202 namespace _internal {
2203 namespace w3c {
2204 struct orchid_t {};
2205 }
2206 }
2207 
2208 namespace w3c {
2209 typedef ::color::constant::base< ::color::constant::_internal::w3c::orchid_t > orchid_t;
2210 }
2211 
2212 typedef ::color::constant::w3c::orchid_t orchid_t;
2213 
2214 }
2215 }
2216 
2217 namespace color {
2218 namespace constant {
2219 
2220 namespace _internal {
2221 namespace w3c {
2222 struct peru_t {};
2223 }
2224 }
2225 
2226 namespace w3c {
2227 typedef ::color::constant::base< ::color::constant::_internal::w3c::peru_t > peru_t;
2228 }
2229 
2230 typedef ::color::constant::w3c::peru_t peru_t;
2231 
2232 }
2233 }
2234 
2235 namespace color {
2236 namespace constant {
2237 
2238 namespace _internal {
2239 namespace w3c {
2240 struct pink_t {};
2241 }
2242 }
2243 
2244 namespace w3c {
2245 typedef ::color::constant::base< ::color::constant::_internal::w3c::pink_t > pink_t;
2246 }
2247 
2248 typedef ::color::constant::w3c::pink_t pink_t;
2249 
2250 }
2251 }
2252 
2253 namespace color {
2254 namespace constant {
2255 
2256 namespace _internal {
2257 namespace w3c {
2258 struct plum_t {};
2259 }
2260 }
2261 
2262 namespace w3c {
2263 typedef ::color::constant::base< ::color::constant::_internal::w3c::plum_t > plum_t;
2264 }
2265 
2266 typedef ::color::constant::w3c::plum_t plum_t;
2267 
2268 }
2269 }
2270 
2271 namespace color {
2272 namespace constant {
2273 
2274 namespace _internal {
2275 namespace w3c {
2276 struct purple_t {};
2277 }
2278 }
2279 
2280 namespace w3c {
2281 typedef ::color::constant::base< ::color::constant::_internal::w3c::purple_t > purple_t;
2282 }
2283 
2284 namespace _internal {
2285 namespace x11 {
2286 struct purple_t {};
2287 }
2288 }
2289 
2290 namespace x11 {
2291 typedef ::color::constant::base< ::color::constant::_internal::x11::purple_t > purple_t;
2292 }
2293 typedef ::color::constant::w3c::purple_t purple_t;
2294 
2295 }
2296 }
2297 
2298 namespace color {
2299 namespace constant {
2300 
2301 namespace _internal {
2302 namespace w3c {
2303 struct red_t {};
2304 }
2305 }
2306 
2307 namespace w3c {
2308 typedef ::color::constant::base< ::color::constant::_internal::w3c::red_t > red_t;
2309 }
2310 
2311 typedef ::color::constant::w3c::red_t red_t;
2312 
2313 }
2314 }
2315 
2316 namespace color {
2317 namespace constant {
2318 
2319 namespace _internal {
2320 namespace w3c {
2321 struct salmon_t {};
2322 }
2323 }
2324 
2325 namespace w3c {
2326 typedef ::color::constant::base< ::color::constant::_internal::w3c::salmon_t > salmon_t;
2327 }
2328 
2329 typedef ::color::constant::w3c::salmon_t salmon_t;
2330 
2331 }
2332 }
2333 
2334 namespace color {
2335 namespace constant {
2336 
2337 namespace _internal {
2338 namespace w3c {
2339 struct sienna_t {};
2340 }
2341 }
2342 
2343 namespace w3c {
2344 typedef ::color::constant::base< ::color::constant::_internal::w3c::sienna_t > sienna_t;
2345 }
2346 
2347 typedef ::color::constant::w3c::sienna_t sienna_t;
2348 
2349 }
2350 }
2351 
2352 namespace color {
2353 namespace constant {
2354 
2355 namespace _internal {
2356 namespace w3c {
2357 struct silver_t {};
2358 }
2359 }
2360 
2361 namespace w3c {
2362 typedef ::color::constant::base< ::color::constant::_internal::w3c::silver_t > silver_t;
2363 }
2364 
2365 typedef ::color::constant::w3c::silver_t silver_t;
2366 
2367 }
2368 }
2369 
2370 namespace color {
2371 namespace constant {
2372 
2373 namespace _internal {
2374 namespace w3c {
2375 struct snow_t {};
2376 }
2377 }
2378 
2379 namespace w3c {
2380 typedef ::color::constant::base< ::color::constant::_internal::w3c::snow_t > snow_t;
2381 }
2382 
2383 typedef ::color::constant::w3c::snow_t snow_t;
2384 
2385 }
2386 }
2387 
2388 namespace color {
2389 namespace constant {
2390 
2391 namespace _internal {
2392 namespace w3c {
2393 struct tan_t {};
2394 }
2395 }
2396 
2397 namespace w3c {
2398 typedef ::color::constant::base< ::color::constant::_internal::w3c::tan_t > tan_t;
2399 }
2400 
2401 typedef ::color::constant::w3c::tan_t tan_t;
2402 
2403 }
2404 }
2405 
2406 namespace color {
2407 namespace constant {
2408 
2409 namespace _internal {
2410 namespace w3c {
2411 struct teal_t {};
2412 }
2413 }
2414 
2415 namespace w3c {
2416 typedef ::color::constant::base< ::color::constant::_internal::w3c::teal_t > teal_t;
2417 }
2418 
2419 typedef ::color::constant::w3c::teal_t teal_t;
2420 
2421 }
2422 }
2423 
2424 namespace color {
2425 namespace constant {
2426 
2427 namespace _internal {
2428 namespace w3c {
2429 struct thistle_t {};
2430 }
2431 }
2432 
2433 namespace w3c {
2434 typedef ::color::constant::base< ::color::constant::_internal::w3c::thistle_t > thistle_t;
2435 }
2436 
2437 typedef ::color::constant::w3c::thistle_t thistle_t;
2438 
2439 }
2440 }
2441 
2442 namespace color {
2443 namespace constant {
2444 
2445 namespace _internal {
2446 namespace w3c {
2447 struct tomato_t {};
2448 }
2449 }
2450 
2451 namespace w3c {
2452 typedef ::color::constant::base< ::color::constant::_internal::w3c::tomato_t > tomato_t;
2453 }
2454 
2455 typedef ::color::constant::w3c::tomato_t tomato_t;
2456 
2457 }
2458 }
2459 
2460 namespace color {
2461 namespace constant {
2462 
2463 namespace _internal {
2464 namespace w3c {
2465 struct turquoise_t {};
2466 }
2467 }
2468 
2469 namespace w3c {
2470 typedef ::color::constant::base< ::color::constant::_internal::w3c::turquoise_t > turquoise_t;
2471 }
2472 
2473 typedef ::color::constant::w3c::turquoise_t turquoise_t;
2474 
2475 }
2476 }
2477 
2478 namespace color {
2479 namespace constant {
2480 
2481 namespace _internal {
2482 namespace w3c {
2483 struct violet_t {};
2484 }
2485 }
2486 
2487 namespace w3c {
2488 typedef ::color::constant::base< ::color::constant::_internal::w3c::violet_t > violet_t;
2489 }
2490 
2491 typedef ::color::constant::w3c::violet_t violet_t;
2492 
2493 }
2494 }
2495 
2496 namespace color {
2497 namespace constant {
2498 
2499 namespace _internal {
2500 namespace w3c {
2501 struct wheat_t {};
2502 }
2503 }
2504 
2505 namespace w3c {
2506 typedef ::color::constant::base< ::color::constant::_internal::w3c::wheat_t > wheat_t;
2507 }
2508 
2509 typedef ::color::constant::w3c::wheat_t wheat_t;
2510 
2511 }
2512 }
2513 
2514 namespace color {
2515 namespace constant {
2516 
2517 namespace _internal {
2518 namespace w3c {
2519 struct white_t {};
2520 }
2521 }
2522 
2523 namespace w3c {
2524 typedef ::color::constant::base< ::color::constant::_internal::w3c::white_t > white_t;
2525 }
2526 
2527 typedef ::color::constant::w3c::white_t white_t;
2528 
2529 }
2530 }
2531 
2532 namespace color {
2533 namespace constant {
2534 
2535 namespace _internal {
2536 namespace w3c {
2537 struct yellow_t {};
2538 }
2539 }
2540 
2541 namespace w3c {
2542 typedef ::color::constant::base< ::color::constant::_internal::w3c::yellow_t > yellow_t;
2543 }
2544 
2545 typedef ::color::constant::w3c::yellow_t yellow_t;
2546 
2547 }
2548 }
2549 
2550 namespace color {
2551 namespace type {
2552 
2553 struct divert {};
2554 typedef divert divert_t;
2555 
2556 }
2557 }
2558 
2559 namespace color {
2560 namespace type {
2561 
2562 struct normal {};
2563 
2564 typedef normal normal_t;
2565 
2566 }
2567 }
2568 
2569 namespace color {
2570 namespace type {
2571 
2572 template< unsigned first_size, unsigned second_size >
2573 struct pack2 {};
2574 
2575 }
2576 }
2577 
2578 namespace color {
2579 namespace type {
2580 
2581 template< unsigned first_size, unsigned second_size, unsigned third_size >
2582 struct pack3 {};
2583 
2584 typedef ::color::type::pack3< 2, 3, 3 > split233_t;
2585 typedef ::color::type::pack3< 3, 2, 3 > split323_t;
2586 typedef ::color::type::pack3< 3, 3, 2 > split332_t;
2587 
2588 typedef ::color::type::pack3< 4, 2, 2 > split422_t;
2589 typedef ::color::type::pack3< 2, 4, 2 > split242_t;
2590 typedef ::color::type::pack3< 2, 2, 4 > split224_t;
2591 
2592 typedef ::color::type::pack3< 5, 5, 5 > split555_t;
2593 
2594 typedef ::color::type::pack3< 6, 5, 5 > split655_t;
2595 typedef ::color::type::pack3< 5, 6, 5 > split565_t;
2596 typedef ::color::type::pack3< 5, 5, 6 > split556_t;
2597 
2598 typedef ::color::type::pack3< 7, 7, 2 > split772_t;
2599 typedef ::color::type::pack3< 7, 2, 7 > split727_t;
2600 typedef ::color::type::pack3< 2, 7, 7 > split277_t;
2601 
2602 typedef ::color::type::pack3< 8, 8, 8 > split888_t;
2603 
2604 typedef ::color::type::pack3< 12, 10, 10 > splitCAA_t;
2605 typedef ::color::type::pack3< 10, 12, 10 > splitACA_t;
2606 typedef ::color::type::pack3< 10, 10, 12 > splitAAC_t;
2607 
2608 }
2609 }
2610 
2611 namespace color {
2612 namespace type {
2613 
2614 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
2615 struct pack4 {};
2616 
2617 typedef ::color::type::pack4< 2, 2, 2, 2 > split2222_t;
2618 
2619 typedef ::color::type::pack4< 4, 4, 4, 4 > split4444_t;
2620 
2621 typedef ::color::type::pack4< 5, 5, 5, 1 > split5551_t;
2622 typedef ::color::type::pack4< 1, 5, 5, 5 > split1555_t;
2623 
2624 typedef ::color::type::pack4< 6, 6, 6, 6 > split6666_t;
2625 
2626 typedef ::color::type::pack4< 8, 8, 8, 8 > split8888_t;
2627 
2628 typedef ::color::type::pack4< 2, 10, 10, 10 > split2AAA_t;
2629 typedef ::color::type::pack4< 10, 10, 10, 2 > splitAAA2_t;
2630 
2631 typedef ::color::type::pack4< 16, 16, 16, 16 > splitGGGG_t;
2632 
2633 }
2634 }
2635 
2636 namespace color {
2637 namespace type {
2638 
2639 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size, unsigned fifth_size >
2640 struct pack5 {};
2641 
2642 }
2643 }
2644 
2645 namespace color {
2646 namespace type {
2647 
2648 typedef std::array< std::uint8_t, 3 > uint24_t;
2649 
2650 }
2651 }
2652 
2653 namespace color {
2654 namespace type {
2655 
2656 typedef std::array< std::uint8_t, 6 > uint48_t, uint48c_t;
2657 
2658 typedef std::array< std::uint16_t, 3 > uint48s_t;
2659 
2660 }
2661 }
2662 
2663 namespace color {
2664 namespace type {
2665 
2666 typedef std::array< std::int8_t, 3 > int24_t;
2667 
2668 }
2669 }
2670 
2671 namespace color {
2672 namespace type {
2673 
2674 typedef std::array< std::uint8_t, 6 > int48_t, int48c_t;
2675 
2676 typedef std::array< std::uint16_t, 3 > int48s_t;
2677 
2678 }
2679 }
2680 
2681 namespace color {
2682 namespace type {
2683 
2684 template< unsigned first_position, unsigned second_position >
2685 struct scramble2 {
2686 
2687 };
2688 
2689 template< unsigned first_position, unsigned second_position, unsigned third_position >
2690 struct scramble3 {
2691 
2692 };
2693 
2694 template< unsigned first_position, unsigned second_position, unsigned third_position, unsigned fourth_position >
2695 struct scramble4 {
2696 };
2697 
2698 template< unsigned first_position, unsigned second_position, unsigned third_position, unsigned fourth_position, unsigned fifth_position >
2699 struct scramble5 {
2700 };
2701 
2702 }
2703 }
2704 
2705 namespace color {
2706 namespace type {
2707 
2708 struct error {};
2709 
2710 typedef error error_t;
2711 
2712 }
2713 }
2714 
2715 namespace color {
2716 namespace place {
2717 namespace _internal {
2718 
2719 template< typename category_name >
2720 struct red {
2721 public:
2722 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
2723 
2724 	enum { position_enum = -1 };
2725 	enum { has_enum = false };
2726 
positioncolor::place::_internal::red2727 	static index_instance_type position() {
2728 		return position_enum;
2729 	}
2730 };
2731 
2732 }
2733 
2734 template< typename category_name >
2735 inline
2736 
2737 typename ::color::trait::index< category_name >::instance_type
red()2738 red() {
2739 	return ::color::place::_internal::red<category_name>::position();
2740 }
2741 
2742 }
2743 }
2744 namespace color {
2745 namespace place {
2746 namespace _internal {
2747 
2748 template< typename category_name >
2749 struct green {
2750 public:
2751 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
2752 
2753 	enum { position_enum = -2 };
2754 	enum { has_enum = false };
2755 
positioncolor::place::_internal::green2756 	static index_instance_type position() {
2757 		return position_enum;
2758 	}
2759 };
2760 
2761 }
2762 
2763 template< typename category_name >
2764 inline
2765 
2766 typename ::color::trait::index< category_name >::instance_type
green()2767 green() {
2768 	return ::color::place::_internal::green<category_name>::position();
2769 }
2770 
2771 }
2772 }
2773 namespace color {
2774 namespace place {
2775 namespace _internal {
2776 
2777 template< typename category_name >
2778 struct blue {
2779 public:
2780 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
2781 
2782 	enum { position_enum = -3 };
2783 	enum { has_enum = false };
2784 
positioncolor::place::_internal::blue2785 	static index_instance_type position() {
2786 		return position_enum;
2787 	}
2788 };
2789 
2790 }
2791 
2792 template< typename category_name >
2793 inline
2794 
2795 typename ::color::trait::index< category_name >::instance_type
blue()2796 blue() {
2797 	return ::color::place::_internal::blue<category_name>::position();
2798 }
2799 
2800 }
2801 }
2802 
2803 namespace color {
2804 namespace place {
2805 namespace _internal {
2806 
2807 template< typename category_name >
2808 struct alpha {
2809 public:
2810 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
2811 
2812 	enum { position_enum = -10 };
2813 	enum { has_enum = false };
2814 
positioncolor::place::_internal::alpha2815 	static index_instance_type position() {
2816 		return position_enum;
2817 	}
2818 };
2819 
2820 }
2821 
2822 template< typename category_name >
2823 inline
2824 
2825 typename ::color::trait::index< category_name >::instance_type
alpha()2826 alpha() {
2827 	return ::color::place::_internal::alpha<category_name>::position();
2828 }
2829 
2830 }
2831 }
2832 
2833 namespace color {
2834 namespace place {
2835 namespace _internal {
2836 
2837 template< typename category_name >
2838 struct gray {
2839 public:
2840 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
2841 
2842 	enum { position_enum = -8 };
2843 	enum { has_enum = false };
2844 
positioncolor::place::_internal::gray2845 	static index_instance_type position() {
2846 		return position_enum;
2847 	}
2848 };
2849 
2850 }
2851 
2852 template< typename category_name >
2853 inline
2854 
2855 typename ::color::trait::index< category_name >::instance_type
gray()2856 gray() {
2857 	return ::color::place::_internal::gray<category_name>::position();
2858 }
2859 
2860 }
2861 }
2862 
2863 namespace color {
2864 namespace place {
2865 namespace _internal {
2866 
2867 template< typename category_name >
2868 struct chroma {
2869 public:
2870 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
2871 
2872 	enum { position_enum = -7 };
2873 	enum { has_enum = false };
2874 
positioncolor::place::_internal::chroma2875 	static index_instance_type position() {
2876 		return position_enum;
2877 	}
2878 };
2879 
2880 }
2881 
2882 template< typename category_name >
2883 inline
2884 
2885 typename ::color::trait::index< category_name >::instance_type
chroma()2886 chroma() {
2887 	return ::color::place::_internal::chroma<category_name>::position();
2888 }
2889 
2890 }
2891 }
2892 
2893 namespace color {
2894 namespace place {
2895 namespace _internal {
2896 
2897 template< typename category_name >
2898 struct hue {
2899 public:
2900 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
2901 
2902 	enum { position_enum = -9 };
2903 	enum { has_enum = false };
2904 
positioncolor::place::_internal::hue2905 	static index_instance_type position() {
2906 		return position_enum;
2907 	}
2908 };
2909 
2910 }
2911 
2912 template< typename category_name >
2913 inline
2914 
2915 typename ::color::trait::index< category_name >::instance_type
hue()2916 hue() {
2917 	return ::color::place::_internal::hue<category_name>::position();
2918 }
2919 
2920 }
2921 }
2922 namespace color {
2923 namespace place {
2924 namespace _internal {
2925 
2926 template< typename category_name >
2927 struct saturation {
2928 public:
2929 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
2930 
2931 	enum { position_enum = -17 };
2932 	enum { has_enum = false };
2933 
positioncolor::place::_internal::saturation2934 	static index_instance_type position() {
2935 		return position_enum;
2936 	}
2937 };
2938 
2939 }
2940 
2941 template< typename category_name >
2942 inline
2943 
2944 typename ::color::trait::index< category_name >::instance_type
saturation()2945 saturation() {
2946 	return ::color::place::_internal::saturation<category_name>::position();
2947 }
2948 
2949 }
2950 }
2951 namespace color {
2952 namespace place {
2953 namespace _internal {
2954 
2955 template< typename category_name >
2956 struct lightness {
2957 public:
2958 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
2959 
2960 	enum { position_enum = -13 };
2961 	enum { has_enum = false };
2962 
positioncolor::place::_internal::lightness2963 	static index_instance_type position() {
2964 		return position_enum;
2965 	}
2966 };
2967 
2968 }
2969 
2970 template< typename category_name >
2971 inline
2972 
2973 typename ::color::trait::index< category_name >::instance_type
lightness()2974 lightness() {
2975 	return ::color::place::_internal::lightness<category_name>::position();
2976 }
2977 
2978 }
2979 }
2980 namespace color {
2981 namespace place {
2982 namespace _internal {
2983 
2984 template< typename category_name >
2985 struct intensity {
2986 public:
2987 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
2988 
2989 	enum { position_enum = -11 };
2990 	enum { has_enum = false };
2991 
positioncolor::place::_internal::intensity2992 	static index_instance_type position() {
2993 		return position_enum;
2994 	}
2995 };
2996 
2997 }
2998 
2999 template< typename category_name >
3000 inline
3001 
3002 typename ::color::trait::index< category_name >::instance_type
intensity()3003 intensity() {
3004 	return ::color::place::_internal::intensity<category_name>::position();
3005 }
3006 
3007 }
3008 }
3009 namespace color {
3010 namespace place {
3011 namespace _internal {
3012 
3013 template< typename category_name >
3014 struct value {
3015 public:
3016 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
3017 
3018 	enum { position_enum = -18 };
3019 	enum { has_enum = false };
3020 
positioncolor::place::_internal::value3021 	static index_instance_type position() {
3022 		return position_enum;
3023 	}
3024 };
3025 
3026 }
3027 
3028 template< typename category_name >
3029 inline
3030 
3031 typename ::color::trait::index< category_name >::instance_type
value()3032 value() {
3033 	return ::color::place::_internal::value<category_name>::position();
3034 }
3035 
3036 }
3037 }
3038 
3039 namespace color {
3040 namespace place {
3041 namespace _internal {
3042 
3043 template< typename category_name >
3044 struct inphase {
3045 public:
3046 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
3047 
3048 	enum { position_enum = -10 };
3049 	enum { has_enum = false };
3050 
positioncolor::place::_internal::inphase3051 	static index_instance_type position() {
3052 		return position_enum;
3053 	}
3054 };
3055 
3056 }
3057 
3058 template< typename category_name >
3059 inline
3060 
3061 typename ::color::trait::index< category_name >::instance_type
inphase()3062 inphase() {
3063 	return ::color::place::_internal::inphase<category_name>::position();
3064 }
3065 
3066 }
3067 }
3068 
3069 namespace color {
3070 namespace place {
3071 namespace _internal {
3072 
3073 template< typename category_name >
3074 struct luma {
3075 public:
3076 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
3077 
3078 	enum { position_enum = -14 };
3079 	enum { has_enum = false };
3080 
positioncolor::place::_internal::luma3081 	static index_instance_type position() {
3082 		return position_enum;
3083 	}
3084 };
3085 
3086 }
3087 
3088 template< typename category_name >
3089 inline
3090 
3091 typename ::color::trait::index< category_name >::instance_type
luma()3092 luma() {
3093 	return ::color::place::_internal::luma<category_name>::position();
3094 }
3095 
3096 }
3097 }
3098 namespace color {
3099 namespace place {
3100 namespace _internal {
3101 
3102 template< typename category_name >
3103 struct luminance {
3104 public:
3105 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
3106 
3107 	enum { position_enum = -15 };
3108 	enum { has_enum = false };
3109 
positioncolor::place::_internal::luminance3110 	static index_instance_type position() {
3111 		return position_enum;
3112 	}
3113 };
3114 
3115 }
3116 
3117 template< typename category_name >
3118 inline
3119 
3120 typename ::color::trait::index< category_name >::instance_type
luminance()3121 luminance() {
3122 	return ::color::place::_internal::luminance<category_name>::position();
3123 }
3124 
3125 }
3126 }
3127 namespace color {
3128 namespace place {
3129 namespace _internal {
3130 
3131 template< typename category_name >
3132 struct quadrature {
3133 public:
3134 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
3135 
3136 	enum { position_enum = -16 };
3137 	enum { has_enum = false };
3138 
positioncolor::place::_internal::quadrature3139 	static index_instance_type position() {
3140 		return position_enum;
3141 	}
3142 };
3143 
3144 }
3145 
3146 template< typename category_name >
3147 inline
3148 
3149 typename ::color::trait::index< category_name >::instance_type
quadrature()3150 quadrature() {
3151 	return ::color::place::_internal::quadrature<category_name>::position();
3152 }
3153 
3154 }
3155 }
3156 
3157 namespace color {
3158 namespace place {
3159 namespace _internal {
3160 
3161 template< typename category_name >
3162 struct cyan {
3163 public:
3164 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
3165 
3166 	enum { position_enum = -4 };
3167 	enum { has_enum = false };
3168 
positioncolor::place::_internal::cyan3169 	static index_instance_type position() {
3170 		return position_enum;
3171 	}
3172 };
3173 
3174 }
3175 
3176 template< typename category_name >
3177 inline
3178 
3179 typename ::color::trait::index< category_name >::instance_type
cyan()3180 cyan() {
3181 	return ::color::place::_internal::cyan<category_name>::position();
3182 }
3183 
3184 }
3185 }
3186 namespace color {
3187 namespace place {
3188 namespace _internal {
3189 
3190 template< typename category_name >
3191 struct magenta {
3192 public:
3193 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
3194 
3195 	enum { position_enum = -5 };
3196 	enum { has_enum = false };
3197 
positioncolor::place::_internal::magenta3198 	static index_instance_type position() {
3199 		return position_enum;
3200 	}
3201 };
3202 
3203 }
3204 
3205 template< typename category_name >
3206 inline
3207 
3208 typename ::color::trait::index< category_name >::instance_type
magenta()3209 magenta() {
3210 	return ::color::place::_internal::magenta<category_name>::position();
3211 }
3212 
3213 }
3214 }
3215 namespace color {
3216 namespace place {
3217 namespace _internal {
3218 
3219 template< typename category_name >
3220 struct yellow {
3221 public:
3222 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
3223 
3224 	enum { position_enum = -6 };
3225 	enum { has_enum = false };
3226 
positioncolor::place::_internal::yellow3227 	static index_instance_type position() {
3228 		return position_enum;
3229 	}
3230 };
3231 
3232 }
3233 
3234 template< typename category_name >
3235 inline
3236 
3237 typename ::color::trait::index< category_name >::instance_type
yellow()3238 yellow() {
3239 	return ::color::place::_internal::yellow<category_name>::position();
3240 }
3241 
3242 }
3243 }
3244 namespace color {
3245 namespace place {
3246 namespace _internal {
3247 
3248 template< typename category_name >
3249 struct key {
3250 public:
3251 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
3252 
3253 	enum { position_enum = -12};
3254 	enum { has_enum = false };
3255 
positioncolor::place::_internal::key3256 	static index_instance_type position() {
3257 		return position_enum;
3258 	}
3259 };
3260 
3261 }
3262 
3263 template< typename category_name >
3264 inline
3265 
3266 typename ::color::trait::index< category_name >::instance_type
key()3267 key() {
3268 	return ::color::place::_internal::key<category_name>::position();
3269 }
3270 
3271 }
3272 }
3273 
3274 namespace color {
3275 namespace place {
3276 namespace _internal {
3277 
3278 template< typename category_name >
3279 struct black {
3280 public:
3281 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
3282 
3283 	enum { position_entity = -19 };
3284 	enum { has_entity = false };
3285 
positioncolor::place::_internal::black3286 	static index_instance_type position() {
3287 		return position_entity;
3288 	}
3289 };
3290 
3291 }
3292 
3293 template< typename category_name >
3294 inline
3295 
3296 typename ::color::trait::index< category_name >::instance_type
black()3297 black() {
3298 	return ::color::place::_internal::black<category_name>::position();
3299 }
3300 
3301 }
3302 }
3303 namespace color {
3304 namespace place {
3305 namespace _internal {
3306 
3307 template< typename category_name >
3308 struct white {
3309 public:
3310 	typedef typename ::color::trait::index< category_name >::instance_type index_instance_type;
3311 
3312 	enum { position_entity = -20 };
3313 	enum { has_entity = false };
3314 
positioncolor::place::_internal::white3315 	static index_instance_type position() {
3316 		return position_entity;
3317 	}
3318 };
3319 
3320 }
3321 
3322 template< typename category_name >
3323 inline
3324 
3325 typename ::color::trait::index< category_name >::instance_type
white()3326 white() {
3327 	return ::color::place::_internal::white<category_name>::position();
3328 }
3329 
3330 }
3331 }
3332 
3333 namespace color {
3334 namespace get {
3335 
3336 template< typename category_name >
3337 inline
3338 typename ::color::trait::component< category_name >::return_type
alpha(::color::model<category_name> const & color_parameter)3339 alpha(::color::model< category_name > const& color_parameter) {
3340 	typedef ::color::trait::bound< category_name > bound_type;
3341 	return bound_type::template maximum< 0 >();
3342 }
3343 
3344 }
3345 }
3346 
3347 namespace color {
3348 namespace get {
3349 
3350 template< typename category_name >
3351 inline
3352 typename ::color::trait::component< category_name >::return_image_type
red(::color::model<category_name> const & color_parameter)3353 red(::color::model< category_name > const& color_parameter) {
3354 	return color_parameter.template get<0>();
3355 }
3356 
3357 }
3358 }
3359 
3360 namespace color {
3361 namespace get {
3362 
3363 template< typename category_name >
3364 inline
3365 typename ::color::trait::component< category_name >::return_image_type
green(::color::model<category_name> const & color_parameter)3366 green(::color::model< category_name > const& color_parameter) {
3367 	return color_parameter.template get<0>();
3368 }
3369 
3370 }
3371 }
3372 
3373 namespace color {
3374 namespace get {
3375 
3376 template< typename category_name >
3377 inline
3378 typename ::color::trait::component< category_name >::return_image_type
blue(::color::model<category_name> const & color_parameter)3379 blue(::color::model< category_name > const& color_parameter) {
3380 	return color_parameter.template get<0>();
3381 }
3382 
3383 }
3384 }
3385 
3386 namespace color {
3387 namespace get {
3388 
3389 template< typename category_name >
3390 inline
3391 typename ::color::trait::component< category_name >::return_image_type
gray(::color::model<category_name> const & color_parameter)3392 gray(::color::model< category_name > const& color_parameter) {
3393 	return color_parameter.template get<0>();
3394 }
3395 
3396 }
3397 }
3398 
3399 namespace color {
3400 namespace get {
3401 
3402 template< typename category_name >
3403 inline
3404 typename ::color::trait::component< category_name >::return_image_type
hue(::color::model<category_name> const & color_parameter)3405 hue(::color::model< category_name > const& color_parameter) {
3406 	return color_parameter.template get<0>();
3407 }
3408 
3409 }
3410 }
3411 
3412 namespace color {
3413 namespace get {
3414 
3415 template< typename category_name >
3416 inline
3417 typename ::color::trait::component< category_name >::return_image_type
saturation(::color::model<category_name> const & color_parameter)3418 saturation(::color::model< category_name > const& color_parameter) {
3419 	return color_parameter.template get<0>();
3420 }
3421 
3422 }
3423 }
3424 
3425 namespace color {
3426 namespace get {
3427 
3428 template< typename category_name >
3429 inline
3430 typename ::color::trait::component< category_name >::return_image_type
luma(::color::model<category_name> const & color_parameter)3431 luma(::color::model< category_name > const& color_parameter) {
3432 	return color_parameter.template get<0>();
3433 }
3434 
3435 }
3436 }
3437 
3438 namespace color {
3439 namespace get {
3440 
3441 template< typename category_name >
3442 inline
3443 typename ::color::trait::component< category_name >::return_image_type
luminance(::color::model<category_name> const & color_parameter)3444 luminance(::color::model< category_name > const& color_parameter) {
3445 	return color_parameter.template get<0>();
3446 }
3447 
3448 }
3449 }
3450 
3451 namespace color {
3452 namespace get {
3453 
3454 template< typename category_name >
3455 inline
3456 typename ::color::trait::component< category_name >::return_image_type
lightness(::color::model<category_name> const & color_parameter)3457 lightness(::color::model< category_name > const& color_parameter) {
3458 	return color_parameter.template get<0>();
3459 }
3460 
3461 }
3462 }
3463 
3464 namespace color {
3465 namespace get {
3466 
3467 template< typename category_name >
3468 inline
3469 typename ::color::trait::component< category_name >::return_image_type
black(::color::model<category_name> const & color_parameter)3470 black(::color::model< category_name > const& color_parameter) {
3471 	return color_parameter.template get<0>();
3472 }
3473 
3474 }
3475 }
3476 
3477 namespace color {
3478 namespace get {
3479 
3480 template< typename category_name >
3481 inline
3482 typename ::color::trait::component< category_name >::return_image_type
white(::color::model<category_name> const & color_parameter)3483 white(::color::model< category_name > const& color_parameter) {
3484 	return color_parameter.template get<0>();
3485 }
3486 
3487 }
3488 }
3489 
3490 namespace color {
3491 namespace get {
3492 
3493 template< typename category_name >
3494 inline
3495 typename ::color::trait::component< category_name >::return_image_type
cyan(::color::model<category_name> const & color_parameter)3496 cyan(::color::model< category_name > const& color_parameter) {
3497 	return color_parameter.template get<0>();
3498 }
3499 
3500 }
3501 }
3502 
3503 namespace color {
3504 namespace get {
3505 
3506 template< typename category_name >
3507 inline
3508 typename ::color::trait::component< category_name >::return_image_type
magenta(::color::model<category_name> const & color_parameter)3509 magenta(::color::model< category_name > const& color_parameter) {
3510 	return color_parameter.template get<0>();
3511 }
3512 
3513 }
3514 }
3515 
3516 namespace color {
3517 namespace get {
3518 
3519 template< typename category_name >
3520 inline
3521 typename ::color::trait::component< category_name >::return_image_type
yellow(::color::model<category_name> const & color_parameter)3522 yellow(::color::model< category_name > const& color_parameter) {
3523 	return color_parameter.template get<0>();
3524 }
3525 
3526 }
3527 }
3528 
3529 namespace color {
3530 namespace get {
3531 
3532 template< typename category_name >
3533 inline
3534 typename ::color::trait::component< category_name >::return_image_type
inphase(::color::model<category_name> const & color_parameter)3535 inphase(::color::model< category_name > const& color_parameter) {
3536 	return color_parameter.template get<0>();
3537 }
3538 
3539 }
3540 }
3541 
3542 namespace color {
3543 namespace get {
3544 
3545 template< typename category_name >
3546 inline
3547 typename ::color::trait::component< category_name >::return_image_type
quadrature(::color::model<category_name> const & color_parameter)3548 quadrature(::color::model< category_name > const& color_parameter) {
3549 	return color_parameter.template get<0>();
3550 }
3551 
3552 }
3553 }
3554 
3555 namespace color {
3556 namespace get {
3557 
3558 template< typename category_name >
3559 inline
3560 typename ::color::trait::component< category_name >::return_image_type
chroma(::color::model<category_name> const & color_parameter)3561 chroma(::color::model< category_name > const& color_parameter) {
3562 	return color_parameter.template get<0>();
3563 }
3564 
3565 }
3566 }
3567 
3568 namespace color {
3569 namespace set {
3570 
3571 template< typename category_name >
3572 inline
3573 void
alpha(::color::model<category_name> &,typename::color::model<category_name>::component_input_const_type)3574 alpha
3575 (
3576 	::color::model< category_name > &,
3577 	typename ::color::model< category_name >::component_input_const_type
3578 ) {
3579 }
3580 
3581 }
3582 }
3583 
3584 namespace color {
3585 namespace set {
3586 
3587 template< typename category_name >
3588 inline
3589 void
red(::color::model<category_name> & color_parameter,typename::color::model<category_name>::component_input_const_type component_parameter)3590 red
3591 (
3592 	::color::model< category_name > & color_parameter,
3593 	typename ::color::model< category_name >::component_input_const_type component_parameter
3594 ) {
3595 }
3596 }
3597 }
3598 
3599 namespace color {
3600 namespace set {
3601 
3602 template< typename category_name >
3603 inline
3604 void
green(::color::model<category_name> & color_parameter,typename::color::model<category_name>::component_input_const_type component_parameter)3605 green
3606 (
3607 	::color::model< category_name > & color_parameter,
3608 	typename ::color::model< category_name >::component_input_const_type component_parameter
3609 ) {
3610 }
3611 
3612 }
3613 }
3614 
3615 namespace color {
3616 namespace set {
3617 
3618 template< typename category_name >
3619 inline
3620 void
blue(::color::model<category_name> & color_parameter,typename::color::model<category_name>::component_input_const_type component_parameter)3621 blue
3622 (
3623 	::color::model< category_name > & color_parameter,
3624 	typename ::color::model< category_name >::component_input_const_type component_parameter
3625 ) {
3626 }
3627 
3628 }
3629 }
3630 
3631 namespace color {
3632 namespace set {
3633 
3634 template< typename category_name >
3635 inline
3636 void
gray(::color::model<category_name> &,typename::color::model<category_name>::component_input_const_type)3637 gray
3638 (
3639 	::color::model< category_name > &,
3640 	typename ::color::model< category_name >::component_input_const_type
3641 ) {
3642 }
3643 
3644 }
3645 }
3646 
3647 namespace color {
3648 namespace set {
3649 
3650 template< typename category_name >
3651 inline
3652 void
hue(::color::model<category_name> & color_parameter,typename::color::model<category_name>::component_input_const_type component_parameter)3653 hue
3654 (
3655 	::color::model< category_name > & color_parameter,
3656 	typename ::color::model< category_name >::component_input_const_type component_parameter
3657 ) {
3658 }
3659 
3660 }
3661 }
3662 
3663 namespace color {
3664 namespace set {
3665 
3666 template< typename category_name >
3667 inline
3668 void
saturation(::color::model<category_name> & color_parameter,typename::color::model<category_name>::component_input_const_type component_parameter)3669 saturation
3670 (
3671 	::color::model< category_name > & color_parameter,
3672 	typename ::color::model< category_name >::component_input_const_type component_parameter
3673 ) {
3674 }
3675 
3676 }
3677 }
3678 
3679 namespace color {
3680 namespace set {
3681 
3682 template< typename category_name >
3683 inline
3684 void
luma(::color::model<category_name> & color_parameter,typename::color::model<category_name>::component_input_const_type component_parameter)3685 luma
3686 (
3687 	::color::model< category_name > & color_parameter,
3688 	typename ::color::model< category_name >::component_input_const_type component_parameter
3689 ) {
3690 }
3691 
3692 }
3693 }
3694 
3695 namespace color {
3696 namespace set {
3697 
3698 template< typename category_name >
3699 inline
3700 void
luminance(::color::model<category_name> & color_parameter,typename::color::model<category_name>::component_input_const_type component_parameter)3701 luminance
3702 (
3703 	::color::model< category_name > & color_parameter,
3704 	typename ::color::model< category_name >::component_input_const_type component_parameter
3705 ) {
3706 }
3707 
3708 }
3709 }
3710 
3711 namespace color {
3712 namespace set {
3713 
3714 template< typename category_name >
3715 inline
3716 void
key(::color::model<category_name> & color_parameter,typename::color::model<category_name>::component_input_const_type component_parameter)3717 key
3718 (
3719 	::color::model< category_name > & color_parameter,
3720 	typename ::color::model< category_name >::component_input_const_type component_parameter
3721 ) {
3722 }
3723 
3724 }
3725 }
3726 
3727 namespace color {
3728 namespace set {
3729 
3730 template< typename category_name >
3731 inline
3732 void
inphase(::color::model<category_name> & color_parameter,typename::color::model<category_name>::component_input_const_type component_parameter)3733 inphase
3734 (
3735 	::color::model< category_name > & color_parameter,
3736 	typename ::color::model< category_name >::component_input_const_type component_parameter
3737 ) {
3738 }
3739 
3740 }
3741 }
3742 
3743 namespace color {
3744 namespace set {
3745 
3746 template< typename category_name >
3747 inline
3748 void
quadrature(::color::model<category_name> & color_parameter,typename::color::model<category_name>::component_input_const_type component_parameter)3749 quadrature
3750 (
3751 	::color::model< category_name > & color_parameter,
3752 	typename ::color::model< category_name >::component_input_const_type component_parameter
3753 ) {
3754 }
3755 
3756 }
3757 }
3758 
3759 namespace color {
3760 namespace set {
3761 
3762 template< typename category_name >
3763 inline
3764 void
chroma(::color::model<category_name> & color_parameter,typename::color::model<category_name>::component_input_const_type component_parameter)3765 chroma
3766 (
3767 	::color::model< category_name > & color_parameter,
3768 	typename ::color::model< category_name >::component_input_const_type component_parameter
3769 ) {
3770 }
3771 
3772 }
3773 }
3774 
3775 namespace color {
3776 namespace trait {
3777 template< typename category_name >
3778 struct diagonal {
3779 public:
3780 	typedef category_name category_type;
3781 
3782 	typedef ::color::trait::container< category_type > container_trait_type;
3783 	typedef ::color::trait::bound<category_type> bound_type;
3784 
3785 	typedef typename ::color::trait::index< category_type >::instance_type index_type;
3786 	typedef typename ::color::trait::scalar< category_name >::instance_type scalar_type;
3787 
valuecolor::trait::diagonal3788 	static scalar_type value() {
3789 		scalar_type result=0;
3790 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
3791 			result += scalar_type(bound_type::range(index)) * scalar_type(bound_type::range(index));
3792 		}
3793 		return sqrt(result);
3794 	}
3795 };
3796 
3797 }
3798 }
3799 
3800 namespace color {
3801 namespace trait {
3802 
3803 template< typename category_name >
3804 struct info {
3805 public:
3806 
3807 	enum { implemented_entity = false };
3808 	enum { meaningful_entity = false };
3809 	enum { overburn_entity = false };
3810 	enum { size_entity = -1 };
3811 
3812 };
3813 
3814 }
3815 }
3816 
3817 namespace color {
3818 namespace fix {
3819 
3820 namespace _internal {
3821 
3822 template< typename category_name >
3823 struct integrity {
3824 public:
3825 	typedef category_name category_type;
3826 
3827 	typedef ::color::model<category_type> model_type;
3828 
processcolor::fix::_internal::integrity3829 	static void process(model_type & m) {
3830 	}
3831 
processcolor::fix::_internal::integrity3832 	static void process(model_type & result, model_type const& right) {
3833 	}
3834 };
3835 
3836 }
3837 
3838 template< typename category_name >
integrity(::color::model<category_name> & result)3839 void integrity
3840 (
3841 	::color::model<category_name> & result
3842 ) {
3843 	::color::fix::_internal::integrity<category_name>::process(result);
3844 }
3845 
3846 template< typename category_name >
integrity(::color::model<category_name> & result,::color::model<category_name> const & right)3847 void integrity
3848 (
3849 	::color::model<category_name> & result
3850 	,::color::model<category_name> const& right
3851 ) {
3852 	::color::fix::_internal::integrity<category_name>::process(result, right);
3853 }
3854 
3855 }
3856 }
3857 
3858 namespace color {
3859 namespace fix {
3860 namespace _internal {
3861 
3862 template< typename category_name >
3863 struct overburn {
3864 public:
3865 	typedef category_name category_type;
3866 
3867 	typedef ::color::trait::index<category_type> index_trait_type;
3868 	typedef ::color::trait::bound< category_type > bound_type;
3869 	typedef ::color::trait::component<category_type> component_trait_type;
3870 	typedef ::color::trait::container< category_type > container_trait_type;
3871 
3872 	typedef typename ::color::model<category_type> model_type;
3873 
3874 	typedef typename component_trait_type::instance_type component_type;
3875 
3876 	typedef typename index_trait_type::instance_type index_type;
3877 
processcolor::fix::_internal::overburn3878 	static model_type & process(model_type &result) {
3879 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
3880 			if(result.get(index) < bound_type::minimum(index)) {
3881 				result.set(index, bound_type::minimum(index));
3882 				continue;
3883 			}
3884 			if(bound_type::maximum(index) < result.get(index)) {
3885 				result.set(index, bound_type::maximum(index));
3886 				continue;
3887 			}
3888 		}
3889 		return result;
3890 	}
3891 
processcolor::fix::_internal::overburn3892 	static model_type & process(model_type & result, model_type const& right) {
3893 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
3894 			if(right.get(index) < bound_type::minimum(index)) {
3895 				result.set(index, bound_type::minimum(index));
3896 				continue;
3897 			}
3898 			if(bound_type::maximum(index) < right.get(index)) {
3899 				result.set(index, bound_type::maximum(index));
3900 				continue;
3901 			}
3902 			result.set(index, right.get(index));
3903 		}
3904 		return result;
3905 	}
3906 
3907 };
3908 
3909 }
3910 
3911 template< typename category_name >
overburn(::color::model<category_name> & result)3912 ::color::model<category_name> & overburn
3913 (
3914 	::color::model<category_name> & result
3915 ) {
3916 	return ::color::fix::_internal::overburn<category_name>::process(result);
3917 }
3918 
3919 template< typename category_name >
overburn(::color::model<category_name> & result,::color::model<category_name> const & right)3920 ::color::model<category_name> & overburn
3921 (
3922 	::color::model<category_name> & result
3923 	,::color::model<category_name> const& right
3924 ) {
3925 	return ::color::fix::_internal::overburn<category_name>::process(result, right);
3926 }
3927 
3928 }
3929 }
3930 
3931 namespace color {
3932 namespace fix {
3933 namespace _internal {
3934 
3935 template< typename category_name >
3936 struct unique {
3937 public:
3938 	typedef category_name category_type;
3939 
3940 	typedef ::color::model<category_type> model_type;
3941 
processcolor::fix::_internal::unique3942 	static void process(model_type &) {
3943 	}
3944 
processcolor::fix::_internal::unique3945 	static void process(model_type & result, model_type const& right) {
3946 	}
3947 };
3948 
3949 }
3950 
3951 template< typename category_name >
unique(::color::model<category_name> & result)3952 void unique
3953 (
3954 	::color::model<category_name> & result
3955 ) {
3956 	::color::fix::_internal::unique<category_name>::process(result);
3957 }
3958 
3959 template< typename category_name >
unique(::color::model<category_name> & result,::color::model<category_name> const & right)3960 void unique
3961 (
3962 	::color::model<category_name> & result
3963 	,::color::model<category_name> const& right
3964 ) {
3965 	::color::fix::_internal::unique<category_name>::process(result, right);
3966 }
3967 
3968 }
3969 }
3970 
3971 namespace color {
3972 namespace category {
3973 
3974 namespace _internal {
3975 struct generic_bool {};
3976 struct generic_uint8 {};
3977 struct generic_uint16 {};
3978 struct generic_uint24 {};
3979 struct generic_uint32 {};
3980 struct generic_uint48 {};
3981 struct generic_uint64 {};
3982 struct generic_float {};
3983 struct generic_double {};
3984 struct generic_ldouble {};
3985 }
3986 
3987 template< typename tag_name>
3988 struct generic {
3989 };
3990 
3991 using generic_bool = ::color::category::generic< ::color::category::_internal::generic_bool >;
3992 using generic_uint8 = ::color::category::generic< ::color::category::_internal::generic_uint8 >;
3993 using generic_uint16 = ::color::category::generic< ::color::category::_internal::generic_uint16 >;
3994 using generic_uint24 = ::color::category::generic< ::color::category::_internal::generic_uint24 >;
3995 using generic_uint32 = ::color::category::generic< ::color::category::_internal::generic_uint32 >;
3996 using generic_uint48 = ::color::category::generic< ::color::category::_internal::generic_uint48 >;
3997 using generic_uint64 = ::color::category::generic< ::color::category::_internal::generic_uint64 >;
3998 using generic_float = ::color::category::generic< ::color::category::_internal::generic_float >;
3999 using generic_double = ::color::category::generic< ::color::category::_internal::generic_double >;
4000 using generic_ldouble = ::color::category::generic< ::color::category::_internal::generic_ldouble >;
4001 
4002 }
4003 
4004 }
4005 
4006 namespace color {
4007 namespace constant {
4008 
4009 template< typename category_name >
4010 struct generic {
4011 public:
4012 	typedef category_name category_type;
4013 
4014 	typedef typename ::color::trait::scalar< category_name >::instance_type scalar_type;
4015 
4016 	typedef ::color::constant::generic<category_type> this_type;
4017 
zerocolor::constant::generic4018 	static scalar_type const zero() {
4019 		return scalar_type(0);
4020 	}
sixthcolor::constant::generic4021 	static scalar_type const sixth() {
4022 		return scalar_type(1) / scalar_type(6);
4023 	}
thirdcolor::constant::generic4024 	static scalar_type const third() {
4025 		return scalar_type(1) / scalar_type(3);
4026 	}
halfcolor::constant::generic4027 	static scalar_type const half() {
4028 		return scalar_type(0.5);
4029 	}
inv_sqrt_3color::constant::generic4030 	static scalar_type const inv_sqrt_3() {
4031 		return scalar_type(1) / sqrt(scalar_type(3));
4032 	}
two_thirdcolor::constant::generic4033 	static scalar_type const two_third() {
4034 		return scalar_type(2) / scalar_type(3);
4035 	}
onecolor::constant::generic4036 	static scalar_type const one() {
4037 		return scalar_type(1);
4038 	}
twocolor::constant::generic4039 	static scalar_type const two() {
4040 		return scalar_type(2);
4041 	}
sqrt_3color::constant::generic4042 	static scalar_type const sqrt_3() {
4043 		return sqrt(scalar_type(3));
4044 	}
picolor::constant::generic4045 	static scalar_type const pi() {
4046 		return scalar_type(3.141592653589793238462643383279502884197169399375105820974944592307816406286);
4047 	}
pi_halfcolor::constant::generic4048 	static scalar_type const pi_half() {
4049 		return this_type::pi() / scalar_type(2) ;
4050 	}
two_picolor::constant::generic4051 	static scalar_type const two_pi() {
4052 		return scalar_type(2) * this_type::pi();
4053 	}
deg60color::constant::generic4054 	static scalar_type const deg60() {
4055 		return this_type::pi() / scalar_type(3);
4056 	}
deg90color::constant::generic4057 	static scalar_type const deg90() {
4058 		return this_type::pi() / scalar_type(2);
4059 	}
deg120color::constant::generic4060 	static scalar_type const deg120() {
4061 		return scalar_type(2) * this_type::pi() / scalar_type(3);
4062 	}
deg180color::constant::generic4063 	static scalar_type const deg180() {
4064 		return this_type::pi() * scalar_type(2);
4065 	}
deg240color::constant::generic4066 	static scalar_type const deg240() {
4067 		return scalar_type(4) * this_type::pi() / scalar_type(3);
4068 	}
4069 
deg2radcolor::constant::generic4070 	static scalar_type const deg2rad() {
4071 		return this_type::pi()/scalar_type(180);
4072 	}
rad2degcolor::constant::generic4073 	static scalar_type const rad2deg() {
4074 		return scalar_type(180)/this_type::pi();
4075 	}
4076 
4077 };
4078 
4079 }
4080 }
4081 
4082 namespace color {
4083 namespace category {
4084 
4085 template< typename tag_name >
4086 struct cmy {
4087 	typedef void category_name;
4088 };
4089 
4090 using cmy_uint8 = ::color::category::cmy< std::uint8_t >;
4091 using cmy_uint16 = ::color::category::cmy< std::uint16_t >;
4092 
4093 using cmy_uint32 = ::color::category::cmy< std::uint32_t >;
4094 
4095 using cmy_uint64 = ::color::category::cmy< std::uint64_t >;
4096 using cmy_float = ::color::category::cmy< float >;
4097 using cmy_double = ::color::category::cmy< double >;
4098 using cmy_ldouble = ::color::category::cmy< long double >;
4099 
4100 }
4101 }
4102 
4103 namespace color {
4104 namespace category {
4105 
4106 template< typename tag_name >
4107 struct gray {
4108 	typedef void tag_type;
4109 };
4110 
4111 using gray_bool = ::color::category::gray< bool >;
4112 using gray_uint8 = ::color::category::gray< std::uint8_t >;
4113 using gray_uint16 = ::color::category::gray< std::uint16_t >;
4114 
4115 using gray_uint32 = ::color::category::gray< std::uint32_t >;
4116 
4117 using gray_uint64 = ::color::category::gray< std::uint64_t >;
4118 using gray_float = ::color::category::gray< float >;
4119 using gray_double = ::color::category::gray< double >;
4120 using gray_ldouble = ::color::category::gray< long double >;
4121 
4122 }
4123 }
4124 
4125 namespace color {
4126 namespace akin {
4127 
4128 template< >struct cmy< ::color::category::gray_uint8 > {
4129 	typedef ::color::category::cmy_uint8 akin_type;
4130 };
4131 template< >struct cmy< ::color::category::gray_uint16 > {
4132 	typedef ::color::category::cmy_uint16 akin_type;
4133 };
4134 template< >struct cmy< ::color::category::gray_uint32 > {
4135 	typedef ::color::category::cmy_uint32 akin_type;
4136 };
4137 template< >struct cmy< ::color::category::gray_uint64 > {
4138 	typedef ::color::category::cmy_uint64 akin_type;
4139 };
4140 template< >struct cmy< ::color::category::gray_float > {
4141 	typedef ::color::category::cmy_float akin_type;
4142 };
4143 template< >struct cmy< ::color::category::gray_double > {
4144 	typedef ::color::category::cmy_double akin_type;
4145 };
4146 template< >struct cmy< ::color::category::gray_ldouble > {
4147 	typedef ::color::category::cmy_ldouble akin_type;
4148 };
4149 
4150 }
4151 }
4152 
4153 namespace color {
4154 namespace akin {
4155 
4156 template< typename tag_name >
4157 struct cmy< ::color::category::cmy< tag_name > > {
4158 public:
4159 	typedef ::color::category::cmy< tag_name > akin_type;
4160 };
4161 
4162 }
4163 }
4164 
4165 namespace color {
4166 namespace category {
4167 
4168 template< typename tag_name >
4169 struct cmyk {
4170 	typedef void category_name;
4171 };
4172 
4173 using cmyk_uint8 = ::color::category::cmyk< std::uint8_t >;
4174 using cmyk_uint16 = ::color::category::cmyk< std::uint16_t >;
4175 
4176 using cmyk_uint32 = ::color::category::cmyk< std::uint32_t >;
4177 
4178 using cmyk_uint64 = ::color::category::cmyk< std::uint64_t >;
4179 using cmyk_float = ::color::category::cmyk< float >;
4180 using cmyk_double = ::color::category::cmyk< double >;
4181 using cmyk_ldouble = ::color::category::cmyk< long double >;
4182 
4183 }
4184 }
4185 
4186 namespace color {
4187 namespace akin {
4188 
4189 template< typename tag_name >
4190 struct cmy< ::color::category::cmyk< tag_name > > {
4191 public:
4192 	typedef ::color::category::cmy< tag_name > akin_type;
4193 };
4194 
4195 }
4196 }
4197 
4198 namespace color {
4199 namespace category {
4200 
4201 template< typename tag_name >
4202 struct hsl {
4203 	typedef void tag_type;
4204 };
4205 
4206 using hsl_bool = ::color::category::hsl< bool >;
4207 using hsl_uint8 = ::color::category::hsl< std::uint8_t >;
4208 using hsl_uint16 = ::color::category::hsl< std::uint16_t >;
4209 
4210 using hsl_uint32 = ::color::category::hsl< std::uint32_t >;
4211 
4212 using hsl_uint64 = ::color::category::hsl< std::uint64_t >;
4213 using hsl_float = ::color::category::hsl< float >;
4214 using hsl_double = ::color::category::hsl< double >;
4215 using hsl_ldouble = ::color::category::hsl< long double >;
4216 
4217 }
4218 }
4219 
4220 namespace color {
4221 namespace akin {
4222 
4223 template< typename tag_name >
4224 struct cmy< ::color::category::hsl< tag_name > > {
4225 public:
4226 	typedef ::color::category::cmy< tag_name > akin_type;
4227 };
4228 
4229 }
4230 }
4231 
4232 namespace color {
4233 namespace category {
4234 
4235 template< typename tag_name >
4236 struct hsv {
4237 	typedef void tag_type;
4238 };
4239 
4240 using hsv_uint8 = ::color::category::hsv< std::uint8_t >;
4241 using hsv_uint16 = ::color::category::hsv< std::uint16_t >;
4242 
4243 using hsv_uint32 = ::color::category::hsv< std::uint32_t >;
4244 
4245 using hsv_uint64 = ::color::category::hsv< std::uint64_t >;
4246 using hsv_float = ::color::category::hsv< float >;
4247 using hsv_double = ::color::category::hsv< double >;
4248 using hsv_ldouble = ::color::category::hsv< long double >;
4249 
4250 }
4251 }
4252 
4253 namespace color {
4254 namespace akin {
4255 
4256 template< typename tag_name >
4257 struct cmy< ::color::category::hsv< tag_name > > {
4258 public:
4259 	typedef ::color::category::cmy< tag_name > akin_type;
4260 };
4261 
4262 }
4263 }
4264 
4265 namespace color {
4266 namespace category {
4267 
4268 template< typename tag_name >
4269 struct hsi {
4270 	typedef void tag_type;
4271 };
4272 
4273 using hsi_uint8 = ::color::category::hsi< std::uint8_t >;
4274 using hsi_uint16 = ::color::category::hsi< std::uint16_t >;
4275 
4276 using hsi_uint32 = ::color::category::hsi< std::uint32_t >;
4277 
4278 using hsi_uint64 = ::color::category::hsi< std::uint64_t >;
4279 using hsi_float = ::color::category::hsi< float >;
4280 using hsi_double = ::color::category::hsi< double >;
4281 using hsi_ldouble = ::color::category::hsi< long double >;
4282 
4283 }
4284 }
4285 
4286 namespace color {
4287 namespace akin {
4288 
4289 template< typename tag_name >
4290 struct cmy< ::color::category::hsi< tag_name > > {
4291 public:
4292 	typedef ::color::category::cmy< tag_name > akin_type;
4293 };
4294 
4295 }
4296 }
4297 
4298 namespace color {
4299 namespace category {
4300 
4301 template< typename tag_name >
4302 struct hwb {
4303 	typedef void tag_type;
4304 };
4305 
4306 using hwb_uint8 = ::color::category::hwb< std::uint8_t >;
4307 using hwb_uint16 = ::color::category::hwb< std::uint16_t >;
4308 
4309 using hwb_uint32 = ::color::category::hwb< std::uint32_t >;
4310 
4311 using hwb_uint64 = ::color::category::hwb< std::uint64_t >;
4312 using hwb_float = ::color::category::hwb< float >;
4313 using hwb_double = ::color::category::hwb< double >;
4314 using hwb_ldouble = ::color::category::hwb< long double >;
4315 
4316 }
4317 }
4318 
4319 namespace color {
4320 namespace akin {
4321 
4322 template
4323 <
4324 	typename tag_name
4325 
4326 	>
4327 struct cmy< ::color::category::hwb< tag_name > > {
4328 public:
4329 	typedef ::color::category::cmy< tag_name > akin_type;
4330 };
4331 
4332 }
4333 }
4334 
4335 namespace color {
4336 
4337 namespace category {
4338 
4339 }
4340 }
4341 
4342 namespace color {
4343 namespace category {
4344 
4345 struct error_t {};
4346 
4347 typedef ::color::category::error_t error_t;
4348 
4349 }
4350 }
4351 
4352 namespace color {
4353 namespace category {
4354 
4355 template< typename tag_name >
4356 struct rgb {
4357 	typedef tag_name tag_type;
4358 };
4359 
4360 template< typename tag_name >
4361 struct rgba
4362 	: public ::color::category::rgb< tag_name > {
4363 	typedef tag_name tag_type;
4364 };
4365 
4366 namespace _internal {
4367 template< typename value_name, unsigned red_position, unsigned green_position, unsigned blue_position >
4368 struct rgb_scramble : public ::color::type::scramble3< red_position, green_position, blue_position > {};
4369 
4370 template< typename value_name, unsigned red_position, unsigned green_position, unsigned blue_position, unsigned alpha_position >
4371 struct rgba_scramble : public ::color::type::scramble4< red_position, green_position, blue_position, alpha_position > {};
4372 }
4373 
4374 namespace _internal {
4375 using rgb_error = ::color::category::_internal::rgb_scramble< ::color::type::error_t, 0, 1, 2 >;
4376 
4377 using rgb_uint8 = ::color::category::_internal::rgb_scramble< std::uint8_t, 0, 1, 2 >;
4378 using rgb_uint16 = ::color::category::_internal::rgb_scramble< std::uint16_t, 0, 1, 2 >;
4379 using rgb_uint32 = ::color::category::_internal::rgb_scramble< std::uint32_t, 0, 1, 2 >;
4380 using rgb_uint64 = ::color::category::_internal::rgb_scramble< std::uint64_t, 0, 1, 2 >;
4381 using rgb_float = ::color::category::_internal::rgb_scramble< float, 0, 1, 2 >;
4382 using rgb_double = ::color::category::_internal::rgb_scramble< double, 0, 1, 2 >;
4383 using rgb_ldouble = ::color::category::_internal::rgb_scramble< long double, 0, 1, 2 >;
4384 
4385 template < unsigned red_size, unsigned green_size, unsigned blue_size >
4386 using rgb_pack = ::color::category::_internal::rgb_scramble< ::color::type::pack3< red_size, green_size, blue_size >, 0, 1, 2 >;
4387 }
4388 
4389 using rgb_error = ::color::category::rgb< ::color::category::_internal::rgb_error >;
4390 using rgb_uint8 = ::color::category::rgb< ::color::category::_internal::rgb_uint8 >;
4391 using rgb_uint16 = ::color::category::rgb< ::color::category::_internal::rgb_uint16 >;
4392 using rgb_uint32 = ::color::category::rgb< ::color::category::_internal::rgb_uint32 >;
4393 using rgb_uint64 = ::color::category::rgb< ::color::category::_internal::rgb_uint64 >;
4394 using rgb_float = ::color::category::rgb< ::color::category::_internal::rgb_float >;
4395 using rgb_double = ::color::category::rgb< ::color::category::_internal::rgb_double >;
4396 using rgb_ldouble = ::color::category::rgb< ::color::category::_internal::rgb_ldouble >;
4397 
4398 template < unsigned red_size, unsigned green_size, unsigned blue_size >
4399 using rgb_pack = ::color::category::rgb< ::color::category::_internal::rgb_pack< red_size, green_size, blue_size > >;
4400 
4401 namespace _internal {
4402 using rgba_error = ::color::category::_internal::rgba_scramble< ::color::type::error_t, 0, 1, 2, 3 >;
4403 
4404 using rgba_uint8 = ::color::category::_internal::rgba_scramble< std::uint8_t, 0, 1, 2, 3 >;
4405 using rgba_uint16 = ::color::category::_internal::rgba_scramble< std::uint16_t, 0, 1, 2, 3 >;
4406 using rgba_uint32 = ::color::category::_internal::rgba_scramble< std::uint32_t, 0, 1, 2, 3 >;
4407 using rgba_uint64 = ::color::category::_internal::rgba_scramble< std::uint64_t, 0, 1, 2, 3 >;
4408 using rgba_float = ::color::category::_internal::rgba_scramble< float, 0, 1, 2, 3 >;
4409 using rgba_double = ::color::category::_internal::rgba_scramble< double, 0, 1, 2, 3 >;
4410 using rgba_ldouble = ::color::category::_internal::rgba_scramble< long double, 0, 1, 2, 3 >;
4411 
4412 template < unsigned red_size, unsigned green_size, unsigned blue_size, unsigned alpha_size >
4413 using rgba_pack = ::color::category::_internal::rgba_scramble< ::color::type::pack4< red_size, green_size, blue_size, alpha_size >, 0, 1, 2, 3 >;
4414 }
4415 
4416 using rgba_error = ::color::category::rgb< ::color::category::_internal::rgba_error >;
4417 using rgba_uint8 = ::color::category::rgb< ::color::category::_internal::rgba_uint8 >;
4418 using rgba_uint16 = ::color::category::rgb< ::color::category::_internal::rgba_uint16 >;
4419 using rgba_uint32 = ::color::category::rgb< ::color::category::_internal::rgba_uint32 >;
4420 using rgba_uint64 = ::color::category::rgb< ::color::category::_internal::rgba_uint64 >;
4421 using rgba_float = ::color::category::rgb< ::color::category::_internal::rgba_float >;
4422 using rgba_double = ::color::category::rgb< ::color::category::_internal::rgba_double >;
4423 using rgba_ldouble = ::color::category::rgb< ::color::category::_internal::rgba_ldouble >;
4424 
4425 template < unsigned red_size, unsigned green_size, unsigned blue_size, unsigned alpha_size >
4426 using rgba_pack = ::color::category::rgb< ::color::category::_internal::rgba_pack< red_size, green_size, blue_size, alpha_size > >;
4427 
4428 namespace _internal {
4429 using argb_error = ::color::category::_internal::rgba_scramble< ::color::type::error_t, 3, 0, 1, 2 >;
4430 
4431 using argb_uint8 = ::color::category::_internal::rgba_scramble< std::uint8_t, 3, 0, 1, 2 >;
4432 using argb_uint16 = ::color::category::_internal::rgba_scramble< std::uint16_t, 3, 0, 1, 2 >;
4433 using argb_uint32 = ::color::category::_internal::rgba_scramble< std::uint32_t, 3, 0, 1, 2 >;
4434 using argb_uint64 = ::color::category::_internal::rgba_scramble< std::uint64_t, 3, 0, 1, 2 >;
4435 using argb_float = ::color::category::_internal::rgba_scramble< float, 3, 0, 1, 2 >;
4436 using argb_double = ::color::category::_internal::rgba_scramble< double, 3, 0, 1, 2 >;
4437 using argb_ldouble = ::color::category::_internal::rgba_scramble< long double, 3, 0, 1, 2 >;
4438 
4439 template < unsigned red_size, unsigned green_size, unsigned blue_size, unsigned alpha_size >
4440 using argb_pack = ::color::category::_internal::rgba_scramble< ::color::type::pack4< red_size, green_size, blue_size, alpha_size >, 3, 0, 1, 2 >;
4441 }
4442 
4443 using argb_error = ::color::category::rgb< ::color::category::_internal::argb_error >;
4444 using argb_uint8 = ::color::category::rgb< ::color::category::_internal::argb_uint8 >;
4445 using argb_uint16 = ::color::category::rgb< ::color::category::_internal::argb_uint16 >;
4446 using argb_uint32 = ::color::category::rgb< ::color::category::_internal::argb_uint32 >;
4447 using argb_uint64 = ::color::category::rgb< ::color::category::_internal::argb_uint64 >;
4448 using argb_float = ::color::category::rgb< ::color::category::_internal::argb_float >;
4449 using argb_double = ::color::category::rgb< ::color::category::_internal::argb_double >;
4450 using argb_ldouble = ::color::category::rgb< ::color::category::_internal::argb_ldouble >;
4451 
4452 template < unsigned red_size, unsigned green_size, unsigned blue_size, unsigned alpha_size >
4453 using argb_pack = ::color::category::rgb< ::color::category::_internal::argb_pack< red_size, green_size, blue_size, alpha_size > >;
4454 
4455 namespace _internal {
4456 using bgr_error = ::color::category::_internal::rgb_scramble< ::color::type::error_t, 2, 1, 0 >;
4457 
4458 using bgr_uint8 = ::color::category::_internal::rgb_scramble< std::uint8_t, 2, 1, 0 >;
4459 using bgr_uint16 = ::color::category::_internal::rgb_scramble< std::uint16_t, 2, 1, 0 >;
4460 using bgr_uint32 = ::color::category::_internal::rgb_scramble< std::uint32_t, 2, 1, 0 >;
4461 using bgr_uint64 = ::color::category::_internal::rgb_scramble< std::uint64_t, 2, 1, 0 >;
4462 using bgr_float = ::color::category::_internal::rgb_scramble< float, 2, 1, 0 >;
4463 using bgr_double = ::color::category::_internal::rgb_scramble< double, 2, 1, 0 >;
4464 using bgr_ldouble = ::color::category::_internal::rgb_scramble< long double, 2, 1, 0 >;
4465 
4466 template < unsigned red_size, unsigned green_size, unsigned blue_size >
4467 using bgr_pack = ::color::category::_internal::rgb_scramble< ::color::type::pack3< red_size, green_size, blue_size>, 2, 1, 0 >;
4468 }
4469 
4470 using bgr_error = ::color::category::rgb< ::color::category::_internal::bgr_error >;
4471 using bgr_uint8 = ::color::category::rgb< ::color::category::_internal::bgr_uint8 >;
4472 using bgr_uint16 = ::color::category::rgb< ::color::category::_internal::bgr_uint16 >;
4473 using bgr_uint32 = ::color::category::rgb< ::color::category::_internal::bgr_uint32 >;
4474 using bgr_uint64 = ::color::category::rgb< ::color::category::_internal::bgr_uint64 >;
4475 using bgr_float = ::color::category::rgb< ::color::category::_internal::bgr_float >;
4476 using bgr_double = ::color::category::rgb< ::color::category::_internal::bgr_double >;
4477 using bgr_ldouble = ::color::category::rgb< ::color::category::_internal::bgr_ldouble >;
4478 
4479 template < unsigned red_size, unsigned green_size, unsigned blue_size >
4480 using bgr_pack = ::color::category::rgb< ::color::category::_internal::bgr_pack< red_size, green_size, blue_size > >;
4481 
4482 namespace _internal {
4483 using bgra_error = ::color::category::_internal::rgba_scramble< ::color::type::error_t, 2, 1, 0, 3 >;
4484 using bgra_uint8 = ::color::category::_internal::rgba_scramble< std::uint8_t, 2, 1, 0, 3 >;
4485 using bgra_uint16 = ::color::category::_internal::rgba_scramble< std::uint16_t, 2, 1, 0, 3 >;
4486 using bgra_uint32 = ::color::category::_internal::rgba_scramble< std::uint32_t, 2, 1, 0, 3 >;
4487 using bgra_uint64 = ::color::category::_internal::rgba_scramble< std::uint64_t, 2, 1, 0, 3 >;
4488 using bgra_float = ::color::category::_internal::rgba_scramble< float, 2, 1, 0, 3 >;
4489 using bgra_double = ::color::category::_internal::rgba_scramble< double, 2, 1, 0, 3 >;
4490 using bgra_ldouble = ::color::category::_internal::rgba_scramble< long double, 2, 1, 0, 3 >;
4491 
4492 template < unsigned red_size, unsigned green_size, unsigned blue_size, unsigned alpha_size >
4493 using bgra_pack = ::color::category::_internal::rgba_scramble< ::color::type::pack4< red_size, green_size, blue_size, alpha_size>, 2, 1, 0, 3 >;
4494 }
4495 
4496 using bgra_error = ::color::category::rgb< ::color::category::_internal::bgra_error >;
4497 using bgra_uint8 = ::color::category::rgb< ::color::category::_internal::bgra_uint8 >;
4498 using bgra_uint16 = ::color::category::rgb< ::color::category::_internal::bgra_uint16 >;
4499 using bgra_uint32 = ::color::category::rgb< ::color::category::_internal::bgra_uint32 >;
4500 using bgra_uint64 = ::color::category::rgb< ::color::category::_internal::bgra_uint64 >;
4501 using bgra_float = ::color::category::rgb< ::color::category::_internal::bgra_float >;
4502 using bgra_double = ::color::category::rgb< ::color::category::_internal::bgra_double >;
4503 using bgra_ldouble = ::color::category::rgb< ::color::category::_internal::bgra_ldouble >;
4504 
4505 template < unsigned red_size, unsigned green_size, unsigned blue_size, unsigned alpha_size >
4506 using bgra_pack = ::color::category::rgb< ::color::category::_internal::bgra_pack< red_size, green_size, blue_size, alpha_size > >;
4507 
4508 namespace _internal {
4509 using abgr_error = ::color::category::_internal::rgba_scramble< ::color::type::error_t, 3, 2, 1, 0 >;
4510 using abgr_uint8 = ::color::category::_internal::rgba_scramble< std::uint8_t, 3, 2, 1, 0 >;
4511 using abgr_uint16 = ::color::category::_internal::rgba_scramble< std::uint16_t, 3, 2, 1, 0 >;
4512 using abgr_uint32 = ::color::category::_internal::rgba_scramble< std::uint32_t, 3, 2, 1, 0 >;
4513 using abgr_uint64 = ::color::category::_internal::rgba_scramble< std::uint64_t, 3, 2, 1, 0 >;
4514 using abgr_float = ::color::category::_internal::rgba_scramble< float, 3, 2, 1, 0 >;
4515 using abgr_double = ::color::category::_internal::rgba_scramble< double, 3, 2, 1, 0 >;
4516 using abgr_ldouble = ::color::category::_internal::rgba_scramble< long double, 3, 2, 1, 0 >;
4517 
4518 template < unsigned red_size, unsigned green_size, unsigned blue_size, unsigned alpha_size >
4519 using abgr_pack = ::color::category::_internal::rgba_scramble< ::color::type::pack4< red_size, green_size, blue_size, alpha_size>, 3, 2, 1, 0 >;
4520 }
4521 
4522 using abgr_error = ::color::category::rgb< ::color::category::_internal::abgr_error >;
4523 using abgr_uint8 = ::color::category::rgb< ::color::category::_internal::abgr_uint8 >;
4524 using abgr_uint16 = ::color::category::rgb< ::color::category::_internal::abgr_uint16 >;
4525 using abgr_uint32 = ::color::category::rgb< ::color::category::_internal::abgr_uint32 >;
4526 using abgr_uint64 = ::color::category::rgb< ::color::category::_internal::abgr_uint64 >;
4527 using abgr_float = ::color::category::rgb< ::color::category::_internal::abgr_float >;
4528 using abgr_double = ::color::category::rgb< ::color::category::_internal::abgr_double >;
4529 using abgr_ldouble = ::color::category::rgb< ::color::category::_internal::abgr_ldouble >;
4530 
4531 template < unsigned red_size, unsigned green_size, unsigned blue_size, unsigned alpha_size >
4532 using abgr_pack = ::color::category::rgb< ::color::category::_internal::abgr_pack< red_size, green_size, blue_size, alpha_size > >;
4533 
4534 }
4535 }
4536 
4537 namespace color {
4538 namespace akin {
4539 
4540 template< >struct cmy< ::color::category::rgb_uint8 > {
4541 	typedef ::color::category::cmy_uint8 akin_type;
4542 };
4543 template< >struct cmy< ::color::category::rgb_uint16 > {
4544 	typedef ::color::category::cmy_uint16 akin_type;
4545 };
4546 template< >struct cmy< ::color::category::rgb_uint32 > {
4547 	typedef ::color::category::cmy_uint32 akin_type;
4548 };
4549 template< >struct cmy< ::color::category::rgb_uint64 > {
4550 	typedef ::color::category::cmy_uint64 akin_type;
4551 };
4552 template< >struct cmy< ::color::category::rgb_float > {
4553 	typedef ::color::category::cmy_float akin_type;
4554 };
4555 template< >struct cmy< ::color::category::rgb_double > {
4556 	typedef ::color::category::cmy_double akin_type;
4557 };
4558 template< >struct cmy< ::color::category::rgb_ldouble > {
4559 	typedef ::color::category::cmy_ldouble akin_type;
4560 };
4561 
4562 }
4563 }
4564 
4565 namespace color {
4566 namespace category {
4567 
4568 template< typename tag_name >
4569 struct yiq {
4570 	typedef void tag_type;
4571 };
4572 
4573 using yiq_bool = ::color::category::yiq< bool >;
4574 using yiq_uint8 = ::color::category::yiq< std::uint8_t >;
4575 using yiq_uint16 = ::color::category::yiq< std::uint16_t >;
4576 
4577 using yiq_uint32 = ::color::category::yiq< std::uint32_t >;
4578 
4579 using yiq_uint64 = ::color::category::yiq< std::uint64_t >;
4580 using yiq_float = ::color::category::yiq< float >;
4581 using yiq_double = ::color::category::yiq< double >;
4582 using yiq_ldouble = ::color::category::yiq< long double >;
4583 
4584 }
4585 }
4586 
4587 namespace color {
4588 namespace akin {
4589 
4590 template< typename tag_name >
4591 struct cmy< ::color::category::yiq< tag_name > > {
4592 public:
4593 	typedef ::color::category::cmy< tag_name > akin_type;
4594 };
4595 
4596 }
4597 }
4598 
4599 namespace color {
4600 namespace category {
4601 
4602 template< typename tag_name, ::color::constant::yuv::reference_enum reference_number >
4603 struct yuv {
4604 	typedef tag_name tag_type;
4605 };
4606 
4607 template< ::color::constant::yuv::reference_enum reference_number > using yuv_uint8 = ::color::category::yuv< std::uint8_t, reference_number >;
4608 template< ::color::constant::yuv::reference_enum reference_number > using yuv_uint16 = ::color::category::yuv< std::uint16_t, reference_number >;
4609 
4610 template< ::color::constant::yuv::reference_enum reference_number > using yuv_uint32 = ::color::category::yuv< std::uint32_t, reference_number >;
4611 
4612 template< ::color::constant::yuv::reference_enum reference_number > using yuv_uint64 = ::color::category::yuv< std::uint64_t, reference_number >;
4613 template< ::color::constant::yuv::reference_enum reference_number > using yuv_float = ::color::category::yuv< float, reference_number >;
4614 template< ::color::constant::yuv::reference_enum reference_number > using yuv_double = ::color::category::yuv< double, reference_number >;
4615 template< ::color::constant::yuv::reference_enum reference_number > using yuv_ldouble = ::color::category::yuv< long double, reference_number >;
4616 
4617 }
4618 }
4619 
4620 namespace color {
4621 namespace akin {
4622 
4623 template< ::color::constant::yuv::reference_enum reference_number >struct cmy< ::color::category::yuv_uint8 <reference_number> > {
4624 	typedef ::color::category::cmy_uint8 akin_type;
4625 };
4626 template< ::color::constant::yuv::reference_enum reference_number >struct cmy< ::color::category::yuv_uint16 <reference_number> > {
4627 	typedef ::color::category::cmy_uint16 akin_type;
4628 };
4629 template< ::color::constant::yuv::reference_enum reference_number >struct cmy< ::color::category::yuv_uint32 <reference_number> > {
4630 	typedef ::color::category::cmy_uint32 akin_type;
4631 };
4632 template< ::color::constant::yuv::reference_enum reference_number >struct cmy< ::color::category::yuv_uint64 <reference_number> > {
4633 	typedef ::color::category::cmy_uint64 akin_type;
4634 };
4635 template< ::color::constant::yuv::reference_enum reference_number >struct cmy< ::color::category::yuv_float <reference_number> > {
4636 	typedef ::color::category::cmy_float akin_type;
4637 };
4638 template< ::color::constant::yuv::reference_enum reference_number >struct cmy< ::color::category::yuv_double <reference_number> > {
4639 	typedef ::color::category::cmy_double akin_type;
4640 };
4641 template< ::color::constant::yuv::reference_enum reference_number >struct cmy< ::color::category::yuv_ldouble<reference_number> > {
4642 	typedef ::color::category::cmy_ldouble akin_type;
4643 };
4644 
4645 }
4646 }
4647 
4648 namespace color {
4649 namespace category {
4650 
4651 template< typename tag_name >
4652 struct YCgCo {
4653 	typedef void tag_type;
4654 };
4655 
4656 using YCgCo_uint8 = ::color::category::YCgCo< std::uint8_t >;
4657 using YCgCo_uint16 = ::color::category::YCgCo< std::uint16_t >;
4658 
4659 using YCgCo_uint32 = ::color::category::YCgCo< std::uint32_t >;
4660 
4661 using YCgCo_uint64 = ::color::category::YCgCo< std::uint64_t >;
4662 using YCgCo_float = ::color::category::YCgCo< float >;
4663 using YCgCo_double = ::color::category::YCgCo< double >;
4664 using YCgCo_ldouble = ::color::category::YCgCo< long double >;
4665 
4666 }
4667 }
4668 
4669 namespace color {
4670 namespace akin {
4671 
4672 template< typename tag_name >
4673 struct cmy< ::color::category::YCgCo< tag_name > > {
4674 public:
4675 	typedef ::color::category::cmy< tag_name > akin_type;
4676 };
4677 
4678 }
4679 }
4680 
4681 namespace color {
4682 namespace category {
4683 
4684 template< typename tag_name >
4685 struct YDbDr {
4686 	typedef void tag_type;
4687 };
4688 
4689 using YDbDr_bool = ::color::category::YDbDr< bool >;
4690 using YDbDr_uint8 = ::color::category::YDbDr< std::uint8_t >;
4691 using YDbDr_uint16 = ::color::category::YDbDr< std::uint16_t >;
4692 
4693 using YDbDr_uint32 = ::color::category::YDbDr< std::uint32_t >;
4694 
4695 using YDbDr_uint64 = ::color::category::YDbDr< std::uint64_t >;
4696 using YDbDr_float = ::color::category::YDbDr< float >;
4697 using YDbDr_double = ::color::category::YDbDr< double >;
4698 using YDbDr_ldouble = ::color::category::YDbDr< long double >;
4699 
4700 }
4701 }
4702 
4703 namespace color {
4704 namespace akin {
4705 
4706 template< typename tag_name >
4707 struct cmy< ::color::category::YDbDr< tag_name > > {
4708 public:
4709 	typedef ::color::category::cmy< tag_name > akin_type;
4710 };
4711 
4712 }
4713 }
4714 
4715 namespace color {
4716 namespace category {
4717 
4718 template< typename tag_name, ::color::constant::YPbPr::reference_enum reference_number >
4719 struct YPbPr {
4720 	typedef void tag_type;
4721 };
4722 
4723 template< ::color::constant::YPbPr::reference_enum reference_number > using YPbPr_uint8 = ::color::category::YPbPr< std::uint8_t, reference_number >;
4724 template< ::color::constant::YPbPr::reference_enum reference_number > using YPbPr_uint16 = ::color::category::YPbPr< std::uint16_t, reference_number >;
4725 
4726 template< ::color::constant::YPbPr::reference_enum reference_number > using YPbPr_uint32 = ::color::category::YPbPr< std::uint32_t, reference_number >;
4727 
4728 template< ::color::constant::YPbPr::reference_enum reference_number > using YPbPr_uint64 = ::color::category::YPbPr< std::uint64_t, reference_number >;
4729 template< ::color::constant::YPbPr::reference_enum reference_number > using YPbPr_float = ::color::category::YPbPr< float, reference_number >;
4730 template< ::color::constant::YPbPr::reference_enum reference_number > using YPbPr_double = ::color::category::YPbPr< double, reference_number >;
4731 template< ::color::constant::YPbPr::reference_enum reference_number > using YPbPr_ldouble = ::color::category::YPbPr< long double, reference_number >;
4732 
4733 }
4734 }
4735 
4736 namespace color {
4737 namespace akin {
4738 
4739 template< ::color::constant::YPbPr::reference_enum reference_number >struct cmy< ::color::category::YPbPr_uint8 <reference_number> > {
4740 	typedef ::color::category::cmy_uint8 akin_type;
4741 };
4742 template< ::color::constant::YPbPr::reference_enum reference_number >struct cmy< ::color::category::YPbPr_uint16 <reference_number> > {
4743 	typedef ::color::category::cmy_uint16 akin_type;
4744 };
4745 template< ::color::constant::YPbPr::reference_enum reference_number >struct cmy< ::color::category::YPbPr_uint32 <reference_number> > {
4746 	typedef ::color::category::cmy_uint32 akin_type;
4747 };
4748 template< ::color::constant::YPbPr::reference_enum reference_number >struct cmy< ::color::category::YPbPr_uint64 <reference_number> > {
4749 	typedef ::color::category::cmy_uint64 akin_type;
4750 };
4751 template< ::color::constant::YPbPr::reference_enum reference_number >struct cmy< ::color::category::YPbPr_float <reference_number> > {
4752 	typedef ::color::category::cmy_float akin_type;
4753 };
4754 template< ::color::constant::YPbPr::reference_enum reference_number >struct cmy< ::color::category::YPbPr_double <reference_number> > {
4755 	typedef ::color::category::cmy_double akin_type;
4756 };
4757 template< ::color::constant::YPbPr::reference_enum reference_number >struct cmy< ::color::category::YPbPr_ldouble<reference_number> > {
4758 	typedef ::color::category::cmy_ldouble akin_type;
4759 };
4760 
4761 }
4762 }
4763 
4764 namespace color {
4765 namespace category {
4766 
4767 template< typename tag_name >
4768 struct xyz {
4769 	typedef void tag_type;
4770 };
4771 
4772 using xyz_bool = ::color::category::xyz< bool >;
4773 using xyz_uint8 = ::color::category::xyz< std::uint8_t >;
4774 using xyz_uint16 = ::color::category::xyz< std::uint16_t >;
4775 
4776 using xyz_uint32 = ::color::category::xyz< std::uint32_t >;
4777 
4778 using xyz_uint64 = ::color::category::xyz< std::uint64_t >;
4779 using xyz_float = ::color::category::xyz< float >;
4780 using xyz_double = ::color::category::xyz< double >;
4781 using xyz_ldouble = ::color::category::xyz< long double >;
4782 
4783 }
4784 }
4785 
4786 namespace color {
4787 namespace akin {
4788 
4789 template< typename tag_name >
4790 struct cmy< ::color::category::xyz< tag_name > > {
4791 public:
4792 	typedef ::color::category::cmy< tag_name > akin_type;
4793 };
4794 
4795 }
4796 }
4797 
4798 namespace color {
4799 namespace category {
4800 
4801 template
4802 <
4803 	typename tag_name
4804 	,::color::constant::lab::reference_enum reference_number
4805 	>
4806 struct lab {
4807 	typedef void tag_type;
4808 };
4809 
4810 template< ::color::constant::lab::reference_enum reference_number= ::color::constant::lab::CIE_entity > using lab_uint8 = ::color::category::lab< std::uint8_t, reference_number >;
4811 template< ::color::constant::lab::reference_enum reference_number= ::color::constant::lab::CIE_entity > using lab_uint16 = ::color::category::lab< std::uint16_t, reference_number >;
4812 
4813 template< ::color::constant::lab::reference_enum reference_number= ::color::constant::lab::CIE_entity > using lab_uint32 = ::color::category::lab< std::uint32_t, reference_number >;
4814 
4815 template< ::color::constant::lab::reference_enum reference_number= ::color::constant::lab::CIE_entity > using lab_uint64 = ::color::category::lab< std::uint64_t, reference_number >;
4816 
4817 template< ::color::constant::lab::reference_enum reference_number= ::color::constant::lab::CIE_entity > using lab_int8 = ::color::category::lab< std::int8_t, reference_number >;
4818 template< ::color::constant::lab::reference_enum reference_number= ::color::constant::lab::CIE_entity > using lab_int16 = ::color::category::lab< std::int16_t, reference_number >;
4819 
4820 template< ::color::constant::lab::reference_enum reference_number= ::color::constant::lab::CIE_entity > using lab_int32 = ::color::category::lab< std::int32_t, reference_number >;
4821 
4822 template< ::color::constant::lab::reference_enum reference_number= ::color::constant::lab::CIE_entity > using lab_int64 = ::color::category::lab< std::int64_t, reference_number >;
4823 
4824 template< ::color::constant::lab::reference_enum reference_number= ::color::constant::lab::CIE_entity > using lab_float = ::color::category::lab< float, reference_number >;
4825 template< ::color::constant::lab::reference_enum reference_number= ::color::constant::lab::CIE_entity > using lab_double = ::color::category::lab< double, reference_number >;
4826 template< ::color::constant::lab::reference_enum reference_number= ::color::constant::lab::CIE_entity > using lab_ldouble = ::color::category::lab< long double, reference_number >;
4827 }
4828 }
4829 
4830 namespace color {
4831 namespace akin {
4832 
4833 template
4834 <
4835 	typename tag_name
4836 
4837 	, ::color::constant::lab::reference_enum reference_number
4838 	>
4839 struct cmy< ::color::category::lab< tag_name, reference_number > > {
4840 public:
4841 	typedef ::color::category::cmy< tag_name > akin_type;
4842 };
4843 
4844 }
4845 }
4846 
4847 namespace color {
4848 namespace category {
4849 
4850 template< typename tag_name >
4851 struct xyy {
4852 	typedef void tag_type;
4853 };
4854 
4855 using xyy_bool = ::color::category::xyy< bool >;
4856 using xyy_uint8 = ::color::category::xyy< std::uint8_t >;
4857 using xyy_uint16 = ::color::category::xyy< std::uint16_t >;
4858 
4859 using xyy_uint32 = ::color::category::xyy< std::uint32_t >;
4860 
4861 using xyy_uint64 = ::color::category::xyy< std::uint64_t >;
4862 using xyy_float = ::color::category::xyy< float >;
4863 using xyy_double = ::color::category::xyy< double >;
4864 using xyy_ldouble = ::color::category::xyy< long double >;
4865 
4866 }
4867 }
4868 
4869 namespace color {
4870 namespace akin {
4871 
4872 template< typename tag_name >
4873 struct cmy< ::color::category::xyy< tag_name > > {
4874 public:
4875 	typedef ::color::category::cmy< tag_name > akin_type;
4876 };
4877 
4878 }
4879 }
4880 
4881 namespace color {
4882 namespace category {
4883 
4884 template< typename tag_name, ::color::constant::lms::reference_enum lms_reference_number >
4885 struct lms {
4886 	typedef tag_name tag_type;
4887 };
4888 
4889 template< ::color::constant::lms::reference_enum reference_number > using lms_uint8 = ::color::category::lms< std::uint8_t, reference_number >;
4890 template< ::color::constant::lms::reference_enum reference_number > using lms_uint16 = ::color::category::lms< std::uint16_t, reference_number >;
4891 
4892 template< ::color::constant::lms::reference_enum reference_number > using lms_uint32 = ::color::category::lms< std::uint32_t, reference_number >;
4893 
4894 template< ::color::constant::lms::reference_enum reference_number > using lms_uint64 = ::color::category::lms< std::uint64_t, reference_number >;
4895 template< ::color::constant::lms::reference_enum reference_number > using lms_float = ::color::category::lms< float, reference_number >;
4896 template< ::color::constant::lms::reference_enum reference_number > using lms_double = ::color::category::lms< double, reference_number >;
4897 template< ::color::constant::lms::reference_enum reference_number > using lms_ldouble = ::color::category::lms< long double, reference_number >;
4898 
4899 }
4900 }
4901 
4902 namespace color {
4903 namespace akin {
4904 
4905 template
4906 <
4907 	typename tag_name
4908 	,::color::constant::lms::reference_enum reference_number
4909 
4910 	>
4911 struct cmy< ::color::category::lms< tag_name, reference_number > > {
4912 public:
4913 	typedef ::color::category::cmy< tag_name > akin_type;
4914 };
4915 
4916 }
4917 }
4918 
4919 namespace color {
4920 namespace category {
4921 
4922 template< typename tag_name >
4923 struct luv {
4924 	typedef void tag_type;
4925 };
4926 
4927 using luv_uint8 = ::color::category::luv< std::uint8_t >;
4928 using luv_uint16 = ::color::category::luv< std::uint16_t >;
4929 
4930 using luv_uint32 = ::color::category::luv< std::uint32_t >;
4931 
4932 using luv_uint64 = ::color::category::luv< std::uint64_t >;
4933 
4934 using luv_int8 = ::color::category::luv< std::int8_t >;
4935 using luv_int16 = ::color::category::luv< std::int16_t >;
4936 
4937 using luv_int32 = ::color::category::luv< std::int32_t >;
4938 
4939 using luv_int64 = ::color::category::luv< std::int64_t >;
4940 
4941 using luv_float = ::color::category::luv< float >;
4942 using luv_double = ::color::category::luv< double >;
4943 using luv_ldouble = ::color::category::luv< long double >;
4944 
4945 }
4946 }
4947 
4948 namespace color {
4949 namespace akin {
4950 
4951 template< typename tag_name >
4952 struct cmy< ::color::category::luv< tag_name > > {
4953 public:
4954 	typedef ::color::category::cmy< tag_name > akin_type;
4955 };
4956 
4957 }
4958 }
4959 
4960 namespace color {
4961 namespace category {
4962 
4963 template< typename tag_name >
4964 struct LabCH {
4965 	typedef void tag_type;
4966 };
4967 
4968 using LabCH_uint8 = ::color::category::LabCH< std::uint8_t >;
4969 using LabCH_uint16 = ::color::category::LabCH< std::uint16_t >;
4970 
4971 using LabCH_uint32 = ::color::category::LabCH< std::uint32_t >;
4972 
4973 using LabCH_uint64 = ::color::category::LabCH< std::uint64_t >;
4974 using LabCH_float = ::color::category::LabCH< float >;
4975 using LabCH_double = ::color::category::LabCH< double >;
4976 using LabCH_ldouble = ::color::category::LabCH< long double >;
4977 
4978 }
4979 }
4980 
4981 namespace color {
4982 namespace akin {
4983 
4984 template< typename tag_name >
4985 struct cmy< ::color::category::LabCH< tag_name > > {
4986 public:
4987 	typedef ::color::category::cmy< tag_name > akin_type;
4988 };
4989 
4990 }
4991 }
4992 
4993 namespace color {
4994 namespace category {
4995 
4996 template< typename tag_name >
4997 struct LuvCH {
4998 	typedef void tag_type;
4999 };
5000 
5001 using LuvCH_uint8 = ::color::category::LuvCH< std::uint8_t >;
5002 using LuvCH_uint16 = ::color::category::LuvCH< std::uint16_t >;
5003 
5004 using LuvCH_uint32 = ::color::category::LuvCH< std::uint32_t >;
5005 
5006 using LuvCH_uint64 = ::color::category::LuvCH< std::uint64_t >;
5007 using LuvCH_float = ::color::category::LuvCH< float >;
5008 using LuvCH_double = ::color::category::LuvCH< double >;
5009 using LuvCH_ldouble = ::color::category::LuvCH< long double >;
5010 
5011 }
5012 }
5013 
5014 namespace color {
5015 namespace akin {
5016 
5017 template< typename tag_name >
5018 struct cmy< ::color::category::LuvCH< tag_name > > {
5019 public:
5020 	typedef ::color::category::cmy< tag_name > akin_type;
5021 };
5022 
5023 }
5024 }
5025 
5026 namespace color {
5027 namespace trait {
5028 
5029 template < typename tag_name >
5030 struct info< ::color::category::cmy< tag_name > > {
5031 public:
5032 	enum { implemented_entity = false };
5033 	enum { meaningful_entity = false };
5034 	enum { size_entity = 3 };
5035 };
5036 
5037 template <> struct info< ::color::category::cmy_uint8 > {
5038 public:
5039 	enum { implemented_entity = true };
5040 	enum { meaningful_entity = true };
5041 };
5042 template <> struct info< ::color::category::cmy_uint16 > {
5043 public:
5044 	enum { implemented_entity = true };
5045 	enum { meaningful_entity = true };
5046 };
5047 template <> struct info< ::color::category::cmy_uint32 > {
5048 public:
5049 	enum { implemented_entity = true };
5050 	enum { meaningful_entity = true };
5051 };
5052 template <> struct info< ::color::category::cmy_uint64 > {
5053 public:
5054 	enum { implemented_entity = true };
5055 	enum { meaningful_entity = true };
5056 };
5057 template <> struct info< ::color::category::cmy_float > {
5058 public:
5059 	enum { implemented_entity = true };
5060 	enum { meaningful_entity = true };
5061 };
5062 template <> struct info< ::color::category::cmy_double > {
5063 public:
5064 	enum { implemented_entity = true };
5065 	enum { meaningful_entity = true };
5066 };
5067 template <> struct info< ::color::category::cmy_ldouble > {
5068 public:
5069 	enum { implemented_entity = true };
5070 	enum { meaningful_entity = true };
5071 };
5072 
5073 }
5074 }
5075 
5076 namespace color {
5077 namespace trait {
5078 
5079 template< >
5080 struct bound< ::color::category::cmy_float >
5081 	: public ::color::_internal::utility::bound::general< float, typename ::color::trait::index< ::color::category::cmy_float >::instance_type > {
5082 };
5083 
5084 template< >
5085 struct bound< ::color::category::cmy_double >
5086 	: public ::color::_internal::utility::bound::general< double, typename ::color::trait::index< ::color::category::cmy_double >::instance_type > {
5087 };
5088 
5089 template< >
5090 struct bound< ::color::category::cmy_ldouble >
5091 	: public ::color::_internal::utility::bound::general< long double, typename ::color::trait::index< ::color::category::cmy_ldouble >::instance_type > {
5092 };
5093 
5094 }
5095 }
5096 
5097 namespace color {
5098 namespace trait {
5099 
5100 template< >
5101 struct bound< ::color::category::cmy_uint8 >
5102 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::cmy_uint8 >::instance_type > {
5103 };
5104 
5105 template< >
5106 struct bound< ::color::category::cmy_uint16 >
5107 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::cmy_uint16 >::instance_type > {
5108 };
5109 
5110 template< >
5111 struct bound< ::color::category::cmy_uint32 >
5112 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::cmy_uint32 >::instance_type > {
5113 };
5114 
5115 template< >
5116 struct bound< ::color::category::cmy_uint64 >
5117 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::cmy_uint64 >::instance_type > {
5118 };
5119 
5120 }
5121 }
5122 
5123 namespace color {
5124 namespace _internal {
5125 namespace utility {
5126 namespace component {
5127 
5128 template< typename value_name >
5129 struct array {
5130 public:
5131 	typedef value_name value_type;
5132 
5133 	typedef ::color::_internal::utility::type::traitC< value_name > utility_trait_type;
5134 
5135 	typedef typename utility_trait_type::instance_type instance_type;
5136 	typedef typename utility_trait_type::const_type const_type;
5137 	typedef typename utility_trait_type::return_image_type return_image_type;
5138 	typedef typename utility_trait_type::return_type return_type;
5139 	typedef typename utility_trait_type::model_type model_type;
5140 	typedef typename utility_trait_type::input_type input_type;
5141 };
5142 
5143 }
5144 }
5145 }
5146 }
5147 
5148 namespace color {
5149 namespace trait {
5150 
5151 template< >
5152 struct component< ::color::category::cmy_float >
5153 	: public ::color::_internal::utility::component::array< float > {
5154 };
5155 
5156 template< >
5157 struct component< ::color::category::cmy_double >
5158 	: public ::color::_internal::utility::component::array< double > {
5159 };
5160 
5161 template< >
5162 struct component< ::color::category::cmy_ldouble >
5163 	: public ::color::_internal::utility::component::array< long double > {
5164 };
5165 
5166 }
5167 }
5168 
5169 namespace color {
5170 namespace trait {
5171 
5172 template< >
5173 struct component< ::color::category::cmy_uint8 >
5174 	: public ::color::_internal::utility::component::array< std::uint8_t > {
5175 };
5176 
5177 template< >
5178 struct component< ::color::category::cmy_uint16 >
5179 	: public ::color::_internal::utility::component::array< std::uint16_t > {
5180 };
5181 
5182 template< >
5183 struct component< ::color::category::cmy_uint32 >
5184 	: public ::color::_internal::utility::component::array< std::uint32_t > {
5185 };
5186 
5187 template< >
5188 struct component< ::color::category::cmy_uint64 >
5189 	: public ::color::_internal::utility::component::array< std::uint64_t > {
5190 };
5191 
5192 }
5193 }
5194 
5195 namespace color {
5196 namespace _internal {
5197 namespace utility {
5198 namespace container {
5199 
5200 template< typename value_name, unsigned length >
5201 struct array {
5202 public:
5203 	typedef value_name value_type;
5204 	typedef ::color::_internal::utility::container::array< value_name, length > this_type;
5205 
5206 	typedef std::array< value_name, length> instance_type;
5207 
5208 	typedef instance_type const const_type;
5209 	typedef instance_type const& return_image_type;
5210 	typedef instance_type & return_type;
5211 	typedef instance_type & return_original_type;
5212 	typedef instance_type const& model_type;
5213 	typedef instance_type & input_type;
5214 	typedef instance_type & output_type;
5215 
5216 	typedef ::color::_internal::utility::type::index< typename instance_type::size_type > index_trait_type;
5217 
5218 	typedef typename index_trait_type::instance_type index_instance_type;
5219 	typedef typename index_trait_type::const_type index_const_type;
5220 	typedef typename index_trait_type::model_type index_input_const_type;
5221 	typedef typename index_trait_type::return_image_type index_return_image_type;
5222 
5223 	typedef ::color::_internal::utility::type::traitC< value_name > component_trait_type;
5224 
5225 	typedef typename component_trait_type::instance_type component_type;
5226 	typedef typename component_trait_type::const_type component_const_type;
5227 	typedef typename component_trait_type::return_image_type component_return_const_type;
5228 	typedef typename component_trait_type::model_type component_input_const_type;
5229 
5230 	typedef ::color::_internal::utility::type::size< typename instance_type::size_type > size_trait_type;
5231 
5232 	typedef typename size_trait_type::return_image_type size_return_image_type;
5233 	typedef typename size_trait_type::instance_type size_instance_type;
5234 
5235 	typedef void set_return_type;
5236 
5237 	enum { size_entity = length };
5238 
initcolor::_internal::utility::container::array5239 	static set_return_type init(input_type container, index_input_const_type index, component_input_const_type value) {
5240 		this_type::set(container, index, value);
5241 	}
5242 
5243 	template< index_instance_type index >
initcolor::_internal::utility::container::array5244 	static set_return_type init(input_type container, component_input_const_type value) {
5245 		this_type:: template set<index>(container, value);
5246 	}
5247 
getcolor::_internal::utility::container::array5248 	static component_return_const_type get(model_type container, index_input_const_type index) {
5249 		return container[index];
5250 	}
5251 
5252 	template< index_instance_type index >
getcolor::_internal::utility::container::array5253 	static component_return_const_type get(model_type container) {
5254 		return container[index];
5255 	}
5256 
setcolor::_internal::utility::container::array5257 	static set_return_type set(input_type container, index_input_const_type index, component_input_const_type value) {
5258 		container[index] = value;
5259 	}
5260 
5261 	template< index_instance_type index >
setcolor::_internal::utility::container::array5262 	static set_return_type set(input_type container, component_input_const_type value) {
5263 		container[index] = value;
5264 	}
5265 
sizecolor::_internal::utility::container::array5266 	static size_return_image_type size() {
5267 		static const size_instance_type local_length = size_entity;
5268 		return local_length;
5269 	}
5270 };
5271 }
5272 }
5273 }
5274 }
5275 
5276 namespace color {
5277 namespace trait {
5278 
5279 template< >
5280 struct container< ::color::category::cmy_float >
5281 	: public ::color::_internal::utility::container::array< float, 3 > {
5282 };
5283 
5284 template< >
5285 struct container< ::color::category::cmy_double >
5286 	: public ::color::_internal::utility::container::array< double, 3 > {
5287 };
5288 
5289 template< >
5290 struct container< ::color::category::cmy_ldouble >
5291 	: public ::color::_internal::utility::container::array< long double, 3 > {
5292 };
5293 
5294 }
5295 }
5296 
5297 namespace color {
5298 namespace trait {
5299 
5300 template< >
5301 struct container< ::color::category::cmy_uint8 >
5302 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
5303 };
5304 
5305 template< >
5306 struct container< ::color::category::cmy_uint16 >
5307 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
5308 };
5309 
5310 template< >
5311 struct container< ::color::category::cmy_uint32 >
5312 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
5313 };
5314 
5315 template< >
5316 struct container< ::color::category::cmy_uint64 >
5317 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
5318 };
5319 
5320 }
5321 }
5322 
5323 namespace color {
5324 
5325 template< typename type_name >
5326 using cmy = ::color::model< ::color::category::cmy< type_name > >;
5327 
5328 }
5329 
5330 namespace color {
5331 namespace place {
5332 namespace _internal {
5333 
5334 template< typename tag_name >
5335 struct cyan< ::color::category::cmy< tag_name > > {
5336 public:
5337 	typedef ::color::category::cmy< tag_name > category_type;
5338 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
5339 
5340 	enum { position_enum = 0 };
5341 	enum { has_enum = true };
5342 
positioncolor::place::_internal::cyan5343 	static index_instance_type position() {
5344 		return position_enum;
5345 	}
5346 };
5347 
5348 }
5349 }
5350 }
5351 
5352 namespace color {
5353 namespace place {
5354 namespace _internal {
5355 
5356 template< typename tag_name >
5357 struct yellow< ::color::category::cmy< tag_name > > {
5358 public:
5359 	typedef ::color::category::cmy< tag_name > category_type;
5360 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
5361 
5362 	enum { position_enum = 2 };
5363 	enum { has_enum = true };
5364 
positioncolor::place::_internal::yellow5365 	static index_instance_type position() {
5366 		return position_enum;
5367 	}
5368 };
5369 
5370 }
5371 }
5372 }
5373 
5374 namespace color {
5375 namespace place {
5376 namespace _internal {
5377 
5378 template< typename tag_name >
5379 struct magenta< ::color::category::cmy< tag_name > > {
5380 public:
5381 	typedef ::color::category::cmy< tag_name > category_type;
5382 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
5383 
5384 	enum { position_enum = 1 };
5385 	enum { has_enum = true };
5386 
positioncolor::place::_internal::magenta5387 	static index_instance_type position() {
5388 		return position_enum;
5389 	}
5390 };
5391 
5392 }
5393 }
5394 }
5395 
5396 namespace color {
5397 namespace trait {
5398 
5399 template< typename tag_name >
5400 struct index< ::color::category::rgb< tag_name> >
5401 	: public ::color::_internal::utility::type::index< std::size_t > {
5402 };
5403 
5404 }
5405 }
5406 
5407 namespace color {
5408 namespace place {
5409 namespace _internal {
5410 
5411 template< typename tag_name >
5412 struct red< ::color::category::rgb< tag_name > > {
5413 public:
5414 	typedef ::color::category::rgb< tag_name > category_type;
5415 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
5416 
5417 	enum { position_enum = 0 };
5418 	enum { has_enum = true };
5419 
positioncolor::place::_internal::red5420 	static index_instance_type position() {
5421 		return position_enum;
5422 	}
5423 };
5424 
5425 template< typename value_name, unsigned red_position, unsigned green_position, unsigned blue_position >
5426 struct red< ::color::category::rgb< ::color::category::_internal::rgb_scramble< value_name, red_position, green_position, blue_position > > > {
5427 public:
5428 	typedef ::color::category::_internal::rgb_scramble< value_name, red_position, green_position, blue_position > scramble_type;
5429 	typedef ::color::category::rgb< scramble_type > category_type;
5430 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
5431 
5432 	enum { position_enum = red_position };
5433 
positioncolor::place::_internal::red5434 	static index_instance_type position() {
5435 		return position_enum;
5436 	}
5437 };
5438 
5439 template< typename value_name, unsigned red_position, unsigned green_position, unsigned blue_position, unsigned alpha_position >
5440 struct red< ::color::category::rgb< ::color::category::_internal::rgba_scramble< value_name, red_position, green_position, blue_position, alpha_position > > > {
5441 public:
5442 	typedef ::color::category::_internal::rgba_scramble< value_name, red_position, green_position, blue_position, alpha_position > scramble_type;
5443 	typedef ::color::category::rgb< scramble_type > category_type;
5444 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
5445 
5446 	enum { position_enum = red_position };
5447 
positioncolor::place::_internal::red5448 	static index_instance_type position() {
5449 		return position_enum;
5450 	}
5451 };
5452 
5453 }
5454 }
5455 }
5456 
5457 namespace color {
5458 namespace place {
5459 namespace _internal {
5460 
5461 template< typename tag_name >
5462 struct green< ::color::category::rgb< tag_name > > {
5463 public:
5464 	typedef ::color::category::rgb< tag_name > category_type;
5465 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
5466 
5467 	enum { position_enum = 1 };
5468 	enum { has_enum = true };
5469 
positioncolor::place::_internal::green5470 	static index_instance_type position() {
5471 		return position_enum;
5472 	}
5473 };
5474 
5475 template< typename value_name, unsigned red_position, unsigned green_position, unsigned blue_position >
5476 struct green< ::color::category::rgb< ::color::category::_internal::rgb_scramble< value_name, red_position, green_position, blue_position > > > {
5477 public:
5478 	typedef ::color::category::_internal::rgb_scramble< value_name, red_position, green_position, blue_position > scramble_type;
5479 	typedef ::color::category::rgb< scramble_type > category_type;
5480 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
5481 
5482 	enum { position_enum = green_position };
5483 
positioncolor::place::_internal::green5484 	static index_instance_type position() {
5485 		return position_enum;
5486 	}
5487 };
5488 
5489 template< typename value_name, unsigned red_position, unsigned green_position, unsigned blue_position, unsigned alpha_position >
5490 struct green< ::color::category::rgb< ::color::category::_internal::rgba_scramble< value_name, red_position, green_position, blue_position, alpha_position > > > {
5491 public:
5492 	typedef ::color::category::_internal::rgba_scramble< value_name, red_position, green_position, blue_position, alpha_position > scramble_type;
5493 	typedef ::color::category::rgb< scramble_type > category_type;
5494 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
5495 
5496 	enum { position_enum = green_position };
5497 
positioncolor::place::_internal::green5498 	static index_instance_type position() {
5499 		return position_enum;
5500 	}
5501 };
5502 
5503 }
5504 }
5505 }
5506 
5507 namespace color {
5508 namespace place {
5509 namespace _internal {
5510 
5511 template< typename tag_name >
5512 struct blue< ::color::category::rgb< tag_name > > {
5513 public:
5514 	typedef ::color::category::rgb< tag_name > category_type;
5515 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
5516 
5517 	enum { position_enum = 2 };
5518 	enum { has_enum = true };
5519 
positioncolor::place::_internal::blue5520 	static index_instance_type position() {
5521 		return position_enum;
5522 	}
5523 };
5524 
5525 template< typename value_name, unsigned red_position, unsigned green_position, unsigned blue_position >
5526 struct blue< ::color::category::rgb< ::color::category::_internal::rgb_scramble< value_name, red_position, green_position, blue_position > > > {
5527 public:
5528 	typedef ::color::category::_internal::rgb_scramble< value_name, red_position, green_position, blue_position > scramble_type;
5529 	typedef ::color::category::rgb< scramble_type > category_type;
5530 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
5531 
5532 	enum { position_enum = blue_position };
5533 
positioncolor::place::_internal::blue5534 	static index_instance_type position() {
5535 		return position_enum;
5536 	}
5537 };
5538 
5539 template< typename value_name, unsigned red_position, unsigned green_position, unsigned blue_position, unsigned alpha_position >
5540 struct blue< ::color::category::rgb< ::color::category::_internal::rgba_scramble< value_name, red_position, green_position, blue_position, alpha_position > > > {
5541 public:
5542 	typedef ::color::category::_internal::rgba_scramble< value_name, red_position, green_position, blue_position, alpha_position > scramble_type;
5543 	typedef ::color::category::rgb< scramble_type > category_type;
5544 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
5545 
5546 	enum { position_enum = blue_position };
5547 
positioncolor::place::_internal::blue5548 	static index_instance_type position() {
5549 		return position_enum;
5550 	}
5551 };
5552 
5553 }
5554 }
5555 }
5556 
5557 namespace color {
5558 namespace place {
5559 namespace _internal {
5560 
5561 template< typename value_name, unsigned red_position, unsigned green_position, unsigned blue_position, unsigned alpha_position >
5562 struct alpha< ::color::category::rgb< ::color::category::_internal::rgba_scramble< value_name, red_position, green_position, blue_position, alpha_position > > > {
5563 public:
5564 	typedef ::color::category::_internal::rgba_scramble< value_name, red_position, green_position, blue_position, alpha_position > scramble_type;
5565 	typedef ::color::category::rgb< scramble_type > category_type;
5566 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
5567 
5568 	enum { position_enum = alpha_position };
5569 	enum { has_enum = true };
5570 
positioncolor::place::_internal::alpha5571 	static index_instance_type position() {
5572 		return position_enum;
5573 	}
5574 };
5575 
5576 }
5577 }
5578 }
5579 
5580 namespace color {
5581 namespace akin {
5582 
5583 template< >struct rgb< ::color::category::cmy_uint8 > {
5584 	typedef ::color::category::rgb_uint8 akin_type;
5585 };
5586 template< >struct rgb< ::color::category::cmy_uint16 > {
5587 	typedef ::color::category::rgb_uint16 akin_type;
5588 };
5589 template< >struct rgb< ::color::category::cmy_uint32 > {
5590 	typedef ::color::category::rgb_uint32 akin_type;
5591 };
5592 template< >struct rgb< ::color::category::cmy_uint64 > {
5593 	typedef ::color::category::rgb_uint64 akin_type;
5594 };
5595 template< >struct rgb< ::color::category::cmy_float > {
5596 	typedef ::color::category::rgb_float akin_type;
5597 };
5598 template< >struct rgb< ::color::category::cmy_double > {
5599 	typedef ::color::category::rgb_double akin_type;
5600 };
5601 template< >struct rgb< ::color::category::cmy_ldouble > {
5602 	typedef ::color::category::rgb_ldouble akin_type;
5603 };
5604 
5605 }
5606 }
5607 
5608 namespace color {
5609 namespace trait {
5610 
5611 template< >
5612 struct component< ::color::category::rgb_float >
5613 	: public ::color::_internal::utility::component::array< float > {
5614 };
5615 
5616 template< >
5617 struct component< ::color::category::rgb_double >
5618 	: public ::color::_internal::utility::component::array< double > {
5619 };
5620 
5621 template< >
5622 struct component< ::color::category::rgb_ldouble >
5623 	: public ::color::_internal::utility::component::array< long double > {
5624 };
5625 
5626 }
5627 }
5628 
5629 namespace color {
5630 namespace trait {
5631 
5632 template< >
5633 struct component< ::color::category::rgb_uint8 >
5634 	: public ::color::_internal::utility::component::array< std::uint8_t > {
5635 };
5636 
5637 template< >
5638 struct component< ::color::category::rgb_uint16 >
5639 	: public ::color::_internal::utility::component::array< std::uint16_t > {
5640 };
5641 
5642 template< >
5643 struct component< ::color::category::rgb_uint32 >
5644 	: public ::color::_internal::utility::component::array< std::uint32_t > {
5645 };
5646 
5647 template< >
5648 struct component< ::color::category::rgb_uint64 >
5649 	: public ::color::_internal::utility::component::array< std::uint64_t > {
5650 };
5651 
5652 }
5653 }
5654 
5655 namespace color {
5656 namespace trait {
5657 
5658 template< typename value_name, unsigned first_position, unsigned second_position, unsigned third_position >
5659 struct component< ::color::category::rgb< ::color::category::_internal::rgb_scramble< value_name, first_position, second_position, third_position > > >
5660 	: public ::color::_internal::utility::component::array< value_name > {
5661 };
5662 
5663 }
5664 }
5665 namespace color {
5666 namespace trait {
5667 
5668 template< typename value_name, unsigned first_position, unsigned second_position, unsigned third_position, unsigned forth_position >
5669 struct component< ::color::category::rgb< ::color::category::_internal::rgba_scramble< value_name, first_position, second_position, third_position, forth_position > > >
5670 	: public ::color::_internal::utility::component::array< value_name > {
5671 };
5672 
5673 }
5674 }
5675 
5676 namespace color {
5677 namespace _internal {
5678 namespace utility {
5679 namespace type {
5680 
5681 template < typename type_name >
5682 struct traitP {
5683 public:
5684 	typedef type_name instance_type;
5685 
5686 	typedef instance_type const const_type;
5687 
5688 	typedef instance_type const return_image_type;
5689 	typedef instance_type return_type;
5690 
5691 	typedef instance_type const& model_type;
5692 	typedef instance_type input_type;
5693 
5694 };
5695 
5696 }
5697 }
5698 }
5699 }
5700 
5701 namespace color {
5702 namespace _internal {
5703 namespace utility {
5704 namespace component {
5705 
5706 template< typename unsigned_name >
5707 struct Unsigned {
5708 public:
5709 	typedef unsigned_name unsigned_type;
5710 
5711 	typedef ::color::_internal::utility::type::traitP< unsigned_type > utility_trait_type;
5712 
5713 	typedef typename utility_trait_type::instance_type instance_type;
5714 	typedef typename utility_trait_type::const_type const_type;
5715 	typedef typename utility_trait_type::return_image_type return_image_type;
5716 	typedef typename utility_trait_type::return_type return_type;
5717 	typedef typename utility_trait_type::model_type model_type;
5718 	typedef typename utility_trait_type::input_type input_type;
5719 };
5720 
5721 }
5722 }
5723 }
5724 }
5725 
5726 namespace color {
5727 namespace _internal {
5728 namespace utility {
5729 namespace component {
5730 
5731 struct pack8
5732 	: public ::color::_internal::utility::component::Unsigned< std::uint8_t > {
5733 };
5734 
5735 typedef ::color::_internal::utility::component::pack8 split2222_t;
5736 
5737 typedef ::color::_internal::utility::component::pack8 split233_t ;
5738 typedef ::color::_internal::utility::component::pack8 split323_t ;
5739 typedef ::color::_internal::utility::component::pack8 split332_t ;
5740 
5741 typedef ::color::_internal::utility::component::pack8 split224_t ;
5742 typedef ::color::_internal::utility::component::pack8 split242_t ;
5743 typedef ::color::_internal::utility::component::pack8 split422_t ;
5744 
5745 }
5746 }
5747 }
5748 }
5749 namespace color {
5750 namespace _internal {
5751 namespace utility {
5752 namespace component {
5753 
5754 struct pack16
5755 	: public ::color::_internal::utility::component::Unsigned< std::uint8_t > {
5756 };
5757 
5758 typedef ::color::_internal::utility::component::pack16 split556_t ;
5759 typedef ::color::_internal::utility::component::pack16 split565_t ;
5760 typedef ::color::_internal::utility::component::pack16 split655_t ;
5761 
5762 typedef ::color::_internal::utility::component::pack16 split772_t ;
5763 typedef ::color::_internal::utility::component::pack16 split727_t ;
5764 typedef ::color::_internal::utility::component::pack16 split277_t ;
5765 
5766 typedef ::color::_internal::utility::component::pack16 split4444_t;
5767 
5768 typedef ::color::_internal::utility::component::pack16 split5551_t;
5769 typedef ::color::_internal::utility::component::pack16 split1555_t;
5770 
5771 }
5772 }
5773 }
5774 }
5775 namespace color {
5776 namespace _internal {
5777 namespace utility {
5778 namespace component {
5779 
5780 struct pack32
5781 	: public ::color::_internal::utility::component::Unsigned< std::uint16_t > {
5782 };
5783 
5784 typedef ::color::_internal::utility::component::pack32 split8888_t;
5785 
5786 typedef ::color::_internal::utility::component::pack32 splitAAA2_t;
5787 typedef ::color::_internal::utility::component::pack32 split2AAA_t;
5788 
5789 }
5790 }
5791 }
5792 }
5793 namespace color {
5794 namespace _internal {
5795 namespace utility {
5796 namespace component {
5797 
5798 struct pack64
5799 	: public ::color::_internal::utility::component::Unsigned< std::uint32_t > {
5800 };
5801 
5802 typedef ::color::_internal::utility::component::pack64 splitGGGG_t;
5803 
5804 typedef ::color::_internal::utility::component::pack64 splitIIIA_t;
5805 typedef ::color::_internal::utility::component::pack64 splitAIII_t;
5806 
5807 typedef ::color::_internal::utility::component::pack64 splitKKK6_t;
5808 typedef ::color::_internal::utility::component::pack64 split6KKK_t;
5809 
5810 }
5811 }
5812 }
5813 }
5814 
5815 namespace color {
5816 namespace trait {
5817 
5818 namespace _internal {
5819 namespace rgb {
5820 
5821 template< unsigned size_size >
5822 struct pick_component3 {
5823 	typedef ::color::type::error_t component_type;
5824 };
5825 
5826 template<>
5827 struct pick_component3<8> {
5828 	typedef ::color::_internal::utility::component::pack8 component_type;
5829 };
5830 
5831 template<>
5832 struct pick_component3<16> {
5833 	typedef ::color::_internal::utility::component::pack16 component_type;
5834 };
5835 
5836 template<>
5837 struct pick_component3<32> {
5838 	typedef ::color::_internal::utility::component::pack32 component_type;
5839 };
5840 
5841 template<>
5842 struct pick_component3<64> {
5843 	typedef ::color::_internal::utility::component::pack64 component_type;
5844 };
5845 
5846 }
5847 }
5848 
5849 template
5850 <
5851 	unsigned first_index, unsigned first_size,
5852 	unsigned second_index, unsigned second_size,
5853 	unsigned third_index, unsigned third_size
5854 	>
5855 struct component< ::color::category::rgb< ::color::category::_internal::rgb_scramble< ::color::type::pack3< first_size, second_size, third_size >, first_index, second_index, third_index > > >
5856 	: public ::color::trait::_internal::rgb::pick_component3< first_size + second_size + third_size >::component_type {
5857 };
5858 
5859 }
5860 }
5861 
5862 namespace color {
5863 namespace trait {
5864 
5865 namespace _internal {
5866 namespace rgb {
5867 
5868 template< unsigned size_size >
5869 struct pick_component4 {
5870 	typedef ::color::type::error_t component_type;
5871 };
5872 
5873 template<>
5874 struct pick_component4<8> {
5875 	typedef ::color::_internal::utility::component::pack8 component_type;
5876 };
5877 
5878 template<>
5879 struct pick_component4<16> {
5880 	typedef ::color::_internal::utility::component::pack16 component_type;
5881 };
5882 
5883 template<>
5884 struct pick_component4<32> {
5885 	typedef ::color::_internal::utility::component::pack32 component_type;
5886 };
5887 
5888 template<>
5889 struct pick_component4<64> {
5890 	typedef ::color::_internal::utility::component::pack64 component_type;
5891 };
5892 
5893 }
5894 }
5895 
5896 template
5897 <
5898 	unsigned first_index, unsigned first_size,
5899 	unsigned second_index, unsigned second_size,
5900 	unsigned third_index, unsigned third_size,
5901 	unsigned fourth_index, unsigned fourth_size
5902 	>
5903 struct component< ::color::category::rgb< ::color::category::_internal::rgba_scramble< ::color::type::pack4< first_size, second_size, third_size, fourth_size >, first_index, second_index, third_index, fourth_index > > >
5904 	: public ::color::trait::_internal::rgb::pick_component4< first_size + second_size + third_size + fourth_size >::component_type {
5905 };
5906 
5907 }
5908 }
5909 
5910 namespace color {
5911 namespace operation {
5912 namespace _internal {
5913 
5914 template< typename category_name>
5915 struct invert {
5916 public:
5917 	typedef category_name category_type;
5918 
5919 	typedef ::color::trait::index<category_type> index_trait_type;
5920 	typedef ::color::trait::component< category_type > component_trait_type;
5921 	typedef ::color::trait::container< category_type > container_trait_type;
5922 	typedef ::color::trait::bound<category_type> bound_type;
5923 
5924 	typedef ::color::model<category_type> model_type;
5925 
5926 	typedef model_type & model_output_type;
5927 	typedef model_type const& model_const_input_type;
5928 
5929 	typedef model_type result_type;
5930 	typedef model_type left_type, first_argument_type;
5931 	typedef model_type right_type, second_argument_type;
5932 
5933 	typedef typename component_trait_type::model_type component_input_const_type;
5934 	typedef typename component_trait_type::return_type component_return_type;
5935 
5936 	typedef typename index_trait_type::instance_type index_type;
5937 	typedef typename index_trait_type::model_type index_input_const_type;
5938 
5939 	typedef ::color::operation::_internal::invert<category_type> this_type;
5940 
5941 	static component_return_type
componentcolor::operation::_internal::invert5942 	component
5943 	(
5944 		component_input_const_type component
5945 		,index_input_const_type index
5946 	) {
5947 		return bound_type::range(index) - component;
5948 	}
5949 
5950 	template< index_type index_size >
5951 	static
5952 	component_return_type
componentcolor::operation::_internal::invert5953 	component(component_input_const_type component) {
5954 		return bound_type::template range<index_size>() - component;
5955 	}
5956 
5957 public:
operator ()color::operation::_internal::invert5958 	model_type & operator()(model_type & result) const {
5959 		return this_type::accumulate(result);
5960 	}
5961 
operator ()color::operation::_internal::invert5962 	model_type & operator()(model_type &result, model_type const& right) const {
5963 		return this_type::process(result, right);
5964 	}
5965 
5966 public:
accumulatecolor::operation::_internal::invert5967 	static model_type & accumulate(model_type &result) {
5968 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
5969 			result.set(index, component(result.get(index), index));
5970 		}
5971 		return result;
5972 	}
5973 
functioncolor::operation::_internal::invert5974 	static model_type function(model_type const& right) {
5975 		model_type result;
5976 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
5977 			result.set(index, component(right.get(index), index));
5978 		}
5979 		return result;
5980 	}
5981 
processcolor::operation::_internal::invert5982 	static model_type & process(model_type &result, model_type const& right) {
5983 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
5984 			result.set(index, component(right.get(index), index));
5985 		}
5986 		return result;
5987 	}
5988 
5989 };
5990 }
5991 
5992 template< typename category_name >
5993 ::color::model<category_name> &
invert(::color::model<category_name> & result)5994 invert
5995 (
5996 	::color::model<category_name> & result
5997 ) {
5998 	return ::color::operation::_internal::invert<category_name>::accumulate(result);
5999 }
6000 template< typename category_name >
6001 ::color::model<category_name> &
invert(::color::model<category_name> & result,::color::model<category_name> const & right)6002 invert
6003 (
6004 	::color::model<category_name> & result
6005 	,::color::model<category_name> const& right
6006 ) {
6007 	return ::color::operation::_internal::invert<category_name>::process(result, right);
6008 }
6009 
6010 }
6011 }
6012 
6013 namespace color {
6014 namespace get {
6015 
6016 template< typename tag_name >
6017 inline
6018 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::cmy< tag_name > >::akin_type >::return_type
red(::color::model<::color::category::cmy<tag_name>> const & color_parameter)6019 red(::color::model< ::color::category::cmy<tag_name> > const& color_parameter) {
6020 	typedef ::color::category::cmy<tag_name> category_type;
6021 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
6022 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
6023 	enum { cyan_p = ::color::place::_internal::cyan<category_type>::position_enum };
6024 	typedef ::color::operation::_internal::invert< category_type > invert_type;
6025 	typedef ::color::_internal::reformat< akin_type, category_type > reformat_type;
6026 	return reformat_type::template process<red_p,cyan_p>(invert_type::template component<cyan_p>(color_parameter.template get<cyan_p>()));
6027 }
6028 
6029 }
6030 }
6031 
6032 namespace color {
6033 namespace get {
6034 
6035 template< typename tag_name >
6036 inline
6037 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::cmy< tag_name > >::akin_type >::return_type
green(::color::model<::color::category::cmy<tag_name>> const & color_parameter)6038 green(::color::model< ::color::category::cmy<tag_name> > const& color_parameter) {
6039 	typedef ::color::category::cmy<tag_name> category_type;
6040 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
6041 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
6042 	enum { yellow_p = ::color::place::_internal::yellow<category_type>::position_enum };
6043 	typedef ::color::operation::_internal::invert< category_type > invert_type;
6044 	typedef ::color::_internal::reformat< akin_type, category_type > reformat_type;
6045 	return reformat_type::template process<green_p,yellow_p>(invert_type::template component<yellow_p>(color_parameter.template get<yellow_p>()));
6046 }
6047 
6048 }
6049 }
6050 
6051 namespace color {
6052 namespace get {
6053 
6054 template< typename tag_name >
6055 inline
6056 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::cmy< tag_name > >::akin_type >::return_type
blue(::color::model<::color::category::cmy<tag_name>> const & color_parameter)6057 blue(::color::model< ::color::category::cmy<tag_name> > const& color_parameter) {
6058 	typedef ::color::category::cmy<tag_name> category_type;
6059 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
6060 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
6061 	enum { magenta_p = ::color::place::_internal::magenta<category_type>::position_enum };
6062 	typedef ::color::operation::_internal::invert< category_type > invert_type;
6063 	typedef ::color::_internal::reformat< akin_type, category_type > reformat_type;
6064 	return reformat_type::template process<blue_p,magenta_p>(invert_type::template component<magenta_p>(color_parameter.template get<magenta_p>()));
6065 }
6066 
6067 }
6068 }
6069 
6070 namespace color {
6071 namespace akin {
6072 
6073 template< >struct gray< ::color::category::cmy_uint8 > {
6074 	typedef ::color::category::gray_uint8 akin_type;
6075 };
6076 template< >struct gray< ::color::category::cmy_uint16 > {
6077 	typedef ::color::category::gray_uint16 akin_type;
6078 };
6079 template< >struct gray< ::color::category::cmy_uint32 > {
6080 	typedef ::color::category::gray_uint32 akin_type;
6081 };
6082 template< >struct gray< ::color::category::cmy_uint64 > {
6083 	typedef ::color::category::gray_uint64 akin_type;
6084 };
6085 template< >struct gray< ::color::category::cmy_float > {
6086 	typedef ::color::category::gray_float akin_type;
6087 };
6088 template< >struct gray< ::color::category::cmy_double > {
6089 	typedef ::color::category::gray_double akin_type;
6090 };
6091 template< >struct gray< ::color::category::cmy_ldouble > {
6092 	typedef ::color::category::gray_ldouble akin_type;
6093 };
6094 
6095 }
6096 }
6097 
6098 namespace color {
6099 namespace trait {
6100 
6101 template< >
6102 struct component< ::color::category::gray_bool >
6103 	: public ::color::_internal::utility::component::array< bool > {
6104 };
6105 
6106 }
6107 }
6108 
6109 namespace color {
6110 namespace trait {
6111 
6112 template< >
6113 struct component< ::color::category::gray_float >
6114 	: public ::color::_internal::utility::component::array< float > {
6115 };
6116 
6117 template< >
6118 struct component< ::color::category::gray_double >
6119 	: public ::color::_internal::utility::component::array< double > {
6120 };
6121 
6122 template< >
6123 struct component< ::color::category::gray_ldouble >
6124 	: public ::color::_internal::utility::component::array< long double > {
6125 };
6126 
6127 }
6128 }
6129 
6130 namespace color {
6131 namespace trait {
6132 
6133 template< >
6134 struct component< ::color::category::gray_uint8 >
6135 	: public ::color::_internal::utility::component::Unsigned< std::uint8_t > {
6136 };
6137 
6138 template< >
6139 struct component< ::color::category::gray_uint16 >
6140 	: public ::color::_internal::utility::component::Unsigned< std::uint16_t > {
6141 };
6142 
6143 template< >
6144 struct component< ::color::category::gray_uint32 >
6145 	: public ::color::_internal::utility::component::Unsigned< std::uint32_t > {
6146 };
6147 
6148 template< >
6149 struct component< ::color::category::gray_uint64 >
6150 	: public ::color::_internal::utility::component::Unsigned< std::uint64_t > {
6151 };
6152 
6153 }
6154 }
6155 
6156 namespace color {
6157 namespace constant {
6158 namespace gray {
6159 
6160 template< typename category_name >
6161 struct rgb {
6162 public:
6163 	typedef category_name category_type;
6164 
6165 	typedef typename ::color::trait::scalar< category_name >::instance_type scalar_type;
6166 
6167 	typedef ::color::constant::gray::rgb<category_type> this_type;
6168 
Rccolor::constant::gray::rgb6169 	static scalar_type const Rc() {
6170 		return scalar_type(2647777) / scalar_type(12450000);
6171 	}
Gccolor::constant::gray::rgb6172 	static scalar_type const Gc() {
6173 		return scalar_type(53421866) / scalar_type(74700000);
6174 	}
Bccolor::constant::gray::rgb6175 	static scalar_type const Bc() {
6176 		return scalar_type(336967) / scalar_type(4668750);
6177 	}
6178 };
6179 
6180 }
6181 }
6182 }
6183 
6184 namespace color {
6185 namespace get {
6186 
6187 template< typename tag_name >
6188 inline
6189 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::cmy<tag_name> >::akin_type >::return_type
gray(::color::model<::color::category::cmy<tag_name>> const & color_parameter)6190 gray(::color::model< ::color::category::cmy<tag_name> > const& color_parameter) {
6191 	typedef ::color::category::cmy< tag_name > category_type;
6192 	typedef typename ::color::trait::scalar< category_type >::instance_type scalar_type;
6193 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
6194 	typedef ::color::_internal::diverse< akin_type > diverse_type;
6195 	typedef ::color::_internal::normalize< category_type > normalize_type;
6196 	typedef ::color::constant::gray::rgb< akin_type > gray_const_type;
6197 	enum {
6198 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
6199 		,magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
6200 		, yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
6201 	};
6202 	scalar_type value =
6203 		gray_const_type::Rc() * (scalar_type(1) - normalize_type::template process< cyan_p>(color_parameter.template get< cyan_p>()))
6204 		+ gray_const_type::Gc() * (scalar_type(1) - normalize_type::template process<magenta_p>(color_parameter.template get<magenta_p>()))
6205 		+ gray_const_type::Bc() * (scalar_type(1) - normalize_type::template process< yellow_p>(color_parameter.template get< yellow_p>()));
6206 	return diverse_type::template process<0>(value);
6207 }
6208 
6209 }
6210 }
6211 
6212 namespace color {
6213 namespace get {
6214 
6215 namespace constant {
6216 namespace cmy {
6217 namespace cyan {
6218 
6219 enum formula_enum {
6220 	channel_entity
6221 	,hsl_star_entity
6222 
6223 };
6224 
6225 }
6226 }
6227 }
6228 
6229 namespace _internal {
6230 namespace cmy {
6231 namespace cyan {
6232 
6233 template
6234 <
6235 	typename category_name
6236 	,enum ::color::get::constant::cmy::cyan::formula_enum formula_number = ::color::get::constant::cmy::cyan::channel_entity
6237 	>
6238 struct usher {
6239 	typedef category_name category_type;
6240 
6241 	typedef ::color::model<category_type> model_type;
6242 	typedef typename ::color::trait::component< category_name >::return_type return_type;
6243 
6244 	enum {
6245 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
6246 	};
6247 
processcolor::get::_internal::cmy::cyan::usher6248 	static return_type process(model_type const& color_parameter) {
6249 		return color_parameter.template get<cyan_p>();
6250 	}
6251 };
6252 
6253 template< typename tag_name >
6254 struct usher< ::color::category::cmy< tag_name >, ::color::get::constant::cmy::cyan::hsl_star_entity > {
6255 	typedef ::color::category::cmy< tag_name> category_type;
6256 	typedef ::color::model< category_type > model_type;
6257 
6258 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
6259 
6260 	typedef typename ::color::trait::component< category_type >::return_type return_type;
6261 
6262 	typedef ::color::_internal::diverse< category_type > diverse_type;
6263 	typedef ::color::_internal::normalize< category_type > normalize_type;
6264 
6265 	enum {
6266 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
6267 		,magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
6268 		,yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
6269 	};
6270 
processcolor::get::_internal::cmy::cyan::usher6271 	static return_type process(model_type const& color_parameter) {
6272 		scalar_type c = normalize_type::template process<cyan_p >(color_parameter.template get<cyan_p >());
6273 		scalar_type m = normalize_type::template process<magenta_p>(color_parameter.template get<magenta_p>());
6274 		scalar_type y = normalize_type::template process<yellow_p >(color_parameter.template get<yellow_p >());
6275 		scalar_type result;
6276 		while(true) {
6277 			if(c < m) {
6278 				result = 0;
6279 				break;
6280 			}
6281 			if(c < y) {
6282 				result = 0;
6283 				break;
6284 			}
6285 			if(m < y) {
6286 				result = (c - y) * (scalar_type(1) - (y - m));
6287 				break;
6288 			}
6289 			{
6290 				result = (c - m) * (scalar_type(1) - (m - y));
6291 				break;
6292 			}
6293 		}
6294 		return diverse_type::template process<cyan_p >(result);
6295 	}
6296 };
6297 
6298 }
6299 }
6300 }
6301 
6302 template
6303 <
6304 	enum ::color::get::constant::cmy::cyan::formula_enum formula_number = ::color::get::constant::cmy::cyan::channel_entity
6305 ,typename tag_name
6306 >
6307 inline
6308 typename ::color::model< ::color::category::cmy< tag_name> >::component_const_type
cyan(::color::model<::color::category::cmy<tag_name>> const & color_parameter)6309 cyan
6310 (
6311 	::color::model< ::color::category::cmy< tag_name> > const& color_parameter
6312 ) {
6313 	return ::color::get::_internal::cmy::cyan::usher< ::color::category::cmy< tag_name >, formula_number >::process(color_parameter);
6314 }
6315 
6316 }
6317 }
6318 
6319 namespace color {
6320 namespace get {
6321 
6322 namespace constant {
6323 namespace cmy {
6324 namespace magenta {
6325 
6326 enum formula_enum {
6327 	channel_entity
6328 	,hsl_star_entity
6329 
6330 };
6331 
6332 }
6333 }
6334 }
6335 
6336 namespace _internal {
6337 namespace cmy {
6338 namespace magenta {
6339 
6340 template
6341 <
6342 	typename category_name
6343 	,enum ::color::get::constant::cmy::magenta::formula_enum formula_number = ::color::get::constant::cmy::magenta::channel_entity
6344 	>
6345 struct usher {
6346 	typedef category_name category_type;
6347 
6348 	typedef ::color::model<category_type> model_type;
6349 	typedef typename ::color::trait::component< category_name >::return_type return_type;
6350 
6351 	enum {
6352 		magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
6353 	};
6354 
processcolor::get::_internal::cmy::magenta::usher6355 	static return_type process(model_type const& color_parameter) {
6356 		return color_parameter.template get<magenta_p>();
6357 	}
6358 };
6359 
6360 template< typename tag_name >
6361 struct usher< ::color::category::cmy< tag_name >, ::color::get::constant::cmy::magenta::hsl_star_entity > {
6362 	typedef ::color::category::cmy< tag_name> category_type;
6363 	typedef ::color::model< category_type > model_type;
6364 
6365 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
6366 
6367 	typedef typename ::color::trait::component< category_type >::return_type return_type;
6368 
6369 	typedef ::color::_internal::diverse< category_type > diverse_type;
6370 	typedef ::color::_internal::normalize< category_type > normalize_type;
6371 
6372 	enum {
6373 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
6374 		,magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
6375 		,yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
6376 	};
6377 
processcolor::get::_internal::cmy::magenta::usher6378 	static return_type process(model_type const& color_parameter) {
6379 		scalar_type c = normalize_type::template process<cyan_p >(color_parameter.template get<cyan_p >());
6380 		scalar_type m = normalize_type::template process<magenta_p>(color_parameter.template get<magenta_p>());
6381 		scalar_type y = normalize_type::template process<yellow_p >(color_parameter.template get<yellow_p >());
6382 		scalar_type result;
6383 		while(true) {
6384 			if(m < c) {
6385 				result = 0;
6386 				break;
6387 			}
6388 			if(m < y) {
6389 				result = 0;
6390 				break;
6391 			}
6392 			if(c < y) {
6393 				result = (m - y) * (scalar_type(1) - (y - c));
6394 				break;
6395 			}
6396 			{
6397 				result = (m - c) * (scalar_type(1) - (c - y));
6398 				break;
6399 			}
6400 		}
6401 		return diverse_type::template process<cyan_p >(result);
6402 	}
6403 };
6404 
6405 }
6406 }
6407 }
6408 
6409 template
6410 <
6411 	enum ::color::get::constant::cmy::magenta::formula_enum formula_number = ::color::get::constant::cmy::magenta::channel_entity
6412 ,typename tag_name
6413 >
6414 inline
6415 typename ::color::model< ::color::category::cmy< tag_name> >::component_const_type
magenta(::color::model<::color::category::cmy<tag_name>> const & color_parameter)6416 magenta
6417 (
6418 	::color::model< ::color::category::cmy< tag_name> > const& color_parameter
6419 ) {
6420 	return ::color::get::_internal::cmy::magenta::usher< ::color::category::cmy< tag_name >, formula_number >::process(color_parameter);
6421 }
6422 
6423 }
6424 }
6425 
6426 namespace color {
6427 namespace get {
6428 
6429 namespace constant {
6430 namespace cmy {
6431 namespace yellow {
6432 
6433 enum formula_enum {
6434 	channel_entity
6435 	,hsl_star_entity
6436 
6437 };
6438 
6439 }
6440 }
6441 }
6442 
6443 namespace _internal {
6444 namespace cmy {
6445 namespace yellow {
6446 
6447 template
6448 <
6449 	typename category_name
6450 	,enum ::color::get::constant::cmy::yellow::formula_enum formula_number = ::color::get::constant::cmy::yellow::channel_entity
6451 	>
6452 struct usher {
6453 	typedef category_name category_type;
6454 
6455 	typedef ::color::model<category_type> model_type;
6456 	typedef typename ::color::trait::component< category_name >::return_type return_type;
6457 
6458 	enum {
6459 		yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
6460 	};
6461 
processcolor::get::_internal::cmy::yellow::usher6462 	static return_type process(model_type const& color_parameter) {
6463 		return color_parameter.template get<yellow_p>();
6464 	}
6465 };
6466 
6467 template< typename tag_name >
6468 struct usher< ::color::category::cmy< tag_name >, ::color::get::constant::cmy::yellow::hsl_star_entity > {
6469 	typedef ::color::category::cmy< tag_name> category_type;
6470 	typedef ::color::model< category_type > model_type;
6471 
6472 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
6473 
6474 	typedef typename ::color::trait::component< category_type >::return_type return_type;
6475 
6476 	typedef ::color::_internal::diverse< category_type > diverse_type;
6477 	typedef ::color::_internal::normalize< category_type > normalize_type;
6478 
6479 	enum {
6480 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
6481 		,magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
6482 		,yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
6483 	};
6484 
processcolor::get::_internal::cmy::yellow::usher6485 	static return_type process(model_type const& color_parameter) {
6486 		scalar_type c = normalize_type::template process<cyan_p >(color_parameter.template get<cyan_p >());
6487 		scalar_type m = normalize_type::template process<magenta_p>(color_parameter.template get<magenta_p>());
6488 		scalar_type y = normalize_type::template process<yellow_p >(color_parameter.template get<yellow_p >());
6489 		scalar_type result;
6490 		while(true) {
6491 			if(y < m) {
6492 				result = 0;
6493 				break;
6494 			}
6495 			if(y < c) {
6496 				result = 0;
6497 				break;
6498 			}
6499 			if(c < m) {
6500 				result = (y - m) * (scalar_type(1) - (m - c));
6501 				break;
6502 			}
6503 			{
6504 				result = (y - c) * (scalar_type(1) - (c - m));
6505 				break;
6506 			}
6507 		}
6508 		return diverse_type::template process<cyan_p >(result);
6509 	}
6510 };
6511 
6512 }
6513 }
6514 }
6515 
6516 template
6517 <
6518 	enum ::color::get::constant::cmy::yellow::formula_enum formula_number = ::color::get::constant::cmy::yellow::channel_entity
6519 ,typename tag_name
6520 >
6521 inline
6522 typename ::color::model< ::color::category::cmy< tag_name> >::component_const_type
yellow(::color::model<::color::category::cmy<tag_name>> const & color_parameter)6523 yellow
6524 (
6525 	::color::model< ::color::category::cmy< tag_name> > const& color_parameter
6526 ) {
6527 	return ::color::get::_internal::cmy::yellow::usher< ::color::category::cmy< tag_name >, formula_number >::process(color_parameter);
6528 }
6529 
6530 }
6531 }
6532 
6533 namespace color {
6534 namespace akin {
6535 
6536 template< >struct yiq< ::color::category::cmy_uint8 > {
6537 	typedef ::color::category::yiq_uint8 akin_type;
6538 };
6539 template< >struct yiq< ::color::category::cmy_uint16 > {
6540 	typedef ::color::category::yiq_uint16 akin_type;
6541 };
6542 template< >struct yiq< ::color::category::cmy_uint32 > {
6543 	typedef ::color::category::yiq_uint32 akin_type;
6544 };
6545 template< >struct yiq< ::color::category::cmy_uint64 > {
6546 	typedef ::color::category::yiq_uint64 akin_type;
6547 };
6548 template< >struct yiq< ::color::category::cmy_float > {
6549 	typedef ::color::category::yiq_float akin_type;
6550 };
6551 template< >struct yiq< ::color::category::cmy_double > {
6552 	typedef ::color::category::yiq_double akin_type;
6553 };
6554 template< >struct yiq< ::color::category::cmy_ldouble > {
6555 	typedef ::color::category::yiq_ldouble akin_type;
6556 };
6557 
6558 }
6559 }
6560 
6561 namespace color {
6562 namespace trait {
6563 
6564 template< >
6565 struct component< ::color::category::yiq_float >
6566 	: public ::color::_internal::utility::component::array< float > {
6567 };
6568 
6569 template< >
6570 struct component< ::color::category::yiq_double >
6571 	: public ::color::_internal::utility::component::array< double > {
6572 };
6573 
6574 template< >
6575 struct component< ::color::category::yiq_ldouble >
6576 	: public ::color::_internal::utility::component::array< long double > {
6577 };
6578 
6579 }
6580 }
6581 
6582 namespace color {
6583 namespace trait {
6584 
6585 template< >
6586 struct component< ::color::category::yiq_uint8 >
6587 	: public ::color::_internal::utility::component::array< std::uint8_t > {
6588 };
6589 
6590 template< >
6591 struct component< ::color::category::yiq_uint16 >
6592 	: public ::color::_internal::utility::component::array< std::uint16_t > {
6593 };
6594 
6595 template< >
6596 struct component< ::color::category::yiq_uint32 >
6597 	: public ::color::_internal::utility::component::array< std::uint32_t > {
6598 };
6599 
6600 template< >
6601 struct component< ::color::category::yiq_uint64 >
6602 	: public ::color::_internal::utility::component::array< std::uint64_t > {
6603 };
6604 
6605 }
6606 }
6607 
6608 namespace color {
6609 namespace constant {
6610 
6611 template< typename category_name>
6612 struct yiq {
6613 public:
6614 	typedef category_name category_type;
6615 
6616 	typedef typename ::color::trait::scalar< category_name >::instance_type scalar_type;
6617 
6618 	typedef ::color::constant::yiq<category_type> this_type;
6619 
a11color::constant::yiq6620 	static scalar_type const a11() {
6621 		return 1.0000000000000000000;
6622 	}
a12color::constant::yiq6623 	static scalar_type const a12() {
6624 		return 0.9562948323208939905;
6625 	}
a13color::constant::yiq6626 	static scalar_type const a13() {
6627 		return 0.6210251254447287141;
6628 	}
a21color::constant::yiq6629 	static scalar_type const a21() {
6630 		return 1.0000000000000000000;
6631 	}
a22color::constant::yiq6632 	static scalar_type const a22() {
6633 		return -0.2721214740839773195;
6634 	}
a23color::constant::yiq6635 	static scalar_type const a23() {
6636 		return -0.6473809535176157222;
6637 	}
a31color::constant::yiq6638 	static scalar_type const a31() {
6639 		return 1.0000000000000000000;
6640 	}
a32color::constant::yiq6641 	static scalar_type const a32() {
6642 		return -1.1069899085671282160;
6643 	}
a33color::constant::yiq6644 	static scalar_type const a33() {
6645 		return 1.7046149754988293290;
6646 	}
6647 
b11color::constant::yiq6648 	static scalar_type const b11() {
6649 		return 0.2990000000000000000;
6650 	}
b12color::constant::yiq6651 	static scalar_type const b12() {
6652 		return 0.5870000000000000000;
6653 	}
b13color::constant::yiq6654 	static scalar_type const b13() {
6655 		return 0.1140000000000000000;
6656 	}
b21color::constant::yiq6657 	static scalar_type const b21() {
6658 		return 0.5957161349127745527;
6659 	}
b22color::constant::yiq6660 	static scalar_type const b22() {
6661 		return -0.2744528378392564636;
6662 	}
b23color::constant::yiq6663 	static scalar_type const b23() {
6664 		return -0.3212632970735180890;
6665 	}
b31color::constant::yiq6666 	static scalar_type const b31() {
6667 		return 0.2114564021201178664;
6668 	}
b32color::constant::yiq6669 	static scalar_type const b32() {
6670 		return -0.5225910452916111683;
6671 	}
b33color::constant::yiq6672 	static scalar_type const b33() {
6673 		return 0.3111346431714933019;
6674 	}
6675 
i_mincolor::constant::yiq6676 	static scalar_type const i_min() {
6677 		return -0.5957161349127745527;
6678 	}
i_maxcolor::constant::yiq6679 	static scalar_type const i_max() {
6680 		return 0.5957161349127745527;
6681 	}
i_rangecolor::constant::yiq6682 	static scalar_type const i_range() {
6683 		return 2*0.5957161349127745527;
6684 	}
6685 
q_mincolor::constant::yiq6686 	static scalar_type const q_min() {
6687 		return - 0.5225910452916111683;
6688 	}
q_maxcolor::constant::yiq6689 	static scalar_type const q_max() {
6690 		return 0.5225910452916111683;
6691 	}
q_rangecolor::constant::yiq6692 	static scalar_type const q_range() {
6693 		return 2*0.5225910452916111683;
6694 	}
6695 
i_diversecolor::constant::yiq6696 	static scalar_type i_diverse(scalar_type const& normal) {
6697 		return this_type::i_range() * normal + this_type::i_min();
6698 	}
i_normalizecolor::constant::yiq6699 	static scalar_type i_normalize(scalar_type const& divert) {
6700 		return (divert - this_type::i_min()) /this_type::i_range();
6701 	}
6702 
q_diversecolor::constant::yiq6703 	static scalar_type q_diverse(scalar_type const& normal) {
6704 		return this_type::q_range() * normal + this_type::q_min();
6705 	}
q_normalizecolor::constant::yiq6706 	static scalar_type q_normalize(scalar_type const& divert) {
6707 		return (divert - this_type::q_min()) /this_type::q_range();
6708 	}
6709 };
6710 
6711 }
6712 }
6713 
6714 namespace color {
6715 namespace get {
6716 
6717 template< typename tag_name >
6718 inline
6719 typename ::color::trait::component< typename ::color::akin::yiq< ::color::category::cmy< tag_name > >::akin_type >::return_type
inphase(::color::model<::color::category::cmy<tag_name>> const & color_parameter)6720 inphase(::color::model< ::color::category::cmy<tag_name> > const& color_parameter) {
6721 	typedef ::color::category::cmy< tag_name > category_type;
6722 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
6723 	typedef typename ::color::akin::yiq<category_type >::akin_type akin_type;
6724 	typedef ::color::_internal::diverse< akin_type > diverse_type;
6725 	typedef ::color::_internal::normalize< category_type > normalize_type;
6726 	typedef ::color::constant::yiq< akin_type > yiq_const_type;
6727 	enum {
6728 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
6729 		,magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
6730 		, yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
6731 	};
6732 	scalar_type value =
6733 		+ yiq_const_type::b21() * (scalar_type(1) - normalize_type::template process< cyan_p>(color_parameter.template get< cyan_p>()))
6734 		+ yiq_const_type::b22() * (scalar_type(1) - normalize_type::template process<magenta_p>(color_parameter.template get<magenta_p>()))
6735 		+ yiq_const_type::b23() * (scalar_type(1) - normalize_type::template process< yellow_p>(color_parameter.template get< yellow_p>()))
6736 		;
6737 	value = yiq_const_type::i_normalize(value);
6738 	return diverse_type::template process<1>(value);
6739 }
6740 
6741 }
6742 }
6743 
6744 namespace color {
6745 namespace get {
6746 
6747 template< typename tag_name>
6748 inline
6749 typename ::color::model< typename ::color::akin::yiq< ::color::category::cmy< tag_name > >::akin_type >::component_const_type
quadrature(::color::model<::color::category::cmy<tag_name>> const & color_parameter)6750 quadrature(::color::model< ::color::category::cmy<tag_name> > const& color_parameter) {
6751 	typedef ::color::category::cmy<tag_name> category_type;
6752 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
6753 	typedef typename ::color::akin::yiq<category_type>::akin_type akin_type;
6754 	typedef ::color::_internal::diverse< akin_type > diverse_type;
6755 	typedef ::color::_internal::normalize< category_type > normalize_type;
6756 	typedef ::color::constant::yiq< akin_type > yiq_const_type;
6757 	enum {
6758 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
6759 		,magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
6760 		, yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
6761 	};
6762 	scalar_type value =
6763 		+ yiq_const_type::b31() * (scalar_type(1) - normalize_type::template process< cyan_p>(color_parameter.template get< cyan_p>()))
6764 		+ yiq_const_type::b32() * (scalar_type(1) - normalize_type::template process<magenta_p>(color_parameter.template get<magenta_p>()))
6765 		+ yiq_const_type::b33() * (scalar_type(1) - normalize_type::template process< yellow_p>(color_parameter.template get< yellow_p>()))
6766 		;
6767 	value = yiq_const_type::q_normalize(value);
6768 	return diverse_type::template process<2>(value);
6769 }
6770 
6771 }
6772 }
6773 
6774 namespace color {
6775 namespace set {
6776 
6777 template< typename tag_name >
6778 inline
6779 void
red(::color::model<::color::category::cmy<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::cmy<tag_name>>::akin_type>::model_type component_parameter)6780 red
6781 (
6782 	::color::model< ::color::category::cmy< tag_name > > & color_parameter
6783 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::cmy< tag_name > >::akin_type >::model_type component_parameter
6784 ) {
6785 	typedef ::color::category::cmy< tag_name > category_type;
6786 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
6787 	typedef ::color::operation::_internal::invert< akin_type > invert_type;
6788 	typedef ::color::_internal::reformat< category_type, akin_type > reformat_type;
6789 	enum { cyan_p = ::color::place::_internal::cyan<category_type>::position_enum };
6790 	color_parameter.template set<cyan_p>(reformat_type::template process<cyan_p,cyan_p>(invert_type::template component<cyan_p>(component_parameter)));
6791 }
6792 
6793 }
6794 }
6795 
6796 namespace color {
6797 namespace set {
6798 
6799 template< typename tag_name >
6800 inline
6801 void
green(::color::model<::color::category::cmy<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::cmy<tag_name>>::akin_type>::model_type component_parameter)6802 green
6803 (
6804 	::color::model< ::color::category::cmy< tag_name > > & color_parameter
6805 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::cmy< tag_name > >::akin_type >::model_type component_parameter
6806 ) {
6807 	typedef ::color::category::cmy< tag_name > category_type;
6808 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
6809 	typedef ::color::operation::_internal::invert< akin_type > invert_type;
6810 	typedef ::color::_internal::reformat< category_type, akin_type > reformat_type;
6811 	enum { yellow_p = ::color::place::_internal::yellow<category_type>::position_enum };
6812 	color_parameter.template set<yellow_p>(reformat_type::template process<yellow_p,yellow_p>(invert_type::template component<yellow_p>(component_parameter)));
6813 }
6814 
6815 }
6816 }
6817 
6818 namespace color {
6819 namespace set {
6820 
6821 template< typename tag_name >
6822 inline
6823 void
blue(::color::model<::color::category::cmy<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::cmy<tag_name>>::akin_type>::model_type component_parameter)6824 blue
6825 (
6826 	::color::model< ::color::category::cmy< tag_name > > & color_parameter
6827 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::cmy< tag_name > >::akin_type >::model_type component_parameter
6828 ) {
6829 	typedef ::color::category::cmy< tag_name > category_type;
6830 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
6831 	typedef ::color::operation::_internal::invert< akin_type > invert_type;
6832 	typedef ::color::_internal::reformat< category_type, akin_type > reformat_type;
6833 	enum { magenta_p = ::color::place::_internal::magenta<category_type>::position_enum };
6834 	color_parameter.template set<magenta_p>(reformat_type::template process<magenta_p,magenta_p>(invert_type::template component<magenta_p>(component_parameter)));
6835 }
6836 
6837 }
6838 }
6839 
6840 namespace color {
6841 namespace operation {
6842 namespace _internal {
6843 
6844 template< typename category_name >
6845 struct scale {
6846 public:
6847 	typedef category_name category_type;
6848 
6849 	typedef ::color::trait::index<category_type> index_trait_type;
6850 	typedef ::color::trait::component< category_type > component_trait_type;
6851 	typedef ::color::trait::container< category_type > container_trait_type;
6852 	typedef ::color::trait::scalar< category_name > scalar_trait_type;
6853 
6854 	typedef typename scalar_trait_type::model_type scalar_const_input_type;
6855 
6856 	typedef typename component_trait_type::instance_type component_instance_type;
6857 
6858 	typedef ::color::model<category_type> model_type;
6859 
6860 	typedef model_type & model_output_type;
6861 	typedef model_type const& model_const_input_type;
6862 
6863 	typedef typename index_trait_type::instance_type index_type;
6864 
6865 	typedef ::color::operation::_internal::scale<category_type> this_type;
6866 
6867 public:
operator ()color::operation::_internal::scale6868 	model_type& operator()(model_output_type result, scalar_const_input_type scalar) const {
6869 		return this_type::accumulate(result, scalar);
6870 	}
6871 
operator ()color::operation::_internal::scale6872 	model_type& operator()(model_output_type result, scalar_const_input_type scalar, model_const_input_type right) const {
6873 		return this_type::procedure(result, scalar, right);
6874 	}
6875 
6876 public:
accumulatecolor::operation::_internal::scale6877 	static model_type & accumulate(model_output_type result, scalar_const_input_type const& scalar) {
6878 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
6879 			result.set(index, component_instance_type(result.get(index) * scalar));
6880 		}
6881 		return result;
6882 	}
6883 
procedurecolor::operation::_internal::scale6884 	static model_type & procedure(model_output_type result, scalar_const_input_type scalar, model_const_input_type right) {
6885 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
6886 			result.set(index, component_instance_type(scalar * right.get(index)));
6887 		}
6888 		return result;
6889 	}
6890 };
6891 
6892 }
6893 
6894 template< typename category_name >
6895 ::color::model<category_name> &
scale(::color::model<category_name> & result,typename::color::trait::scalar<category_name>::model_type scalar)6896 scale
6897 (
6898 	::color::model<category_name> & result
6899 	,typename ::color::trait::scalar<category_name>::model_type scalar
6900 ) {
6901 	return ::color::operation::_internal::scale<category_name>::accumulate(result, scalar);
6902 }
6903 
6904 template< typename category_name >
6905 ::color::model<category_name> &
scale(::color::model<category_name> & result,typename::color::trait::scalar<category_name>::model_type scalar,::color::model<category_name> const & right)6906 scale
6907 (
6908 	::color::model<category_name> & result
6909 	,typename ::color::trait::scalar<category_name>::model_type scalar
6910 	,::color::model<category_name> const& right
6911 ) {
6912 	return ::color::operation::_internal::scale<category_name>::procedure(result, scalar, right);
6913 }
6914 
6915 }
6916 }
6917 
6918 namespace color {
6919 namespace akin {
6920 
6921 template< >struct gray< ::color::category::rgb_uint8 > {
6922 	typedef ::color::category::gray_uint8 akin_type;
6923 };
6924 template< >struct gray< ::color::category::rgb_uint16 > {
6925 	typedef ::color::category::gray_uint8 akin_type;
6926 };
6927 template< >struct gray< ::color::category::rgb_uint32 > {
6928 	typedef ::color::category::gray_uint8 akin_type;
6929 };
6930 template< >struct gray< ::color::category::rgb_uint64 > {
6931 	typedef ::color::category::gray_uint16 akin_type;
6932 };
6933 template< >struct gray< ::color::category::rgb_float > {
6934 	typedef ::color::category::gray_float akin_type;
6935 };
6936 template< >struct gray< ::color::category::rgb_double > {
6937 	typedef ::color::category::gray_double akin_type;
6938 };
6939 template< >struct gray< ::color::category::rgb_ldouble > {
6940 	typedef ::color::category::gray_ldouble akin_type;
6941 };
6942 
6943 }
6944 }
6945 
6946 namespace color {
6947 namespace set {
6948 
6949 template< typename tag_name >
6950 inline
6951 void
gray(::color::model<::color::category::cmy<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::cmy<tag_name>>::akin_type>::model_type component_parameter)6952 gray
6953 (
6954 	::color::model< ::color::category::cmy<tag_name> > & color_parameter
6955 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::cmy<tag_name> >::akin_type >::model_type component_parameter
6956 ) {
6957 	typedef ::color::category::cmy< tag_name > category_type;
6958 	typedef typename ::color::trait::scalar< category_type >::instance_type scalar_type;
6959 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
6960 	typedef ::color::_internal::normalize< category_type > normalize_cmy_type;
6961 	typedef ::color::_internal::normalize< akin_type > normalize_akin_type;
6962 	typedef ::color::constant::gray::rgb< akin_type > gray_const_type;
6963 	enum {
6964 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
6965 		,magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
6966 		, yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
6967 	};
6968 	scalar_type value =
6969 		gray_const_type::Rc() * (scalar_type(1) - normalize_cmy_type::template process< cyan_p>(color_parameter.template get< cyan_p>()))
6970 		+ gray_const_type::Gc() * (scalar_type(1) - normalize_cmy_type::template process<magenta_p>(color_parameter.template get<magenta_p>()))
6971 		+ gray_const_type::Bc() * (scalar_type(1) - normalize_cmy_type::template process< yellow_p>(color_parameter.template get< yellow_p>()));
6972 	value = normalize_akin_type::template process<0>(component_parameter) / value;
6973 	::color::operation::scale(color_parameter, scalar_type(1) - value);
6974 }
6975 
6976 }
6977 }
6978 
6979 namespace color {
6980 namespace akin {
6981 
6982 template< typename tag_name >
6983 struct gray< ::color::category::gray< tag_name > > {
6984 public:
6985 	typedef ::color::category::gray< tag_name > akin_type;
6986 };
6987 
6988 }
6989 }
6990 
6991 namespace color {
6992 namespace akin {
6993 
6994 template< >struct gray< ::color::category::cmyk_uint8 > {
6995 	typedef ::color::category::gray_uint8 akin_type;
6996 };
6997 template< >struct gray< ::color::category::cmyk_uint16 > {
6998 	typedef ::color::category::gray_uint16 akin_type;
6999 };
7000 template< >struct gray< ::color::category::cmyk_uint32 > {
7001 	typedef ::color::category::gray_uint32 akin_type;
7002 };
7003 template< >struct gray< ::color::category::cmyk_uint64 > {
7004 	typedef ::color::category::gray_uint64 akin_type;
7005 };
7006 template< >struct gray< ::color::category::cmyk_float > {
7007 	typedef ::color::category::gray_float akin_type;
7008 };
7009 template< >struct gray< ::color::category::cmyk_double > {
7010 	typedef ::color::category::gray_double akin_type;
7011 };
7012 template< >struct gray< ::color::category::cmyk_ldouble > {
7013 	typedef ::color::category::gray_ldouble akin_type;
7014 };
7015 
7016 }
7017 }
7018 
7019 namespace color {
7020 namespace akin {
7021 
7022 template< >struct gray< ::color::category::hsl_uint8 > {
7023 	typedef ::color::category::gray_uint8 akin_type;
7024 };
7025 template< >struct gray< ::color::category::hsl_uint16 > {
7026 	typedef ::color::category::gray_uint16 akin_type;
7027 };
7028 template< >struct gray< ::color::category::hsl_uint32 > {
7029 	typedef ::color::category::gray_uint32 akin_type;
7030 };
7031 template< >struct gray< ::color::category::hsl_uint64 > {
7032 	typedef ::color::category::gray_uint64 akin_type;
7033 };
7034 template< >struct gray< ::color::category::hsl_float > {
7035 	typedef ::color::category::gray_float akin_type;
7036 };
7037 template< >struct gray< ::color::category::hsl_double > {
7038 	typedef ::color::category::gray_double akin_type;
7039 };
7040 template< >struct gray< ::color::category::hsl_ldouble > {
7041 	typedef ::color::category::gray_ldouble akin_type;
7042 };
7043 
7044 }
7045 }
7046 
7047 namespace color {
7048 namespace akin {
7049 
7050 template< >struct gray< ::color::category::hsv_uint8 > {
7051 	typedef ::color::category::gray_uint8 akin_type;
7052 };
7053 template< >struct gray< ::color::category::hsv_uint16 > {
7054 	typedef ::color::category::gray_uint16 akin_type;
7055 };
7056 template< >struct gray< ::color::category::hsv_uint32 > {
7057 	typedef ::color::category::gray_uint32 akin_type;
7058 };
7059 template< >struct gray< ::color::category::hsv_uint64 > {
7060 	typedef ::color::category::gray_uint64 akin_type;
7061 };
7062 template< >struct gray< ::color::category::hsv_float > {
7063 	typedef ::color::category::gray_float akin_type;
7064 };
7065 template< >struct gray< ::color::category::hsv_double > {
7066 	typedef ::color::category::gray_double akin_type;
7067 };
7068 template< >struct gray< ::color::category::hsv_ldouble > {
7069 	typedef ::color::category::gray_ldouble akin_type;
7070 };
7071 
7072 }
7073 }
7074 
7075 namespace color {
7076 namespace akin {
7077 
7078 template< >struct gray< ::color::category::hsi_uint8 > {
7079 	typedef ::color::category::gray_uint8 akin_type;
7080 };
7081 template< >struct gray< ::color::category::hsi_uint16 > {
7082 	typedef ::color::category::gray_uint16 akin_type;
7083 };
7084 template< >struct gray< ::color::category::hsi_uint32 > {
7085 	typedef ::color::category::gray_uint32 akin_type;
7086 };
7087 template< >struct gray< ::color::category::hsi_uint64 > {
7088 	typedef ::color::category::gray_uint64 akin_type;
7089 };
7090 template< >struct gray< ::color::category::hsi_float > {
7091 	typedef ::color::category::gray_float akin_type;
7092 };
7093 template< >struct gray< ::color::category::hsi_double > {
7094 	typedef ::color::category::gray_double akin_type;
7095 };
7096 template< >struct gray< ::color::category::hsi_ldouble > {
7097 	typedef ::color::category::gray_ldouble akin_type;
7098 };
7099 
7100 }
7101 }
7102 
7103 namespace color {
7104 namespace akin {
7105 
7106 template
7107 <
7108 	typename tag_name
7109 
7110 	>
7111 struct gray< ::color::category::hwb< tag_name > > {
7112 public:
7113 	typedef ::color::category::gray< tag_name > akin_type;
7114 };
7115 
7116 }
7117 }
7118 
7119 namespace color {
7120 namespace akin {
7121 
7122 template< >struct gray< ::color::category::yiq_uint8 > {
7123 	typedef ::color::category::gray_uint8 akin_type;
7124 };
7125 template< >struct gray< ::color::category::yiq_uint16 > {
7126 	typedef ::color::category::gray_uint16 akin_type;
7127 };
7128 template< >struct gray< ::color::category::yiq_uint32 > {
7129 	typedef ::color::category::gray_uint32 akin_type;
7130 };
7131 template< >struct gray< ::color::category::yiq_uint64 > {
7132 	typedef ::color::category::gray_uint64 akin_type;
7133 };
7134 template< >struct gray< ::color::category::yiq_float > {
7135 	typedef ::color::category::gray_float akin_type;
7136 };
7137 template< >struct gray< ::color::category::yiq_double > {
7138 	typedef ::color::category::gray_double akin_type;
7139 };
7140 template< >struct gray< ::color::category::yiq_ldouble > {
7141 	typedef ::color::category::gray_ldouble akin_type;
7142 };
7143 
7144 }
7145 }
7146 
7147 namespace color {
7148 namespace akin {
7149 
7150 template< ::color::constant::yuv::reference_enum reference_number >struct gray< ::color::category::yuv_uint8 <reference_number> > {
7151 	typedef ::color::category::gray_uint8 akin_type;
7152 };
7153 template< ::color::constant::yuv::reference_enum reference_number >struct gray< ::color::category::yuv_uint16 <reference_number> > {
7154 	typedef ::color::category::gray_uint16 akin_type;
7155 };
7156 template< ::color::constant::yuv::reference_enum reference_number >struct gray< ::color::category::yuv_uint32 <reference_number> > {
7157 	typedef ::color::category::gray_uint32 akin_type;
7158 };
7159 template< ::color::constant::yuv::reference_enum reference_number >struct gray< ::color::category::yuv_uint64 <reference_number> > {
7160 	typedef ::color::category::gray_uint64 akin_type;
7161 };
7162 template< ::color::constant::yuv::reference_enum reference_number >struct gray< ::color::category::yuv_float <reference_number> > {
7163 	typedef ::color::category::gray_float akin_type;
7164 };
7165 template< ::color::constant::yuv::reference_enum reference_number >struct gray< ::color::category::yuv_double <reference_number> > {
7166 	typedef ::color::category::gray_double akin_type;
7167 };
7168 template< ::color::constant::yuv::reference_enum reference_number >struct gray< ::color::category::yuv_ldouble<reference_number> > {
7169 	typedef ::color::category::gray_ldouble akin_type;
7170 };
7171 
7172 }
7173 }
7174 
7175 namespace color {
7176 namespace akin {
7177 
7178 template< >struct gray< ::color::category::YCgCo_uint8 > {
7179 	typedef ::color::category::gray_uint8 akin_type;
7180 };
7181 template< >struct gray< ::color::category::YCgCo_uint16 > {
7182 	typedef ::color::category::gray_uint16 akin_type;
7183 };
7184 template< >struct gray< ::color::category::YCgCo_uint32 > {
7185 	typedef ::color::category::gray_uint32 akin_type;
7186 };
7187 template< >struct gray< ::color::category::YCgCo_uint64 > {
7188 	typedef ::color::category::gray_uint64 akin_type;
7189 };
7190 template< >struct gray< ::color::category::YCgCo_float > {
7191 	typedef ::color::category::gray_float akin_type;
7192 };
7193 template< >struct gray< ::color::category::YCgCo_double > {
7194 	typedef ::color::category::gray_double akin_type;
7195 };
7196 template< >struct gray< ::color::category::YCgCo_ldouble > {
7197 	typedef ::color::category::gray_ldouble akin_type;
7198 };
7199 
7200 }
7201 }
7202 
7203 namespace color {
7204 namespace akin {
7205 
7206 template< >struct gray< ::color::category::YDbDr_uint8 > {
7207 	typedef ::color::category::gray_uint8 akin_type;
7208 };
7209 template< >struct gray< ::color::category::YDbDr_uint16 > {
7210 	typedef ::color::category::gray_uint16 akin_type;
7211 };
7212 template< >struct gray< ::color::category::YDbDr_uint32 > {
7213 	typedef ::color::category::gray_uint32 akin_type;
7214 };
7215 template< >struct gray< ::color::category::YDbDr_uint64 > {
7216 	typedef ::color::category::gray_uint64 akin_type;
7217 };
7218 template< >struct gray< ::color::category::YDbDr_float > {
7219 	typedef ::color::category::gray_float akin_type;
7220 };
7221 template< >struct gray< ::color::category::YDbDr_double > {
7222 	typedef ::color::category::gray_double akin_type;
7223 };
7224 template< >struct gray< ::color::category::YDbDr_ldouble > {
7225 	typedef ::color::category::gray_ldouble akin_type;
7226 };
7227 
7228 }
7229 }
7230 
7231 namespace color {
7232 namespace akin {
7233 
7234 template< ::color::constant::YPbPr::reference_enum reference_number >struct gray< ::color::category::YPbPr_uint8 <reference_number> > {
7235 	typedef ::color::category::gray_uint8 akin_type;
7236 };
7237 template< ::color::constant::YPbPr::reference_enum reference_number >struct gray< ::color::category::YPbPr_uint16 <reference_number> > {
7238 	typedef ::color::category::gray_uint16 akin_type;
7239 };
7240 template< ::color::constant::YPbPr::reference_enum reference_number >struct gray< ::color::category::YPbPr_uint32 <reference_number> > {
7241 	typedef ::color::category::gray_uint32 akin_type;
7242 };
7243 template< ::color::constant::YPbPr::reference_enum reference_number >struct gray< ::color::category::YPbPr_uint64 <reference_number> > {
7244 	typedef ::color::category::gray_uint64 akin_type;
7245 };
7246 template< ::color::constant::YPbPr::reference_enum reference_number >struct gray< ::color::category::YPbPr_float <reference_number> > {
7247 	typedef ::color::category::gray_float akin_type;
7248 };
7249 template< ::color::constant::YPbPr::reference_enum reference_number >struct gray< ::color::category::YPbPr_double <reference_number> > {
7250 	typedef ::color::category::gray_double akin_type;
7251 };
7252 template< ::color::constant::YPbPr::reference_enum reference_number >struct gray< ::color::category::YPbPr_ldouble<reference_number> > {
7253 	typedef ::color::category::gray_ldouble akin_type;
7254 };
7255 
7256 }
7257 }
7258 
7259 namespace color {
7260 namespace akin {
7261 
7262 template< >struct gray< ::color::category::xyz_uint8 > {
7263 	typedef ::color::category::gray_uint8 akin_type;
7264 };
7265 template< >struct gray< ::color::category::xyz_uint16 > {
7266 	typedef ::color::category::gray_uint16 akin_type;
7267 };
7268 template< >struct gray< ::color::category::xyz_uint32 > {
7269 	typedef ::color::category::gray_uint32 akin_type;
7270 };
7271 template< >struct gray< ::color::category::xyz_uint64 > {
7272 	typedef ::color::category::gray_uint64 akin_type;
7273 };
7274 template< >struct gray< ::color::category::xyz_float > {
7275 	typedef ::color::category::gray_float akin_type;
7276 };
7277 template< >struct gray< ::color::category::xyz_double > {
7278 	typedef ::color::category::gray_double akin_type;
7279 };
7280 template< >struct gray< ::color::category::xyz_ldouble > {
7281 	typedef ::color::category::gray_ldouble akin_type;
7282 };
7283 
7284 }
7285 }
7286 
7287 namespace color {
7288 namespace akin {
7289 
7290 template
7291 <
7292 	typename tag_name
7293 	,::color::constant::lab::reference_enum lab_reference_number
7294 	>
7295 struct gray< ::color::category::lab< tag_name, lab_reference_number > > {
7296 public:
7297 	typedef ::color::category::gray< tag_name > akin_type;
7298 };
7299 
7300 }
7301 }
7302 
7303 namespace color {
7304 namespace akin {
7305 
7306 template< >struct gray< ::color::category::xyy_uint8 > {
7307 	typedef ::color::category::gray_uint8 akin_type;
7308 };
7309 template< >struct gray< ::color::category::xyy_uint16 > {
7310 	typedef ::color::category::gray_uint16 akin_type;
7311 };
7312 template< >struct gray< ::color::category::xyy_uint32 > {
7313 	typedef ::color::category::gray_uint32 akin_type;
7314 };
7315 template< >struct gray< ::color::category::xyy_uint64 > {
7316 	typedef ::color::category::gray_uint64 akin_type;
7317 };
7318 template< >struct gray< ::color::category::xyy_float > {
7319 	typedef ::color::category::gray_float akin_type;
7320 };
7321 template< >struct gray< ::color::category::xyy_double > {
7322 	typedef ::color::category::gray_double akin_type;
7323 };
7324 template< >struct gray< ::color::category::xyy_ldouble > {
7325 	typedef ::color::category::gray_ldouble akin_type;
7326 };
7327 
7328 }
7329 }
7330 
7331 namespace color {
7332 namespace akin {
7333 
7334 template
7335 <
7336 	typename tag_name
7337 	,::color::constant::lms::reference_enum reference_number
7338 
7339 	>
7340 struct gray< ::color::category::lms< tag_name, reference_number > > {
7341 public:
7342 	typedef ::color::category::gray< tag_name > akin_type;
7343 };
7344 
7345 }
7346 }
7347 
7348 namespace color {
7349 namespace akin {
7350 
7351 template< >struct gray< ::color::category::luv_uint8 > {
7352 	typedef ::color::category::gray_uint8 akin_type;
7353 };
7354 template< >struct gray< ::color::category::luv_uint16 > {
7355 	typedef ::color::category::gray_uint16 akin_type;
7356 };
7357 template< >struct gray< ::color::category::luv_uint32 > {
7358 	typedef ::color::category::gray_uint32 akin_type;
7359 };
7360 template< >struct gray< ::color::category::luv_uint64 > {
7361 	typedef ::color::category::gray_uint64 akin_type;
7362 };
7363 template< >struct gray< ::color::category::luv_float > {
7364 	typedef ::color::category::gray_float akin_type;
7365 };
7366 template< >struct gray< ::color::category::luv_double > {
7367 	typedef ::color::category::gray_double akin_type;
7368 };
7369 template< >struct gray< ::color::category::luv_ldouble > {
7370 	typedef ::color::category::gray_ldouble akin_type;
7371 };
7372 
7373 }
7374 }
7375 
7376 namespace color {
7377 namespace akin {
7378 
7379 template
7380 <
7381 	typename tag_name
7382 	>
7383 struct gray< ::color::category::LabCH< tag_name > > {
7384 public:
7385 	typedef ::color::category::gray< tag_name > akin_type;
7386 };
7387 
7388 }
7389 }
7390 
7391 namespace color {
7392 namespace akin {
7393 
7394 template< >struct gray< ::color::category::LuvCH_uint8 > {
7395 	typedef ::color::category::gray_uint8 akin_type;
7396 };
7397 template< >struct gray< ::color::category::LuvCH_uint16 > {
7398 	typedef ::color::category::gray_uint16 akin_type;
7399 };
7400 template< >struct gray< ::color::category::LuvCH_uint32 > {
7401 	typedef ::color::category::gray_uint32 akin_type;
7402 };
7403 template< >struct gray< ::color::category::LuvCH_uint64 > {
7404 	typedef ::color::category::gray_uint64 akin_type;
7405 };
7406 template< >struct gray< ::color::category::LuvCH_float > {
7407 	typedef ::color::category::gray_float akin_type;
7408 };
7409 template< >struct gray< ::color::category::LuvCH_double > {
7410 	typedef ::color::category::gray_double akin_type;
7411 };
7412 template< >struct gray< ::color::category::LuvCH_ldouble > {
7413 	typedef ::color::category::gray_ldouble akin_type;
7414 };
7415 
7416 }
7417 }
7418 
7419 namespace color {
7420 namespace trait {
7421 
7422 template <> struct info< ::color::category::gray_bool > {
7423 public:
7424 	enum { implemented_entity = true };
7425 	enum { meaningful_entity = true };
7426 };
7427 template <> struct info< ::color::category::gray_uint8 > {
7428 public:
7429 	enum { implemented_entity = true };
7430 	enum { meaningful_entity = true };
7431 };
7432 template <> struct info< ::color::category::gray_uint16 > {
7433 public:
7434 	enum { implemented_entity = true };
7435 	enum { meaningful_entity = true };
7436 };
7437 template <> struct info< ::color::category::gray_uint32 > {
7438 public:
7439 	enum { implemented_entity = true };
7440 	enum { meaningful_entity = true };
7441 };
7442 template <> struct info< ::color::category::gray_uint64 > {
7443 public:
7444 	enum { implemented_entity = true };
7445 	enum { meaningful_entity = true };
7446 };
7447 template <> struct info< ::color::category::gray_float > {
7448 public:
7449 	enum { implemented_entity = true };
7450 	enum { meaningful_entity = true };
7451 };
7452 template <> struct info< ::color::category::gray_double > {
7453 public:
7454 	enum { implemented_entity = true };
7455 	enum { meaningful_entity = true };
7456 };
7457 template <> struct info< ::color::category::gray_ldouble > {
7458 public:
7459 	enum { implemented_entity = true };
7460 	enum { meaningful_entity = true };
7461 };
7462 
7463 }
7464 }
7465 
7466 namespace color {
7467 namespace trait {
7468 
7469 template< >
7470 struct bound< ::color::category::gray_bool >
7471 	: public ::color::_internal::utility::bound::general< bool, typename ::color::trait::index< ::color::category::gray_bool >::instance_type > {
7472 };
7473 
7474 }
7475 }
7476 
7477 namespace color {
7478 namespace trait {
7479 
7480 template< >
7481 struct bound< ::color::category::gray_float >
7482 	: public ::color::_internal::utility::bound::general< float, typename ::color::trait::index< ::color::category::gray_float >::instance_type > {
7483 };
7484 
7485 template< >
7486 struct bound< ::color::category::gray_double >
7487 	: public ::color::_internal::utility::bound::general< double, typename ::color::trait::index< ::color::category::gray_double >::instance_type > {
7488 };
7489 
7490 template< >
7491 struct bound< ::color::category::gray_ldouble >
7492 	: public ::color::_internal::utility::bound::general< long double, typename ::color::trait::index< ::color::category::gray_ldouble >::instance_type > {
7493 };
7494 
7495 }
7496 }
7497 
7498 namespace color {
7499 namespace trait {
7500 
7501 template< >
7502 struct bound< ::color::category::gray_uint8 >
7503 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::gray_uint8 >::instance_type > {
7504 };
7505 
7506 template< >
7507 struct bound< ::color::category::gray_uint16 >
7508 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::gray_uint16 >::instance_type > {
7509 };
7510 
7511 template< >
7512 struct bound< ::color::category::gray_uint32 >
7513 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::gray_uint32 >::instance_type > {
7514 };
7515 
7516 template< >
7517 struct bound< ::color::category::gray_uint64 >
7518 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::gray_uint64 >::instance_type > {
7519 };
7520 
7521 }
7522 }
7523 
7524 namespace color {
7525 namespace _internal {
7526 namespace utility {
7527 namespace container {
7528 
7529 template< typename index_name >
7530 struct boolean {
7531 public:
7532 	typedef index_name index_type;
7533 	typedef bool value_type;
7534 
7535 	typedef ::color::_internal::utility::container::boolean< index_name > this_type;
7536 
7537 	typedef bool instance_type;
7538 
7539 	typedef instance_type const const_type;
7540 	typedef instance_type const& return_image_type;
7541 	typedef instance_type & return_type;
7542 	typedef instance_type & return_original_type;
7543 	typedef instance_type const& model_type;
7544 	typedef instance_type & input_type;
7545 	typedef instance_type & output_type;
7546 
7547 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
7548 
7549 	typedef typename index_trait_type::instance_type index_instance_type;
7550 
7551 	typedef typename index_trait_type::model_type index_input_const_type;
7552 	typedef typename index_trait_type::return_image_type index_return_image_type;
7553 
7554 	typedef ::color::_internal::utility::type::traitC< value_type > component_trait_type;
7555 
7556 	typedef typename component_trait_type::instance_type component_type;
7557 
7558 	typedef typename component_trait_type::return_image_type component_return_const_type;
7559 	typedef typename component_trait_type::model_type component_input_const_type;
7560 
7561 	typedef ::color::_internal::utility::type::size< std::size_t > size_trait_type;
7562 
7563 	typedef typename size_trait_type::return_image_type size_return_image_type;
7564 	typedef typename size_trait_type::instance_type size_instance_type;
7565 
7566 	typedef void set_return_type;
7567 
7568 	enum { size_entity = 1 };
7569 
initcolor::_internal::utility::container::boolean7570 	static set_return_type init(input_type container, index_input_const_type index, component_input_const_type value) {
7571 		this_type::set(container, index, value);
7572 	}
7573 
7574 	template< index_instance_type index >
initcolor::_internal::utility::container::boolean7575 	static set_return_type init(input_type container, component_input_const_type value) {
7576 		this_type:: template set<index>(container, value);
7577 	}
7578 
getcolor::_internal::utility::container::boolean7579 	static component_return_const_type get(model_type container, index_input_const_type index) {
7580 		return container;
7581 	}
7582 
7583 	template< index_instance_type index >
getcolor::_internal::utility::container::boolean7584 	static component_return_const_type get(model_type container) {
7585 		return container;
7586 	}
7587 
setcolor::_internal::utility::container::boolean7588 	static set_return_type set(input_type container, index_input_const_type index, component_input_const_type value) {
7589 		container = value;
7590 	}
7591 
7592 	template< index_instance_type index >
setcolor::_internal::utility::container::boolean7593 	static set_return_type set(input_type container, component_input_const_type value) {
7594 		container = value;
7595 	}
7596 
sizecolor::_internal::utility::container::boolean7597 	static size_return_image_type size() {
7598 		static const size_instance_type local_length = size_entity;
7599 		return local_length;
7600 	}
7601 };
7602 }
7603 }
7604 }
7605 }
7606 
7607 namespace color {
7608 namespace trait {
7609 
7610 template< >
7611 struct container< ::color::category::gray_bool >
7612 	: public ::color::_internal::utility::container::boolean< typename ::color::trait::index< ::color::category::gray_bool >::instance_type > {
7613 };
7614 
7615 }
7616 }
7617 
7618 namespace color {
7619 namespace trait {
7620 
7621 template< >
7622 struct container< ::color::category::gray_float >
7623 	: public ::color::_internal::utility::container::array< float, 1 > {
7624 };
7625 
7626 template< >
7627 struct container< ::color::category::gray_ldouble >
7628 	: public ::color::_internal::utility::container::array< long double, 1 > {
7629 };
7630 
7631 template< >
7632 struct container< ::color::category::gray_double >
7633 	: public ::color::_internal::utility::container::array< double, 1 > {
7634 };
7635 
7636 }
7637 }
7638 
7639 namespace color {
7640 namespace _internal {
7641 namespace utility {
7642 namespace container {
7643 
7644 template< typename unsigned_name, typename value_name, typename index_name, unsigned length, unsigned width >
7645 struct Unsigned {
7646 public:
7647 	typedef unsigned_name unsigned_type;
7648 	typedef value_name value_type;
7649 	typedef index_name index_type;
7650 	typedef unsigned_name instance_type;
7651 
7652 	typedef ::color::_internal::utility::container::Unsigned<unsigned_name,value_name,index_name,length,width> this_type;
7653 
7654 	typedef instance_type const const_type;
7655 	typedef instance_type const& return_image_type;
7656 	typedef instance_type & return_type;
7657 	typedef instance_type & return_original_type;
7658 	typedef instance_type const& model_type;
7659 	typedef instance_type & input_type;
7660 	typedef instance_type & output_type;
7661 
7662 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
7663 
7664 	typedef typename index_trait_type::instance_type index_instance_type;
7665 	typedef typename index_trait_type::model_type index_input_const_type;
7666 
7667 	typedef typename index_trait_type::return_image_type index_return_image_type;
7668 
7669 	typedef ::color::_internal::utility::type::traitP< value_name > component_trait_type;
7670 
7671 	typedef typename component_trait_type::instance_type component_type;
7672 	typedef typename component_trait_type::const_type component_const_type;
7673 	typedef typename component_trait_type::return_image_type component_return_const_type;
7674 	typedef typename component_trait_type::model_type component_input_const_type;
7675 
7676 	typedef ::color::_internal::utility::type::size< std::size_t > size_trait_type;
7677 
7678 	typedef typename size_trait_type::return_image_type size_return_image_type;
7679 	typedef typename size_trait_type::instance_type size_instance_type;
7680 
7681 	typedef void set_return_type;
7682 
7683 	enum { size_entity = length };
7684 
initcolor::_internal::utility::container::Unsigned7685 	static set_return_type init(input_type container, index_input_const_type index, component_input_const_type value) {
7686 		this_type::set(container, index, value);
7687 	}
7688 
7689 	template< index_instance_type index >
initcolor::_internal::utility::container::Unsigned7690 	static set_return_type init(input_type container, component_input_const_type value) {
7691 		this_type:: template set<index>(container, value);
7692 	}
7693 
getcolor::_internal::utility::container::Unsigned7694 	static component_return_const_type get(model_type container, index_input_const_type index) {
7695 		return (component_type)((container >> (index * width)) & mask());
7696 	}
7697 
7698 	template< index_instance_type index >
getcolor::_internal::utility::container::Unsigned7699 	static component_return_const_type get(model_type container) {
7700 		return (component_type)((container >> (index * width)) & mask());
7701 	}
7702 
setcolor::_internal::utility::container::Unsigned7703 	static set_return_type set(input_type container, index_input_const_type index, component_input_const_type value) {
7704 		container = (container & ~(this_type::mask() << (index * width))) | ((instance_type(value) << (index * width)));
7705 	}
7706 
7707 	template< index_instance_type index >
setcolor::_internal::utility::container::Unsigned7708 	static set_return_type set(input_type container, component_input_const_type value) {
7709 		container = (container & ~(this_type::mask() << (index * width))) | ((instance_type(value)) << (index * width));
7710 	}
7711 
sizecolor::_internal::utility::container::Unsigned7712 	static size_return_image_type size() {
7713 		static const size_instance_type local_length = size_entity;
7714 		return local_length;
7715 	}
7716 private:
maskcolor::_internal::utility::container::Unsigned7717 	static return_image_type mask() {
7718 		static const instance_type local_mask = (((instance_type(1) << (width-1)) - instance_type(1))<< 1) + instance_type(1);
7719 		return local_mask;
7720 	}
7721 };
7722 
7723 }
7724 }
7725 }
7726 }
7727 
7728 namespace color {
7729 namespace trait {
7730 
7731 template< >
7732 struct container< ::color::category::gray_uint8 >
7733 	: public ::color::_internal::utility::container::Unsigned< std::uint8_t, std::uint8_t, typename ::color::trait::index< ::color::category::gray_uint8 >::instance_type, 1, 8 > {
7734 };
7735 
7736 template< >
7737 struct container< ::color::category::gray_uint16 >
7738 	: public ::color::_internal::utility::container::Unsigned< std::uint16_t, std::uint16_t, typename ::color::trait::index< ::color::category::gray_uint16 >::instance_type, 1, 16 > {
7739 };
7740 
7741 template< >
7742 struct container< ::color::category::gray_uint32 >
7743 	: public ::color::_internal::utility::container::Unsigned< std::uint32_t, std::uint32_t, typename ::color::trait::index< ::color::category::gray_uint32 >::instance_type, 1, 32 > {
7744 };
7745 
7746 template< >
7747 struct container< ::color::category::gray_uint64 >
7748 	: public ::color::_internal::utility::container::Unsigned< std::uint64_t, std::uint64_t, typename ::color::trait::index< ::color::category::gray_uint64 >::instance_type, 1, 64 > {
7749 };
7750 
7751 }
7752 }
7753 
7754 namespace color {
7755 
7756 template< typename type_name >
7757 using gray = ::color::model< ::color::category::gray< type_name > >;
7758 
7759 }
7760 
7761 namespace color {
7762 namespace place {
7763 namespace _internal {
7764 
7765 template< typename tag_name >
7766 struct gray< ::color::category::gray< tag_name > > {
7767 public:
7768 	typedef ::color::category::gray< tag_name > category_type;
7769 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
7770 
7771 	enum { position_enum = 0 };
7772 	enum { has_enum = true };
7773 
positioncolor::place::_internal::gray7774 	static index_instance_type position() {
7775 		return position_enum;
7776 	}
7777 };
7778 
7779 }
7780 }
7781 }
7782 
7783 namespace color {
7784 namespace akin {
7785 
7786 template< >struct rgb< ::color::category::gray_uint8 > {
7787 	typedef ::color::category::rgb_uint8 akin_type;
7788 };
7789 template< >struct rgb< ::color::category::gray_uint16 > {
7790 	typedef ::color::category::rgb_uint16 akin_type;
7791 };
7792 template< >struct rgb< ::color::category::gray_uint32 > {
7793 	typedef ::color::category::rgb_uint32 akin_type;
7794 };
7795 template< >struct rgb< ::color::category::gray_uint64 > {
7796 	typedef ::color::category::rgb_uint64 akin_type;
7797 };
7798 template< >struct rgb< ::color::category::gray_float > {
7799 	typedef ::color::category::rgb_float akin_type;
7800 };
7801 template< >struct rgb< ::color::category::gray_double > {
7802 	typedef ::color::category::rgb_double akin_type;
7803 };
7804 template< >struct rgb< ::color::category::gray_ldouble > {
7805 	typedef ::color::category::rgb_ldouble akin_type;
7806 };
7807 
7808 }
7809 }
7810 
7811 namespace color {
7812 namespace get {
7813 
7814 template< typename tag_name >
7815 inline
7816 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::gray<tag_name> >::akin_type >::return_type
red(::color::model<::color::category::gray<tag_name>> const & color_parameter)7817 red(::color::model< ::color::category::gray<tag_name> > const& color_parameter) {
7818 	typedef ::color::category::gray<tag_name> category_type;
7819 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
7820 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
7821 	typedef ::color::_internal::reformat< akin_type, category_type > reformat_type;
7822 	return reformat_type::template process<red_p,0>(color_parameter.template get<0>());
7823 }
7824 
7825 }
7826 }
7827 
7828 namespace color {
7829 namespace get {
7830 
7831 template< typename tag_name >
7832 inline
7833 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::gray<tag_name> >::akin_type >::return_type
green(::color::model<::color::category::gray<tag_name>> const & color_parameter)7834 green(::color::model< ::color::category::gray<tag_name> > const& color_parameter) {
7835 	typedef ::color::category::gray<tag_name> category_type;
7836 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
7837 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
7838 	typedef ::color::_internal::reformat< akin_type, category_type > reformat_type;
7839 	return reformat_type::template process<green_p,0>(color_parameter.template get<0>());
7840 }
7841 
7842 }
7843 }
7844 
7845 namespace color {
7846 namespace get {
7847 
7848 template< typename tag_name >
7849 inline
7850 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::gray<tag_name> >::akin_type >::return_type
blue(::color::model<::color::category::gray<tag_name>> const & color_parameter)7851 blue(::color::model< ::color::category::gray<tag_name> > const& color_parameter) {
7852 	typedef ::color::category::gray<tag_name> category_type;
7853 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
7854 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
7855 	typedef ::color::_internal::reformat< akin_type, category_type > reformat_type;
7856 	return reformat_type::template process<blue_p,0>(color_parameter.template get<0>());
7857 }
7858 
7859 }
7860 }
7861 
7862 namespace color {
7863 namespace get {
7864 
7865 template< typename tag_name >
7866 typename ::color::trait::component< ::color::category::gray<tag_name> >::return_type
gray(::color::model<::color::category::gray<tag_name>> const & color_parameter)7867 gray(::color::model< ::color::category::gray<tag_name> > const& color_parameter) {
7868 	return color_parameter.template get<0>();
7869 }
7870 
7871 }
7872 }
7873 
7874 namespace color {
7875 namespace get {
7876 
7877 template< typename tag_name >
7878 typename ::color::trait::component< ::color::category::gray<tag_name> >::return_type
black(::color::model<::color::category::gray<tag_name>> const & color_parameter)7879 black(::color::model< ::color::category::gray<tag_name> > const& color_parameter) {
7880 	typedef ::color::category::gray<tag_name> category_type;
7881 	typedef ::color::operation::_internal::invert< category_type > invert_type;
7882 	return invert_type::template component<0>(color_parameter.template get<0>());
7883 }
7884 
7885 }
7886 }
7887 
7888 namespace color {
7889 namespace get {
7890 
7891 template< typename tag_name >
7892 typename ::color::trait::component< ::color::category::gray<tag_name> >::return_type
white(::color::model<::color::category::gray<tag_name>> const & color_parameter)7893 white(::color::model< ::color::category::gray<tag_name> > const& color_parameter) {
7894 	return color_parameter.template get<0>();
7895 }
7896 
7897 }
7898 }
7899 
7900 namespace color {
7901 namespace set {
7902 
7903 template< typename tag_name >
7904 inline
7905 void
red(::color::model<::color::category::gray<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::gray<tag_name>>::akin_type>::model_type component_parameter)7906 red
7907 (
7908 	::color::model< ::color::category::gray< tag_name > > & color_parameter
7909 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::gray< tag_name > >::akin_type >::model_type component_parameter
7910 ) {
7911 	typedef ::color::category::gray<tag_name > category_type;
7912 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
7913 	typedef ::color::_internal::reformat<category_type, akin_type > reformat_type;
7914 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
7915 	enum { gray_p = ::color::place::_internal::gray<category_type>::position_enum };
7916 	color_parameter.template set<gray_p>(reformat_type::template process<gray_p,red_p>(component_parameter));
7917 }
7918 
7919 }
7920 }
7921 
7922 namespace color {
7923 namespace set {
7924 
7925 template< typename tag_name >
7926 inline
7927 void
green(::color::model<::color::category::gray<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::gray<tag_name>>::akin_type>::model_type component_parameter)7928 green
7929 (
7930 	::color::model< ::color::category::gray< tag_name > > & color_parameter
7931 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::gray< tag_name > >::akin_type >::model_type component_parameter
7932 ) {
7933 	typedef ::color::category::gray<tag_name > category_type;
7934 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
7935 	typedef ::color::_internal::reformat<category_type, akin_type > reformat_type;
7936 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
7937 	enum { gray_p = ::color::place::_internal::gray<category_type>::position_enum };
7938 	color_parameter.template set<gray_p>(reformat_type::template process<gray_p,green_p>(component_parameter));
7939 }
7940 
7941 }
7942 }
7943 
7944 namespace color {
7945 namespace set {
7946 
7947 template< typename tag_name >
7948 inline
7949 void
blue(::color::model<::color::category::gray<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::gray<tag_name>>::akin_type>::model_type component_parameter)7950 blue
7951 (
7952 	::color::model< ::color::category::gray< tag_name > > & color_parameter
7953 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::gray< tag_name > >::akin_type >::model_type component_parameter
7954 ) {
7955 	typedef ::color::category::gray<tag_name > category_type;
7956 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
7957 	typedef ::color::_internal::reformat<category_type, akin_type > reformat_type;
7958 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
7959 	enum { gray_p = ::color::place::_internal::gray<category_type>::position_enum };
7960 	color_parameter.template set<gray_p>(reformat_type::template process<gray_p,blue_p>(component_parameter));
7961 }
7962 
7963 }
7964 }
7965 
7966 namespace color {
7967 namespace set {
7968 template< typename tag_name >
7969 inline
7970 void
gray(::color::model<::color::category::gray<tag_name>> & color_parameter,typename::color::model<::color::category::gray<tag_name>>::component_input_const_type component_parameter)7971 gray
7972 (
7973 	::color::model< ::color::category::gray< tag_name > > & color_parameter,
7974 	typename ::color::model< ::color::category::gray< tag_name > >::component_input_const_type component_parameter
7975 ) {
7976 	typedef ::color::category::gray< tag_name > category_type;
7977 	enum { gray_p = ::color::place::_internal::gray< category_type >::position_enum };
7978 	color_parameter.template set<gray_p>(component_parameter);
7979 }
7980 
7981 }
7982 }
7983 
7984 namespace color {
7985 namespace _internal {
7986 
7987 template< typename tag_left_name, typename tag_right_name >
7988 struct convert
7989 	<
7990 	::color::category::gray< tag_left_name >
7991 	,::color::category::gray< tag_right_name>
7992 	> {
7993 public:
7994 	typedef ::color::category::gray< tag_left_name > category_left_type;
7995 	typedef ::color::category::gray< tag_right_name> category_right_type;
7996 
7997 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
7998 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
7999 
8000 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
8001 
8002 	typedef typename container_left_trait_type::input_type container_left_input_type;
8003 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
8004 
8005 	enum {
8006 		gl = ::color::place::_internal::gray<category_left_type>::position_enum
8007 		,gr = ::color::place::_internal::gray<category_right_type>::position_enum
8008 	};
8009 
processcolor::_internal::convert8010 	static void process
8011 	(
8012 		container_left_input_type left
8013 		,container_right_const_input_type right
8014 	) {
8015 		container_left_trait_type::template set<gl>(left, reformat_type::template process<gl,gr>(container_right_trait_type::template get<gr>(right)));
8016 	}
8017 };
8018 
8019 }
8020 }
8021 
8022 namespace color {
8023 namespace _internal {
8024 
8025 template< typename gray_tag_name, typename cmy_tag_name >
8026 struct convert
8027 	<
8028 	::color::category::gray< gray_tag_name >
8029 	,::color::category::cmy<cmy_tag_name>
8030 	> {
8031 public:
8032 	typedef ::color::category::gray< gray_tag_name > category_left_type;
8033 	typedef ::color::category::cmy<cmy_tag_name> category_right_type;
8034 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
8035 
8036 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
8037 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
8038 
8039 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
8040 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
8041 
8042 	typedef typename container_left_trait_type::input_type container_left_input_type;
8043 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
8044 
8045 	typedef ::color::constant::gray::rgb< category_left_type > gray_const_type;
8046 
8047 	enum {
8048 		cyan_p = ::color::place::_internal::cyan<category_right_type>::position_enum
8049 		,magenta_p = ::color::place::_internal::magenta<category_right_type>::position_enum
8050 		, yellow_p = ::color::place::_internal::yellow<category_right_type>::position_enum
8051 	};
8052 
processcolor::_internal::convert8053 	static void process
8054 	(
8055 		container_left_input_type left
8056 		,container_right_const_input_type right
8057 	) {
8058 		scalar_type value =
8059 			gray_const_type::Rc() * (1 - normalize_type::template process< cyan_p> (container_right_trait_type::template get< cyan_p>(right)))
8060 			+ gray_const_type::Gc() * (1 - normalize_type::template process<magenta_p> (container_right_trait_type::template get<magenta_p>(right)))
8061 			+ gray_const_type::Bc() * (1 - normalize_type::template process< yellow_p> (container_right_trait_type::template get< yellow_p>(right)));
8062 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(value));
8063 	}
8064 };
8065 
8066 }
8067 }
8068 
8069 namespace color {
8070 namespace akin {
8071 
8072 template< >struct cmyk< ::color::category::gray_uint8 > {
8073 	typedef ::color::category::cmyk_uint8 akin_type;
8074 };
8075 template< >struct cmyk< ::color::category::gray_uint16 > {
8076 	typedef ::color::category::cmyk_uint16 akin_type;
8077 };
8078 template< >struct cmyk< ::color::category::gray_uint32 > {
8079 	typedef ::color::category::cmyk_uint32 akin_type;
8080 };
8081 template< >struct cmyk< ::color::category::gray_uint64 > {
8082 	typedef ::color::category::cmyk_uint64 akin_type;
8083 };
8084 template< >struct cmyk< ::color::category::gray_float > {
8085 	typedef ::color::category::cmyk_float akin_type;
8086 };
8087 template< >struct cmyk< ::color::category::gray_double > {
8088 	typedef ::color::category::cmyk_double akin_type;
8089 };
8090 template< >struct cmyk< ::color::category::gray_ldouble > {
8091 	typedef ::color::category::cmyk_ldouble akin_type;
8092 };
8093 
8094 }
8095 }
8096 
8097 namespace color {
8098 namespace akin {
8099 
8100 template< >struct cmyk< ::color::category::cmy_uint8 > {
8101 	typedef ::color::category::cmyk_uint8 akin_type;
8102 };
8103 template< >struct cmyk< ::color::category::cmy_uint16 > {
8104 	typedef ::color::category::cmyk_uint16 akin_type;
8105 };
8106 template< >struct cmyk< ::color::category::cmy_uint32 > {
8107 	typedef ::color::category::cmyk_uint32 akin_type;
8108 };
8109 template< >struct cmyk< ::color::category::cmy_uint64 > {
8110 	typedef ::color::category::cmyk_uint64 akin_type;
8111 };
8112 template< >struct cmyk< ::color::category::cmy_float > {
8113 	typedef ::color::category::cmyk_float akin_type;
8114 };
8115 template< >struct cmyk< ::color::category::cmy_double > {
8116 	typedef ::color::category::cmyk_double akin_type;
8117 };
8118 template< >struct cmyk< ::color::category::cmy_ldouble > {
8119 	typedef ::color::category::cmyk_ldouble akin_type;
8120 };
8121 
8122 }
8123 }
8124 
8125 namespace color {
8126 namespace akin {
8127 
8128 template< typename tag_name >
8129 struct cmyk< ::color::category::cmyk< tag_name > > {
8130 public:
8131 	typedef ::color::category::cmyk< tag_name > akin_type;
8132 };
8133 
8134 }
8135 }
8136 
8137 namespace color {
8138 namespace akin {
8139 
8140 template< >struct cmyk< ::color::category::hsl_uint8 > {
8141 	typedef ::color::category::cmyk_uint8 akin_type;
8142 };
8143 template< >struct cmyk< ::color::category::hsl_uint16 > {
8144 	typedef ::color::category::cmyk_uint16 akin_type;
8145 };
8146 template< >struct cmyk< ::color::category::hsl_uint32 > {
8147 	typedef ::color::category::cmyk_uint32 akin_type;
8148 };
8149 template< >struct cmyk< ::color::category::hsl_uint64 > {
8150 	typedef ::color::category::cmyk_uint64 akin_type;
8151 };
8152 template< >struct cmyk< ::color::category::hsl_float > {
8153 	typedef ::color::category::cmyk_float akin_type;
8154 };
8155 template< >struct cmyk< ::color::category::hsl_double > {
8156 	typedef ::color::category::cmyk_double akin_type;
8157 };
8158 template< >struct cmyk< ::color::category::hsl_ldouble > {
8159 	typedef ::color::category::cmyk_ldouble akin_type;
8160 };
8161 
8162 }
8163 }
8164 
8165 namespace color {
8166 namespace akin {
8167 
8168 template< >struct cmyk< ::color::category::hsv_uint8 > {
8169 	typedef ::color::category::cmyk_uint8 akin_type;
8170 };
8171 template< >struct cmyk< ::color::category::hsv_uint16 > {
8172 	typedef ::color::category::cmyk_uint16 akin_type;
8173 };
8174 template< >struct cmyk< ::color::category::hsv_uint32 > {
8175 	typedef ::color::category::cmyk_uint32 akin_type;
8176 };
8177 template< >struct cmyk< ::color::category::hsv_uint64 > {
8178 	typedef ::color::category::cmyk_uint64 akin_type;
8179 };
8180 template< >struct cmyk< ::color::category::hsv_float > {
8181 	typedef ::color::category::cmyk_float akin_type;
8182 };
8183 template< >struct cmyk< ::color::category::hsv_double > {
8184 	typedef ::color::category::cmyk_double akin_type;
8185 };
8186 template< >struct cmyk< ::color::category::hsv_ldouble > {
8187 	typedef ::color::category::cmyk_ldouble akin_type;
8188 };
8189 
8190 }
8191 }
8192 
8193 namespace color {
8194 namespace akin {
8195 
8196 template< >struct cmyk< ::color::category::hsi_uint8 > {
8197 	typedef ::color::category::cmyk_uint8 akin_type;
8198 };
8199 template< >struct cmyk< ::color::category::hsi_uint16 > {
8200 	typedef ::color::category::cmyk_uint16 akin_type;
8201 };
8202 template< >struct cmyk< ::color::category::hsi_uint32 > {
8203 	typedef ::color::category::cmyk_uint32 akin_type;
8204 };
8205 template< >struct cmyk< ::color::category::hsi_uint64 > {
8206 	typedef ::color::category::cmyk_uint64 akin_type;
8207 };
8208 template< >struct cmyk< ::color::category::hsi_float > {
8209 	typedef ::color::category::cmyk_float akin_type;
8210 };
8211 template< >struct cmyk< ::color::category::hsi_double > {
8212 	typedef ::color::category::cmyk_double akin_type;
8213 };
8214 template< >struct cmyk< ::color::category::hsi_ldouble > {
8215 	typedef ::color::category::cmyk_ldouble akin_type;
8216 };
8217 
8218 }
8219 }
8220 
8221 namespace color {
8222 namespace akin {
8223 
8224 template
8225 <
8226 	typename tag_name
8227 
8228 	>
8229 struct cmyk< ::color::category::hwb< tag_name > > {
8230 public:
8231 	typedef ::color::category::cmyk< tag_name > akin_type;
8232 };
8233 
8234 }
8235 }
8236 
8237 namespace color {
8238 namespace akin {
8239 
8240 template< >struct cmyk< ::color::category::rgb_uint8 > {
8241 	typedef ::color::category::cmyk_uint8 akin_type;
8242 };
8243 template< >struct cmyk< ::color::category::rgb_uint16 > {
8244 	typedef ::color::category::cmyk_uint16 akin_type;
8245 };
8246 template< >struct cmyk< ::color::category::rgb_uint32 > {
8247 	typedef ::color::category::cmyk_uint32 akin_type;
8248 };
8249 template< >struct cmyk< ::color::category::rgb_uint64 > {
8250 	typedef ::color::category::cmyk_uint64 akin_type;
8251 };
8252 template< >struct cmyk< ::color::category::rgb_float > {
8253 	typedef ::color::category::cmyk_float akin_type;
8254 };
8255 template< >struct cmyk< ::color::category::rgb_double > {
8256 	typedef ::color::category::cmyk_double akin_type;
8257 };
8258 template< >struct cmyk< ::color::category::rgb_ldouble > {
8259 	typedef ::color::category::cmyk_ldouble akin_type;
8260 };
8261 
8262 }
8263 }
8264 
8265 namespace color {
8266 namespace akin {
8267 
8268 template< >struct cmyk< ::color::category::yiq_uint8 > {
8269 	typedef ::color::category::cmyk_uint8 akin_type;
8270 };
8271 template< >struct cmyk< ::color::category::yiq_uint16 > {
8272 	typedef ::color::category::cmyk_uint16 akin_type;
8273 };
8274 template< >struct cmyk< ::color::category::yiq_uint32 > {
8275 	typedef ::color::category::cmyk_uint32 akin_type;
8276 };
8277 template< >struct cmyk< ::color::category::yiq_uint64 > {
8278 	typedef ::color::category::cmyk_uint64 akin_type;
8279 };
8280 template< >struct cmyk< ::color::category::yiq_float > {
8281 	typedef ::color::category::cmyk_float akin_type;
8282 };
8283 template< >struct cmyk< ::color::category::yiq_double > {
8284 	typedef ::color::category::cmyk_double akin_type;
8285 };
8286 template< >struct cmyk< ::color::category::yiq_ldouble > {
8287 	typedef ::color::category::cmyk_ldouble akin_type;
8288 };
8289 
8290 }
8291 }
8292 
8293 namespace color {
8294 namespace akin {
8295 
8296 template< ::color::constant::yuv::reference_enum reference_number >struct cmyk< ::color::category::yuv_uint8 < reference_number > > {
8297 	typedef ::color::category::cmyk_uint8 akin_type;
8298 };
8299 template< ::color::constant::yuv::reference_enum reference_number >struct cmyk< ::color::category::yuv_uint16 < reference_number > > {
8300 	typedef ::color::category::cmyk_uint16 akin_type;
8301 };
8302 template< ::color::constant::yuv::reference_enum reference_number >struct cmyk< ::color::category::yuv_uint32 < reference_number > > {
8303 	typedef ::color::category::cmyk_uint32 akin_type;
8304 };
8305 template< ::color::constant::yuv::reference_enum reference_number >struct cmyk< ::color::category::yuv_uint64 < reference_number > > {
8306 	typedef ::color::category::cmyk_uint64 akin_type;
8307 };
8308 template< ::color::constant::yuv::reference_enum reference_number >struct cmyk< ::color::category::yuv_float < reference_number > > {
8309 	typedef ::color::category::cmyk_float akin_type;
8310 };
8311 template< ::color::constant::yuv::reference_enum reference_number >struct cmyk< ::color::category::yuv_double < reference_number > > {
8312 	typedef ::color::category::cmyk_double akin_type;
8313 };
8314 template< ::color::constant::yuv::reference_enum reference_number >struct cmyk< ::color::category::yuv_ldouble< reference_number > > {
8315 	typedef ::color::category::cmyk_ldouble akin_type;
8316 };
8317 
8318 }
8319 }
8320 
8321 namespace color {
8322 namespace akin {
8323 
8324 template< >struct cmyk< ::color::category::YCgCo_uint8 > {
8325 	typedef ::color::category::cmyk_uint8 akin_type;
8326 };
8327 template< >struct cmyk< ::color::category::YCgCo_uint16 > {
8328 	typedef ::color::category::cmyk_uint16 akin_type;
8329 };
8330 template< >struct cmyk< ::color::category::YCgCo_uint32 > {
8331 	typedef ::color::category::cmyk_uint32 akin_type;
8332 };
8333 template< >struct cmyk< ::color::category::YCgCo_uint64 > {
8334 	typedef ::color::category::cmyk_uint64 akin_type;
8335 };
8336 template< >struct cmyk< ::color::category::YCgCo_float > {
8337 	typedef ::color::category::cmyk_float akin_type;
8338 };
8339 template< >struct cmyk< ::color::category::YCgCo_double > {
8340 	typedef ::color::category::cmyk_double akin_type;
8341 };
8342 template< >struct cmyk< ::color::category::YCgCo_ldouble > {
8343 	typedef ::color::category::cmyk_ldouble akin_type;
8344 };
8345 
8346 }
8347 }
8348 
8349 namespace color {
8350 namespace akin {
8351 
8352 template< >struct cmyk< ::color::category::YDbDr_uint8 > {
8353 	typedef ::color::category::cmyk_uint8 akin_type;
8354 };
8355 template< >struct cmyk< ::color::category::YDbDr_uint16 > {
8356 	typedef ::color::category::cmyk_uint16 akin_type;
8357 };
8358 template< >struct cmyk< ::color::category::YDbDr_uint32 > {
8359 	typedef ::color::category::cmyk_uint32 akin_type;
8360 };
8361 template< >struct cmyk< ::color::category::YDbDr_uint64 > {
8362 	typedef ::color::category::cmyk_uint64 akin_type;
8363 };
8364 template< >struct cmyk< ::color::category::YDbDr_float > {
8365 	typedef ::color::category::cmyk_float akin_type;
8366 };
8367 template< >struct cmyk< ::color::category::YDbDr_double > {
8368 	typedef ::color::category::cmyk_double akin_type;
8369 };
8370 template< >struct cmyk< ::color::category::YDbDr_ldouble > {
8371 	typedef ::color::category::cmyk_ldouble akin_type;
8372 };
8373 
8374 }
8375 }
8376 
8377 namespace color {
8378 namespace akin {
8379 
8380 template< ::color::constant::YPbPr::reference_enum reference_number >struct cmyk< ::color::category::YPbPr_uint8 <reference_number> > {
8381 	typedef ::color::category::cmyk_uint8 akin_type;
8382 };
8383 template< ::color::constant::YPbPr::reference_enum reference_number >struct cmyk< ::color::category::YPbPr_uint16 <reference_number> > {
8384 	typedef ::color::category::cmyk_uint16 akin_type;
8385 };
8386 template< ::color::constant::YPbPr::reference_enum reference_number >struct cmyk< ::color::category::YPbPr_uint32 <reference_number> > {
8387 	typedef ::color::category::cmyk_uint32 akin_type;
8388 };
8389 template< ::color::constant::YPbPr::reference_enum reference_number >struct cmyk< ::color::category::YPbPr_uint64 <reference_number> > {
8390 	typedef ::color::category::cmyk_uint64 akin_type;
8391 };
8392 template< ::color::constant::YPbPr::reference_enum reference_number >struct cmyk< ::color::category::YPbPr_float <reference_number> > {
8393 	typedef ::color::category::cmyk_float akin_type;
8394 };
8395 template< ::color::constant::YPbPr::reference_enum reference_number >struct cmyk< ::color::category::YPbPr_double <reference_number> > {
8396 	typedef ::color::category::cmyk_double akin_type;
8397 };
8398 template< ::color::constant::YPbPr::reference_enum reference_number >struct cmyk< ::color::category::YPbPr_ldouble<reference_number> > {
8399 	typedef ::color::category::cmyk_ldouble akin_type;
8400 };
8401 
8402 }
8403 }
8404 
8405 namespace color {
8406 namespace akin {
8407 
8408 template< >struct cmyk< ::color::category::xyz_uint8 > {
8409 	typedef ::color::category::cmyk_uint8 akin_type;
8410 };
8411 template< >struct cmyk< ::color::category::xyz_uint16 > {
8412 	typedef ::color::category::cmyk_uint16 akin_type;
8413 };
8414 template< >struct cmyk< ::color::category::xyz_uint32 > {
8415 	typedef ::color::category::cmyk_uint32 akin_type;
8416 };
8417 template< >struct cmyk< ::color::category::xyz_uint64 > {
8418 	typedef ::color::category::cmyk_uint64 akin_type;
8419 };
8420 template< >struct cmyk< ::color::category::xyz_float > {
8421 	typedef ::color::category::cmyk_float akin_type;
8422 };
8423 template< >struct cmyk< ::color::category::xyz_double > {
8424 	typedef ::color::category::cmyk_double akin_type;
8425 };
8426 template< >struct cmyk< ::color::category::xyz_ldouble > {
8427 	typedef ::color::category::cmyk_ldouble akin_type;
8428 };
8429 
8430 }
8431 }
8432 
8433 namespace color {
8434 namespace akin {
8435 
8436 template
8437 <
8438 	typename tag_name, ::color::constant::lab::reference_enum lab_reference_number
8439 	>
8440 struct cmyk< ::color::category::lab< tag_name, lab_reference_number > > {
8441 public:
8442 	typedef ::color::category::cmyk< tag_name > akin_type;
8443 };
8444 
8445 }
8446 }
8447 
8448 namespace color {
8449 namespace akin {
8450 
8451 template< >struct cmyk< ::color::category::xyy_uint8 > {
8452 	typedef ::color::category::cmyk_uint8 akin_type;
8453 };
8454 template< >struct cmyk< ::color::category::xyy_uint16 > {
8455 	typedef ::color::category::cmyk_uint16 akin_type;
8456 };
8457 template< >struct cmyk< ::color::category::xyy_uint32 > {
8458 	typedef ::color::category::cmyk_uint32 akin_type;
8459 };
8460 template< >struct cmyk< ::color::category::xyy_uint64 > {
8461 	typedef ::color::category::cmyk_uint64 akin_type;
8462 };
8463 template< >struct cmyk< ::color::category::xyy_float > {
8464 	typedef ::color::category::cmyk_float akin_type;
8465 };
8466 template< >struct cmyk< ::color::category::xyy_double > {
8467 	typedef ::color::category::cmyk_double akin_type;
8468 };
8469 template< >struct cmyk< ::color::category::xyy_ldouble > {
8470 	typedef ::color::category::cmyk_ldouble akin_type;
8471 };
8472 
8473 }
8474 }
8475 
8476 namespace color {
8477 namespace akin {
8478 
8479 template
8480 <
8481 	typename tag_name
8482 	,::color::constant::lms::reference_enum reference_number
8483 
8484 	>
8485 struct cmyk< ::color::category::lms< tag_name, reference_number > > {
8486 public:
8487 	typedef ::color::category::cmyk< tag_name > akin_type;
8488 };
8489 
8490 }
8491 }
8492 
8493 namespace color {
8494 namespace akin {
8495 
8496 template< >struct cmyk< ::color::category::luv_uint8 > {
8497 	typedef ::color::category::cmyk_uint8 akin_type;
8498 };
8499 template< >struct cmyk< ::color::category::luv_uint16 > {
8500 	typedef ::color::category::cmyk_uint16 akin_type;
8501 };
8502 template< >struct cmyk< ::color::category::luv_uint32 > {
8503 	typedef ::color::category::cmyk_uint32 akin_type;
8504 };
8505 template< >struct cmyk< ::color::category::luv_uint64 > {
8506 	typedef ::color::category::cmyk_uint64 akin_type;
8507 };
8508 template< >struct cmyk< ::color::category::luv_float > {
8509 	typedef ::color::category::cmyk_float akin_type;
8510 };
8511 template< >struct cmyk< ::color::category::luv_double > {
8512 	typedef ::color::category::cmyk_double akin_type;
8513 };
8514 template< >struct cmyk< ::color::category::luv_ldouble > {
8515 	typedef ::color::category::cmyk_ldouble akin_type;
8516 };
8517 
8518 }
8519 }
8520 
8521 namespace color {
8522 namespace akin {
8523 
8524 template< >struct cmyk< ::color::category::LabCH_uint8 > {
8525 	typedef ::color::category::cmyk_uint8 akin_type;
8526 };
8527 template< >struct cmyk< ::color::category::LabCH_uint16 > {
8528 	typedef ::color::category::cmyk_uint16 akin_type;
8529 };
8530 template< >struct cmyk< ::color::category::LabCH_uint32 > {
8531 	typedef ::color::category::cmyk_uint32 akin_type;
8532 };
8533 template< >struct cmyk< ::color::category::LabCH_uint64 > {
8534 	typedef ::color::category::cmyk_uint64 akin_type;
8535 };
8536 template< >struct cmyk< ::color::category::LabCH_float > {
8537 	typedef ::color::category::cmyk_float akin_type;
8538 };
8539 template< >struct cmyk< ::color::category::LabCH_double > {
8540 	typedef ::color::category::cmyk_double akin_type;
8541 };
8542 template< >struct cmyk< ::color::category::LabCH_ldouble > {
8543 	typedef ::color::category::cmyk_ldouble akin_type;
8544 };
8545 
8546 }
8547 }
8548 
8549 namespace color {
8550 namespace akin {
8551 
8552 template< typename tag_name >
8553 struct cmyk< ::color::category::LuvCH< tag_name > > {
8554 public:
8555 	typedef ::color::category::cmyk< tag_name > akin_type;
8556 };
8557 
8558 }
8559 }
8560 
8561 namespace color {
8562 namespace trait {
8563 
8564 template <> struct info< ::color::category::cmyk_uint8 > {
8565 public:
8566 	enum { implemented_entity = true };
8567 	enum { meaningful_entity = true };
8568 };
8569 template <> struct info< ::color::category::cmyk_uint16 > {
8570 public:
8571 	enum { implemented_entity = true };
8572 	enum { meaningful_entity = true };
8573 };
8574 template <> struct info< ::color::category::cmyk_uint32 > {
8575 public:
8576 	enum { implemented_entity = true };
8577 	enum { meaningful_entity = true };
8578 };
8579 template <> struct info< ::color::category::cmyk_uint64 > {
8580 public:
8581 	enum { implemented_entity = true };
8582 	enum { meaningful_entity = true };
8583 };
8584 template <> struct info< ::color::category::cmyk_float > {
8585 public:
8586 	enum { implemented_entity = true };
8587 	enum { meaningful_entity = true };
8588 };
8589 template <> struct info< ::color::category::cmyk_double > {
8590 public:
8591 	enum { implemented_entity = true };
8592 	enum { meaningful_entity = true };
8593 };
8594 template <> struct info< ::color::category::cmyk_ldouble > {
8595 public:
8596 	enum { implemented_entity = true };
8597 	enum { meaningful_entity = true };
8598 };
8599 
8600 }
8601 }
8602 
8603 namespace color {
8604 namespace trait {
8605 
8606 template< >
8607 struct bound< ::color::category::cmyk_float >
8608 	: public ::color::_internal::utility::bound::general< float, typename ::color::trait::index< ::color::category::cmyk_float >::instance_type > {
8609 };
8610 
8611 template< >
8612 struct bound< ::color::category::cmyk_double >
8613 	: public ::color::_internal::utility::bound::general< double, typename ::color::trait::index< ::color::category::cmyk_double >::instance_type > {
8614 };
8615 
8616 template< >
8617 struct bound< ::color::category::cmyk_ldouble >
8618 	: public ::color::_internal::utility::bound::general< long double, typename ::color::trait::index< ::color::category::cmyk_ldouble >::instance_type > {
8619 };
8620 
8621 }
8622 }
8623 
8624 namespace color {
8625 namespace trait {
8626 
8627 template< >
8628 struct bound< ::color::category::cmyk_uint8 >
8629 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::cmyk_uint8 >::instance_type > {
8630 };
8631 
8632 template< >
8633 struct bound< ::color::category::cmyk_uint16 >
8634 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::cmyk_uint16 >::instance_type > {
8635 };
8636 
8637 template< >
8638 struct bound< ::color::category::cmyk_uint32 >
8639 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::cmyk_uint32 >::instance_type > {
8640 };
8641 
8642 template< >
8643 struct bound< ::color::category::cmyk_uint64 >
8644 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::cmyk_uint64 >::instance_type > {
8645 };
8646 
8647 }
8648 }
8649 
8650 namespace color {
8651 namespace trait {
8652 
8653 template< >
8654 struct component< ::color::category::cmyk_float >
8655 	: public ::color::_internal::utility::component::array< float > {
8656 };
8657 
8658 template< >
8659 struct component< ::color::category::cmyk_double >
8660 	: public ::color::_internal::utility::component::array< double > {
8661 };
8662 
8663 template< >
8664 struct component< ::color::category::cmyk_ldouble >
8665 	: public ::color::_internal::utility::component::array< long double > {
8666 };
8667 
8668 }
8669 }
8670 
8671 namespace color {
8672 namespace trait {
8673 
8674 template< >
8675 struct component< ::color::category::cmyk_uint8 >
8676 	: public ::color::_internal::utility::component::array< std::uint8_t > {
8677 };
8678 
8679 template< >
8680 struct component< ::color::category::cmyk_uint16 >
8681 	: public ::color::_internal::utility::component::array< std::uint16_t > {
8682 };
8683 
8684 template< >
8685 struct component< ::color::category::cmyk_uint32 >
8686 	: public ::color::_internal::utility::component::array< std::uint32_t > {
8687 };
8688 
8689 template< >
8690 struct component< ::color::category::cmyk_uint64 >
8691 	: public ::color::_internal::utility::component::array< std::uint64_t > {
8692 };
8693 
8694 }
8695 }
8696 
8697 namespace color {
8698 namespace trait {
8699 
8700 template< >
8701 struct container< ::color::category::cmyk_float >
8702 	: public ::color::_internal::utility::container::array< float, 4 > {
8703 };
8704 
8705 template< >
8706 struct container< ::color::category::cmyk_double >
8707 	: public ::color::_internal::utility::container::array< double, 4 > {
8708 };
8709 
8710 template< >
8711 struct container< ::color::category::cmyk_ldouble >
8712 	: public ::color::_internal::utility::container::array< long double, 4 > {
8713 };
8714 
8715 }
8716 }
8717 
8718 namespace color {
8719 namespace trait {
8720 
8721 template< >
8722 struct container< ::color::category::cmyk_uint8 >
8723 	: public ::color::_internal::utility::container::array< std::uint8_t, 4 > {
8724 };
8725 
8726 template< >
8727 struct container< ::color::category::cmyk_uint16 >
8728 	: public ::color::_internal::utility::container::array< std::uint16_t, 4 > {
8729 };
8730 
8731 template< >
8732 struct container< ::color::category::cmyk_uint32 >
8733 	: public ::color::_internal::utility::container::array< std::uint32_t, 4 > {
8734 };
8735 
8736 template< >
8737 struct container< ::color::category::cmyk_uint64 >
8738 	: public ::color::_internal::utility::container::array< std::uint64_t, 4 > {
8739 };
8740 
8741 }
8742 }
8743 
8744 namespace color {
8745 
8746 template< typename type_name >
8747 using cmyk = ::color::model< ::color::category::cmyk< type_name > >;
8748 
8749 }
8750 
8751 namespace color {
8752 namespace place {
8753 namespace _internal {
8754 
8755 template< typename tag_name >
8756 struct cyan< ::color::category::cmyk< tag_name > > {
8757 public:
8758 	typedef ::color::category::cmyk< tag_name > category_type;
8759 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
8760 
8761 	enum { position_enum = 0 };
8762 	enum { has_enum = true };
8763 
positioncolor::place::_internal::cyan8764 	static index_instance_type position() {
8765 		return position_enum;
8766 	}
8767 };
8768 
8769 }
8770 }
8771 }
8772 
8773 namespace color {
8774 namespace place {
8775 namespace _internal {
8776 
8777 template< typename tag_name >
8778 struct magenta< ::color::category::cmyk< tag_name > > {
8779 public:
8780 	typedef ::color::category::cmyk< tag_name > category_type;
8781 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
8782 
8783 	enum { position_enum = 1 };
8784 	enum { has_enum = true };
8785 
positioncolor::place::_internal::magenta8786 	static index_instance_type position() {
8787 		return position_enum;
8788 	}
8789 };
8790 
8791 }
8792 }
8793 }
8794 
8795 namespace color {
8796 namespace place {
8797 namespace _internal {
8798 
8799 template< typename tag_name >
8800 struct yellow< ::color::category::cmyk< tag_name > > {
8801 public:
8802 	typedef ::color::category::cmyk< tag_name > category_type;
8803 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
8804 
8805 	enum { position_enum = 2 };
8806 	enum { has_enum = true };
8807 
positioncolor::place::_internal::yellow8808 	static index_instance_type position() {
8809 		return position_enum;
8810 	}
8811 };
8812 
8813 }
8814 }
8815 }
8816 
8817 namespace color {
8818 namespace place {
8819 namespace _internal {
8820 
8821 template< typename tag_name >
8822 struct key< ::color::category::cmyk< tag_name > > {
8823 public:
8824 	typedef ::color::category::cmyk< tag_name > category_type;
8825 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
8826 
8827 	enum { position_enum = 3 };
8828 	enum { has_enum = true };
8829 
positioncolor::place::_internal::key8830 	static index_instance_type position() {
8831 		return position_enum;
8832 	}
8833 };
8834 
8835 }
8836 }
8837 }
8838 
8839 namespace color {
8840 namespace place {
8841 namespace _internal {
8842 
8843 template< typename tag_name >
8844 struct black< ::color::category::cmyk< tag_name > > {
8845 public:
8846 	typedef ::color::category::cmyk< tag_name > category_type;
8847 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
8848 
8849 	enum { position_enum = 3 };
8850 	enum { has_enum = true };
8851 
positioncolor::place::_internal::black8852 	static index_instance_type position() {
8853 		return position_enum;
8854 	}
8855 };
8856 
8857 }
8858 }
8859 }
8860 
8861 namespace color {
8862 namespace check {
8863 namespace _internal {
8864 namespace _privateCMYK {
8865 
8866 template< typename category_name >
8867 struct integrity {
8868 public:
8869 	typedef category_name category_type;
8870 
8871 	typedef ::color::model<category_type> model_type;
8872 	typedef ::color::trait::bound< category_type > bound_type;
8873 	typedef ::color::trait::scalar< category_type > scalar_trait_type;
8874 
8875 	enum {
8876 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
8877 		,magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
8878 		, yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
8879 		, key_p = ::color::place::_internal::key<category_type>::position_enum
8880 	};
8881 
processcolor::check::_internal::_privateCMYK::integrity8882 	static bool process(model_type const& m) {
8883 		if(m.template get<key_p>() == bound_type::template maximum<key_p>()) {
8884 			return false;
8885 		}
8886 		if(m.template get< cyan_p>() == bound_type::template minimum< cyan_p>()) {
8887 			return true;
8888 		}
8889 		if(m.template get<magenta_p>() == bound_type::template minimum<magenta_p>()) {
8890 			return true;
8891 		}
8892 		if(m.template get< yellow_p>() == bound_type::template minimum< yellow_p>()) {
8893 			return true;
8894 		}
8895 		return false;
8896 	}
8897 };
8898 
8899 }
8900 
8901 template< > struct integrity< ::color::category::cmyk_uint8 > : public ::color::check::_internal::_privateCMYK::integrity< ::color::category::cmyk_uint8 > { };
8902 template< > struct integrity< ::color::category::cmyk_uint16 > : public ::color::check::_internal::_privateCMYK::integrity< ::color::category::cmyk_uint16 > { };
8903 template< > struct integrity< ::color::category::cmyk_uint32 > : public ::color::check::_internal::_privateCMYK::integrity< ::color::category::cmyk_uint32 > { };
8904 template< > struct integrity< ::color::category::cmyk_uint64 > : public ::color::check::_internal::_privateCMYK::integrity< ::color::category::cmyk_uint64 > { };
8905 
8906 template<>
8907 struct integrity< ::color::category::cmyk_float > {
8908 public:
8909 	typedef ::color::category::cmyk_float category_type;
8910 
8911 	typedef ::color::model<category_type> model_type;
8912 	typedef ::color::trait::bound< category_type > bound_type;
8913 	typedef ::color::trait::scalar< category_type > scalar_trait_type;
8914 
8915 	enum {
8916 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
8917 		,magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
8918 		, yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
8919 		, key_p = ::color::place::_internal::key<category_type>::position_enum
8920 	};
8921 
processcolor::check::_internal::integrity8922 	static bool process(model_type const& m) {
8923 		if(m.template get<key_p>() == bound_type::template maximum<key_p>()) {
8924 			return false;
8925 		}
8926 		if(true == scalar_trait_type::is_small(m.template get< cyan_p>() - bound_type::template minimum< cyan_p>())) {
8927 			return true;
8928 		}
8929 		if(true == scalar_trait_type::is_small(m.template get<magenta_p>() - bound_type::template minimum<magenta_p>())) {
8930 			return true;
8931 		}
8932 		if(true == scalar_trait_type::is_small(m.template get< key_p>() - bound_type::template minimum< key_p>())) {
8933 			return true;
8934 		}
8935 		return false;
8936 	}
8937 };
8938 
8939 template<>
8940 struct integrity< ::color::category::cmyk_double > {
8941 public:
8942 	typedef ::color::category::cmyk_double category_type;
8943 
8944 	typedef ::color::model<category_type> model_type;
8945 	typedef ::color::trait::bound< category_type > bound_type;
8946 	typedef ::color::trait::scalar< category_type > scalar_trait_type;
8947 
8948 	enum {
8949 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
8950 		,magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
8951 		, yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
8952 		, key_p = ::color::place::_internal::key<category_type>::position_enum
8953 	};
8954 
processcolor::check::_internal::integrity8955 	static bool process(model_type const& m) {
8956 		if(m.template get<key_p>() == bound_type::template maximum<key_p>()) {
8957 			return false;
8958 		}
8959 		if(true == scalar_trait_type::is_small(m.template get< cyan_p>() - bound_type::template minimum< cyan_p>())) {
8960 			return true;
8961 		}
8962 		if(true == scalar_trait_type::is_small(m.template get<magenta_p>() - bound_type::template minimum<magenta_p>())) {
8963 			return true;
8964 		}
8965 		if(true == scalar_trait_type::is_small(m.template get< yellow_p>() - bound_type::template minimum< yellow_p>())) {
8966 			return true;
8967 		}
8968 		return false;
8969 	}
8970 };
8971 
8972 template<>
8973 struct integrity< ::color::category::cmyk_ldouble > {
8974 public:
8975 	typedef ::color::category::cmyk_ldouble category_type;
8976 
8977 	typedef ::color::model<category_type> model_type;
8978 	typedef ::color::trait::bound< category_type > bound_type;
8979 	typedef ::color::trait::scalar< category_type > scalar_trait_type;
8980 
8981 	enum {
8982 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
8983 		,magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
8984 		, yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
8985 		, key_p = ::color::place::_internal::key<category_type>::position_enum
8986 	};
8987 
processcolor::check::_internal::integrity8988 	static bool process(model_type const& m) {
8989 		if(m.template get<key_p>() == bound_type::template maximum<key_p>()) {
8990 			return false;
8991 		}
8992 		if(true == scalar_trait_type::is_small(m.template get< cyan_p>() - bound_type::template minimum< cyan_p>())) {
8993 			return true;
8994 		}
8995 		if(true == scalar_trait_type::is_small(m.template get<magenta_p>() - bound_type::template minimum<magenta_p>())) {
8996 			return true;
8997 		}
8998 		if(true == scalar_trait_type::is_small(m.template get< yellow_p>() - bound_type::template minimum< yellow_p>())) {
8999 			return true;
9000 		}
9001 		return false;
9002 	}
9003 };
9004 
9005 }
9006 }
9007 }
9008 
9009 namespace color {
9010 namespace operation {
9011 
9012 template
9013 <
9014 	typename category_name
9015 	>
9016 inline
9017 typename ::color::trait::component< category_name >::component_return_type
diverse(typename::color::trait::scalar<category_name>::instance_type const & scalar,typename::color::trait::index<category_name>::index_input_const_type index)9018 diverse
9019 (
9020 	typename ::color::trait::scalar<category_name>::instance_type const& scalar
9021 	,typename ::color::trait::index<category_name>::index_input_const_type index
9022 ) {
9023 	return ::color::_internal::diverse< category_name >::process(scalar, index);
9024 }
9025 
9026 template
9027 <
9028 	typename category_name
9029 	,typename ::color::trait::index< category_name >::index_instance_type index
9030 	>
9031 inline
9032 typename ::color::trait::component< category_name >::component_return_type
diverse(typename::color::trait::scalar<category_name>::instance_type const & scalar)9033 diverse(typename ::color::trait::scalar<category_name>::instance_type const& scalar) {
9034 	return ::color::_internal::diverse< category_name >::template process< index > (scalar);
9035 }
9036 
9037 }
9038 }
9039 
9040 namespace color {
9041 namespace operation {
9042 template< typename category_name >
9043 inline
9044 typename ::color::trait::scalar< category_name >::instance_type
normalize(::color::model<category_name> const & m,typename::color::trait::index<category_name>::model_type index)9045 normalize
9046 (
9047 	::color::model<category_name> const& m
9048 	,typename ::color::trait::index<category_name>::model_type index
9049 ) {
9050 	return ::color::_internal::normalize<category_name>::process(m.get(index), index) ;
9051 }
9052 
9053 template
9054 <
9055 	unsigned index_size
9056 	,typename category_name
9057 	>
9058 inline
9059 typename ::color::trait::scalar< category_name >::instance_type
normalize(::color::model<category_name> const & m)9060 normalize
9061 (
9062 	::color::model<category_name> const& m
9063 ) {
9064 	return ::color::_internal::normalize<category_name>::template process<index_size>(m.template get<index_size>());
9065 }
9066 
9067 }
9068 }
9069 
9070 namespace color {
9071 namespace fix {
9072 namespace _internal {
9073 
9074 template< typename tag_name >
9075 struct unique< ::color::category::cmyk< tag_name > > {
9076 public:
9077 	typedef ::color::category::cmyk< tag_name > category_type;
9078 
9079 	typedef ::color::model<category_type> model_type;
9080 	typedef ::color::trait::bound<category_type> bound_type;
9081 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
9082 	typedef ::color::_internal::diverse< category_type > diverse_type;
9083 	typedef ::color::_internal::normalize< category_type > normalize_type;
9084 
9085 	enum {
9086 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
9087 		,magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
9088 		, yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
9089 		, key_p = ::color::place::_internal::key<category_type>::position_enum
9090 	};
9091 
processcolor::fix::_internal::unique9092 	static void process(model_type &result) {
9093 		if(result.template get<key_p>() == bound_type::template maximum<key_p>()) {
9094 			result.template set<cyan_p>(bound_type::template minimum<cyan_p>());
9095 			result.template set<magenta_p>(bound_type::template minimum<magenta_p>());
9096 			result.template set<yellow_p>(bound_type::template minimum<yellow_p>());
9097 			return ;
9098 		}
9099 		if(result.template get<cyan_p>() == bound_type::template minimum<cyan_p>()) {
9100 			return;
9101 		}
9102 		if(result.template get<magenta_p>() == bound_type::template minimum<magenta_p>()) {
9103 			return;
9104 		}
9105 		if(result.template get<yellow_p>() == bound_type::template minimum<yellow_p>()) {
9106 			return;
9107 		}
9108 		scalar_type cyan = normalize_type::template process<cyan_p>(result.template get<cyan_p>());
9109 		scalar_type key = normalize_type::template process<key_p>(result.template get<key_p>());
9110 		result.template set<cyan_p>(bound_type::template minimum<cyan_p>());
9111 		result.template set<magenta_p>(bound_type::template minimum<magenta_p>());
9112 		result.template set<yellow_p>(bound_type::template minimum<yellow_p>());
9113 		result.template set<key_p>(diverse_type::template process<key_p>((1- (1- cyan)*(1-key))));
9114 	}
9115 
processcolor::fix::_internal::unique9116 	static void process(model_type &result, model_type const& right) {
9117 		if(result.template get<key_p>() == bound_type::template maximum<key_p>()) {
9118 			result.template set<cyan_p>(bound_type::template minimum<cyan_p>());
9119 			result.template set<magenta_p>(bound_type::template minimum<magenta_p>());
9120 			result.template set<yellow_p>(bound_type::template minimum<yellow_p>());
9121 			result.template set<key_p>(bound_type::template maximum<key_p>());
9122 			return ;
9123 		}
9124 		result = right;
9125 		if(result.template get<cyan_p>() == bound_type::template minimum<cyan_p>()) {
9126 			return;
9127 		}
9128 		if(result.template get<magenta_p>() == bound_type::template minimum<magenta_p>()) {
9129 			return;
9130 		}
9131 		if(result.template get<yellow_p>() == bound_type::template minimum<yellow_p>()) {
9132 			return;
9133 		}
9134 		scalar_type cyan = normalize_type::template process<cyan_p>(result.template get<cyan_p>());
9135 		scalar_type key = normalize_type::template process<key_p>(result.template get<key_p>());
9136 		result.template set<cyan_p>(bound_type::template minimum<cyan_p>());
9137 		result.template set<magenta_p>(bound_type::template minimum<magenta_p>());
9138 		result.template set<yellow_p>(bound_type::template minimum<yellow_p>());
9139 		result.template set<key_p>(diverse_type::template process<key_p>((1- (1- cyan)*(1-key))));
9140 	}
9141 
9142 };
9143 
9144 }
9145 }
9146 }
9147 
9148 namespace color {
9149 namespace akin {
9150 
9151 template< >struct rgb< ::color::category::cmyk_uint8 > {
9152 	typedef ::color::category::rgb_uint8 akin_type;
9153 };
9154 template< >struct rgb< ::color::category::cmyk_uint16 > {
9155 	typedef ::color::category::rgb_uint16 akin_type;
9156 };
9157 template< >struct rgb< ::color::category::cmyk_uint32 > {
9158 	typedef ::color::category::rgb_uint32 akin_type;
9159 };
9160 template< >struct rgb< ::color::category::cmyk_uint64 > {
9161 	typedef ::color::category::rgb_uint64 akin_type;
9162 };
9163 template< >struct rgb< ::color::category::cmyk_float > {
9164 	typedef ::color::category::rgb_float akin_type;
9165 };
9166 template< >struct rgb< ::color::category::cmyk_double > {
9167 	typedef ::color::category::rgb_double akin_type;
9168 };
9169 template< >struct rgb< ::color::category::cmyk_ldouble > {
9170 	typedef ::color::category::rgb_ldouble akin_type;
9171 };
9172 
9173 }
9174 }
9175 
9176 namespace color {
9177 namespace get {
9178 
9179 template< typename tag_name >
9180 inline
9181 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::cmyk< tag_name > >::akin_type >::return_type
red(::color::model<::color::category::cmyk<tag_name>> const & color_parameter)9182 red(::color::model< ::color::category::cmyk< tag_name > > const& color_parameter) {
9183 	typedef ::color::category::cmyk< tag_name > category_type;
9184 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
9185 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
9186 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
9187 	enum { cyan_p = ::color::place::_internal::cyan< category_type >::position_enum };
9188 	enum { key_p = ::color::place::_internal::key< category_type >::position_enum };
9189 	typedef ::color::_internal::diverse< akin_type > diverse_type;
9190 	typedef ::color::_internal::normalize<category_type> normalize_type;
9191 	scalar_type c = normalize_type::template process< cyan_p >(color_parameter.template get< cyan_p >());
9192 	scalar_type k = normalize_type::template process< key_p >(color_parameter.template get< key_p >());
9193 	scalar_type r = (scalar_type(1)-c) * (scalar_type(1)-k);
9194 	return diverse_type::template process<red_p>(r);
9195 }
9196 
9197 }
9198 }
9199 
9200 namespace color {
9201 namespace get {
9202 
9203 template< typename tag_name >
9204 inline
9205 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::cmyk< tag_name > >::akin_type >::return_type
green(::color::model<::color::category::cmyk<tag_name>> const & color_parameter)9206 green(::color::model< ::color::category::cmyk< tag_name > > const& color_parameter) {
9207 	typedef ::color::category::cmyk< tag_name > category_type;
9208 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
9209 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
9210 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
9211 	enum { magenta_p = ::color::place::_internal::magenta< category_type >::position_enum };
9212 	enum { key_p = ::color::place::_internal::key< category_type >::position_enum };
9213 	typedef ::color::_internal::diverse< akin_type > diverse_type;
9214 	typedef ::color::_internal::normalize<category_type> normalize_type;
9215 	scalar_type m = normalize_type::template process< magenta_p >(color_parameter.template get< magenta_p >());
9216 	scalar_type k = normalize_type::template process< key_p >(color_parameter.template get< key_p >());
9217 	scalar_type g = (1-m) * (1-k);
9218 	return diverse_type::template process<green_p>(g);
9219 }
9220 
9221 }
9222 }
9223 
9224 namespace color {
9225 namespace get {
9226 
9227 template< typename tag_name >
9228 inline
9229 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::cmyk< tag_name > >::akin_type >::return_type
blue(::color::model<::color::category::cmyk<tag_name>> const & color_parameter)9230 blue(::color::model< ::color::category::cmyk< tag_name > > const& color_parameter) {
9231 	typedef ::color::category::cmyk< tag_name > category_type;
9232 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
9233 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
9234 	enum { blue_p = ::color::place::_internal::blue< akin_type >::position_enum };
9235 	enum { yellow_p = ::color::place::_internal::yellow< category_type >::position_enum };
9236 	enum { key_p = ::color::place::_internal::key< category_type >::position_enum };
9237 	typedef ::color::_internal::diverse< akin_type > diverse_type;
9238 	typedef ::color::_internal::normalize<category_type> normalize_type;
9239 	scalar_type y = normalize_type::template process< yellow_p >(color_parameter.template get<yellow_p>());
9240 	scalar_type k = normalize_type::template process< key_p >(color_parameter.template get< key_p >());
9241 	scalar_type b = (1-y) * (1-k);
9242 	return diverse_type::template process<blue_p>(b);
9243 }
9244 
9245 }
9246 }
9247 
9248 namespace color {
9249 namespace get {
9250 
9251 template< typename tag_name >
9252 inline
9253 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::cmyk<tag_name> >::akin_type >::return_type
gray(::color::model<::color::category::cmyk<tag_name>> const & color_parameter)9254 gray(::color::model< ::color::category::cmyk<tag_name> > const& color_parameter) {
9255 	typedef ::color::category::cmyk< tag_name > category_type;
9256 	typedef typename ::color::trait::scalar< category_type >::instance_type scalar_type;
9257 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
9258 	typedef ::color::_internal::diverse< akin_type > diverse_type;
9259 	typedef ::color::_internal::normalize< category_type > normalize_type;
9260 	typedef ::color::constant::gray::rgb< akin_type > gray_const_type;
9261 	enum {
9262 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
9263 		,magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
9264 		, yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
9265 		, key_p = ::color::place::_internal::key<category_type>::position_enum
9266 	};
9267 	scalar_type c = normalize_type::template process< cyan_p>(color_parameter.template get< cyan_p>());
9268 	scalar_type m = normalize_type::template process<magenta_p>(color_parameter.template get<magenta_p>());
9269 	scalar_type y = normalize_type::template process< yellow_p>(color_parameter.template get< yellow_p>());
9270 	scalar_type k = normalize_type::template process< key_p>(color_parameter.template get< key_p>());
9271 	scalar_type value =
9272 		(gray_const_type::Rc() * (scalar_type(1)-c)
9273 		 + gray_const_type::Gc() * (scalar_type(1)-m)
9274 		 + gray_const_type::Bc() * (scalar_type(1)-y)) * (scalar_type(1)-k);
9275 	return diverse_type::template process<0>(value);
9276 }
9277 
9278 }
9279 }
9280 
9281 namespace color {
9282 namespace get {
9283 
9284 template< typename tag_name >
9285 inline
9286 typename ::color::trait::component< ::color::category::cmyk< tag_name > >::return_type
black(::color::model<::color::category::cmyk<tag_name>> const & color_parameter)9287 black(::color::model< ::color::category::cmyk< tag_name > > const& color_parameter) {
9288 	typedef ::color::category::cmyk< tag_name > category_type;
9289 	enum { black_p = ::color::place::_internal::black< category_type >::position_enum };
9290 	return color_parameter.template get< black_p >();
9291 }
9292 
9293 }
9294 }
9295 
9296 namespace color {
9297 namespace get {
9298 
9299 namespace constant {
9300 namespace cmyk {
9301 namespace cyan {
9302 
9303 enum formula_enum {
9304 	channel_entity
9305 };
9306 
9307 }
9308 }
9309 }
9310 
9311 namespace _internal {
9312 namespace cmyk {
9313 namespace cyan {
9314 
9315 template
9316 <
9317 	typename category_name
9318 	,enum ::color::get::constant::cmyk::cyan::formula_enum formula_number = ::color::get::constant::cmyk::cyan::channel_entity
9319 	>
9320 struct usher {
9321 	typedef category_name category_type;
9322 
9323 	typedef ::color::model<category_type> model_type;
9324 	typedef typename ::color::trait::component< category_name >::return_type return_type;
9325 
9326 	enum {
9327 		cyan_p = ::color::place::_internal::cyan<category_type>::position_enum
9328 	};
9329 
processcolor::get::_internal::cmyk::cyan::usher9330 	static return_type process(model_type const& color_parameter) {
9331 		return color_parameter.template get<cyan_p>();
9332 	}
9333 };
9334 
9335 }
9336 }
9337 }
9338 
9339 template
9340 <
9341 	enum ::color::get::constant::cmyk::cyan::formula_enum formula_number = ::color::get::constant::cmyk::cyan::channel_entity
9342 ,typename tag_name
9343 >
9344 inline
9345 typename ::color::model< ::color::category::cmyk< tag_name> >::component_const_type
cyan(::color::model<::color::category::cmyk<tag_name>> const & color_parameter)9346 cyan
9347 (
9348 	::color::model< ::color::category::cmyk< tag_name> > const& color_parameter
9349 ) {
9350 	return ::color::get::_internal::cmyk::cyan::usher< ::color::category::cmyk< tag_name >, formula_number >::process(color_parameter);
9351 }
9352 
9353 }
9354 }
9355 
9356 namespace color {
9357 namespace get {
9358 
9359 namespace constant {
9360 namespace cmyk {
9361 namespace magenta {
9362 
9363 enum formula_enum {
9364 	channel_entity
9365 };
9366 
9367 }
9368 }
9369 }
9370 
9371 namespace _internal {
9372 namespace cmyk {
9373 namespace magenta {
9374 
9375 template
9376 <
9377 	typename category_name
9378 	,enum ::color::get::constant::cmyk::magenta::formula_enum formula_number = ::color::get::constant::cmyk::magenta::channel_entity
9379 	>
9380 struct usher {
9381 	typedef category_name category_type;
9382 
9383 	typedef ::color::model<category_type> model_type;
9384 	typedef typename ::color::trait::component< category_name >::return_type return_type;
9385 
9386 	enum {
9387 		magenta_p = ::color::place::_internal::magenta<category_type>::position_enum
9388 	};
9389 
processcolor::get::_internal::cmyk::magenta::usher9390 	static return_type process(model_type const& color_parameter) {
9391 		return color_parameter.template get<magenta_p>();
9392 	}
9393 };
9394 
9395 }
9396 }
9397 }
9398 
9399 template
9400 <
9401 	enum ::color::get::constant::cmyk::magenta::formula_enum formula_number = ::color::get::constant::cmyk::magenta::channel_entity
9402 ,typename tag_name
9403 >
9404 inline
9405 typename ::color::model< ::color::category::cmyk< tag_name> >::component_const_type
magenta(::color::model<::color::category::cmyk<tag_name>> const & color_parameter)9406 magenta
9407 (
9408 	::color::model< ::color::category::cmyk< tag_name> > const& color_parameter
9409 ) {
9410 	return ::color::get::_internal::cmyk::magenta::usher< ::color::category::cmyk< tag_name >, formula_number >::process(color_parameter);
9411 }
9412 
9413 }
9414 }
9415 
9416 namespace color {
9417 namespace get {
9418 
9419 namespace constant {
9420 namespace cmyk {
9421 namespace yellow {
9422 
9423 enum formula_enum {
9424 	channel_entity
9425 };
9426 
9427 }
9428 }
9429 }
9430 
9431 namespace _internal {
9432 namespace cmyk {
9433 namespace yellow {
9434 
9435 template
9436 <
9437 	typename category_name
9438 	,enum ::color::get::constant::cmyk::yellow::formula_enum formula_number = ::color::get::constant::cmyk::yellow::channel_entity
9439 	>
9440 struct usher {
9441 	typedef category_name category_type;
9442 
9443 	typedef ::color::model<category_type> model_type;
9444 	typedef typename ::color::trait::component< category_name >::return_type return_type;
9445 
9446 	enum {
9447 		yellow_p = ::color::place::_internal::yellow<category_type>::position_enum
9448 	};
9449 
processcolor::get::_internal::cmyk::yellow::usher9450 	static return_type process(model_type const& color_parameter) {
9451 		return color_parameter.template get<yellow_p>();
9452 	}
9453 };
9454 
9455 }
9456 }
9457 }
9458 
9459 template
9460 <
9461 	enum ::color::get::constant::cmyk::yellow::formula_enum formula_number = ::color::get::constant::cmyk::yellow::channel_entity
9462 ,typename tag_name
9463 >
9464 inline
9465 typename ::color::model< ::color::category::cmyk< tag_name> >::component_const_type
yellow(::color::model<::color::category::cmyk<tag_name>> const & color_parameter)9466 yellow
9467 (
9468 	::color::model< ::color::category::cmyk< tag_name> > const& color_parameter
9469 ) {
9470 	return ::color::get::_internal::cmyk::yellow::usher< ::color::category::cmyk< tag_name >, formula_number >::process(color_parameter);
9471 }
9472 
9473 }
9474 }
9475 
9476 namespace color {
9477 namespace set {
9478 
9479 template< typename tag_name >
9480 inline
9481 void
red(::color::model<::color::category::cmyk<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::cmyk<tag_name>>::akin_type>::model_type component_parameter)9482 red
9483 (
9484 	::color::model< ::color::category::cmyk< tag_name > > & color_parameter
9485 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::cmyk< tag_name > >::akin_type >::model_type component_parameter
9486 ) {
9487 	typedef ::color::category::cmyk< tag_name > category_type;
9488 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
9489 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
9490 	::color::model< akin_type > rgb(color_parameter);
9491 	rgb.template set<red_p> (component_parameter);
9492 	color_parameter = rgb;
9493 }
9494 
9495 }
9496 }
9497 
9498 namespace color {
9499 namespace set {
9500 
9501 template< typename tag_name >
9502 inline
9503 void
green(::color::model<::color::category::cmyk<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::cmyk<tag_name>>::akin_type>::model_type component_parameter)9504 green
9505 (
9506 	::color::model< ::color::category::cmyk< tag_name > > & color_parameter
9507 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::cmyk< tag_name > >::akin_type >::model_type component_parameter
9508 ) {
9509 	typedef ::color::category::cmyk< tag_name > category_type;
9510 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
9511 	enum { green_p = ::color::place::_internal::green< akin_type >::position_enum };
9512 	::color::model< akin_type > rgb(color_parameter);
9513 	rgb.template set< green_p > (component_parameter);
9514 	color_parameter = rgb;
9515 }
9516 
9517 }
9518 }
9519 
9520 namespace color {
9521 namespace set {
9522 
9523 template< typename tag_name >
9524 inline
9525 void
blue(::color::model<::color::category::cmyk<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::cmyk<tag_name>>::akin_type>::model_type component_parameter)9526 blue
9527 (
9528 	::color::model< ::color::category::cmyk< tag_name > > & color_parameter
9529 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::cmyk< tag_name > >::akin_type >::model_type component_parameter
9530 ) {
9531 	typedef ::color::category::cmyk< tag_name > category_type;
9532 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
9533 	enum { blue_p = ::color::place::_internal::blue< akin_type >::position_enum };
9534 	::color::model< akin_type > rgb(color_parameter);
9535 	rgb.template set< blue_p > (component_parameter);
9536 	color_parameter = rgb;
9537 }
9538 
9539 }
9540 }
9541 
9542 namespace color {
9543 namespace akin {
9544 
9545 template< >struct rgb< ::color::category::hsl_uint8 > {
9546 	typedef ::color::category::rgb_uint8 akin_type;
9547 };
9548 template< >struct rgb< ::color::category::hsl_uint16 > {
9549 	typedef ::color::category::rgb_uint16 akin_type;
9550 };
9551 template< >struct rgb< ::color::category::hsl_uint32 > {
9552 	typedef ::color::category::rgb_uint32 akin_type;
9553 };
9554 template< >struct rgb< ::color::category::hsl_uint64 > {
9555 	typedef ::color::category::rgb_uint64 akin_type;
9556 };
9557 template< >struct rgb< ::color::category::hsl_float > {
9558 	typedef ::color::category::rgb_float akin_type;
9559 };
9560 template< >struct rgb< ::color::category::hsl_double > {
9561 	typedef ::color::category::rgb_double akin_type;
9562 };
9563 template< >struct rgb< ::color::category::hsl_ldouble > {
9564 	typedef ::color::category::rgb_ldouble akin_type;
9565 };
9566 
9567 }
9568 }
9569 
9570 namespace color {
9571 namespace akin {
9572 
9573 template< >struct rgb< ::color::category::hsv_uint8 > {
9574 	typedef ::color::category::rgb_uint8 akin_type;
9575 };
9576 template< >struct rgb< ::color::category::hsv_uint16 > {
9577 	typedef ::color::category::rgb_uint16 akin_type;
9578 };
9579 template< >struct rgb< ::color::category::hsv_uint32 > {
9580 	typedef ::color::category::rgb_uint32 akin_type;
9581 };
9582 template< >struct rgb< ::color::category::hsv_uint64 > {
9583 	typedef ::color::category::rgb_uint64 akin_type;
9584 };
9585 template< >struct rgb< ::color::category::hsv_float > {
9586 	typedef ::color::category::rgb_float akin_type;
9587 };
9588 template< >struct rgb< ::color::category::hsv_double > {
9589 	typedef ::color::category::rgb_double akin_type;
9590 };
9591 template< >struct rgb< ::color::category::hsv_ldouble > {
9592 	typedef ::color::category::rgb_ldouble akin_type;
9593 };
9594 
9595 }
9596 }
9597 
9598 namespace color {
9599 namespace akin {
9600 
9601 template< >struct rgb< ::color::category::hsi_uint8 > {
9602 	typedef ::color::category::rgb_uint8 akin_type;
9603 };
9604 template< >struct rgb< ::color::category::hsi_uint16 > {
9605 	typedef ::color::category::rgb_uint16 akin_type;
9606 };
9607 template< >struct rgb< ::color::category::hsi_uint32 > {
9608 	typedef ::color::category::rgb_uint32 akin_type;
9609 };
9610 template< >struct rgb< ::color::category::hsi_uint64 > {
9611 	typedef ::color::category::rgb_uint64 akin_type;
9612 };
9613 template< >struct rgb< ::color::category::hsi_float > {
9614 	typedef ::color::category::rgb_float akin_type;
9615 };
9616 template< >struct rgb< ::color::category::hsi_double > {
9617 	typedef ::color::category::rgb_double akin_type;
9618 };
9619 template< >struct rgb< ::color::category::hsi_ldouble > {
9620 	typedef ::color::category::rgb_ldouble akin_type;
9621 };
9622 
9623 }
9624 }
9625 
9626 namespace color {
9627 namespace akin {
9628 
9629 template< >struct rgb< ::color::category::hwb_uint8 > {
9630 	typedef ::color::category::rgb_uint8 akin_type;
9631 };
9632 template< >struct rgb< ::color::category::hwb_uint16 > {
9633 	typedef ::color::category::rgb_uint16 akin_type;
9634 };
9635 template< >struct rgb< ::color::category::hwb_uint32 > {
9636 	typedef ::color::category::rgb_uint32 akin_type;
9637 };
9638 template< >struct rgb< ::color::category::hwb_uint64 > {
9639 	typedef ::color::category::rgb_uint64 akin_type;
9640 };
9641 template< >struct rgb< ::color::category::hwb_float > {
9642 	typedef ::color::category::rgb_float akin_type;
9643 };
9644 template< >struct rgb< ::color::category::hwb_double > {
9645 	typedef ::color::category::rgb_double akin_type;
9646 };
9647 template< >struct rgb< ::color::category::hwb_ldouble > {
9648 	typedef ::color::category::rgb_ldouble akin_type;
9649 };
9650 
9651 }
9652 }
9653 
9654 namespace color {
9655 namespace akin {
9656 
9657 template< typename tag_name >
9658 struct rgb< ::color::category::rgb< tag_name > > {
9659 public:
9660 
9661 	typedef ::color::category::rgb< tag_name > akin_type;
9662 };
9663 
9664 }
9665 }
9666 
9667 namespace color {
9668 namespace akin {
9669 
9670 template< >struct rgb< ::color::category::yiq_uint8 > {
9671 	typedef ::color::category::rgb_uint8 akin_type;
9672 };
9673 template< >struct rgb< ::color::category::yiq_uint16 > {
9674 	typedef ::color::category::rgb_uint16 akin_type;
9675 };
9676 template< >struct rgb< ::color::category::yiq_uint32 > {
9677 	typedef ::color::category::rgb_uint32 akin_type;
9678 };
9679 template< >struct rgb< ::color::category::yiq_uint64 > {
9680 	typedef ::color::category::rgb_uint64 akin_type;
9681 };
9682 template< >struct rgb< ::color::category::yiq_float > {
9683 	typedef ::color::category::rgb_float akin_type;
9684 };
9685 template< >struct rgb< ::color::category::yiq_double > {
9686 	typedef ::color::category::rgb_double akin_type;
9687 };
9688 template< >struct rgb< ::color::category::yiq_ldouble > {
9689 	typedef ::color::category::rgb_ldouble akin_type;
9690 };
9691 
9692 }
9693 }
9694 
9695 namespace color {
9696 namespace akin {
9697 
9698 template< ::color::constant::yuv::reference_enum reference_number >struct rgb< ::color::category::yuv_uint8 <reference_number> > {
9699 	typedef ::color::category::rgb_uint8 akin_type;
9700 };
9701 template< ::color::constant::yuv::reference_enum reference_number >struct rgb< ::color::category::yuv_uint16 <reference_number> > {
9702 	typedef ::color::category::rgb_uint16 akin_type;
9703 };
9704 template< ::color::constant::yuv::reference_enum reference_number >struct rgb< ::color::category::yuv_uint32 <reference_number> > {
9705 	typedef ::color::category::rgb_uint32 akin_type;
9706 };
9707 template< ::color::constant::yuv::reference_enum reference_number >struct rgb< ::color::category::yuv_uint64 <reference_number> > {
9708 	typedef ::color::category::rgb_uint64 akin_type;
9709 };
9710 template< ::color::constant::yuv::reference_enum reference_number >struct rgb< ::color::category::yuv_float <reference_number> > {
9711 	typedef ::color::category::rgb_float akin_type;
9712 };
9713 template< ::color::constant::yuv::reference_enum reference_number >struct rgb< ::color::category::yuv_double <reference_number> > {
9714 	typedef ::color::category::rgb_double akin_type;
9715 };
9716 template< ::color::constant::yuv::reference_enum reference_number >struct rgb< ::color::category::yuv_ldouble <reference_number> > {
9717 	typedef ::color::category::rgb_ldouble akin_type;
9718 };
9719 
9720 }
9721 }
9722 
9723 namespace color {
9724 namespace akin {
9725 
9726 template< >struct rgb< ::color::category::YCgCo_uint8 > {
9727 	typedef ::color::category::rgb_uint8 akin_type;
9728 };
9729 template< >struct rgb< ::color::category::YCgCo_uint16 > {
9730 	typedef ::color::category::rgb_uint16 akin_type;
9731 };
9732 template< >struct rgb< ::color::category::YCgCo_uint32 > {
9733 	typedef ::color::category::rgb_uint32 akin_type;
9734 };
9735 template< >struct rgb< ::color::category::YCgCo_uint64 > {
9736 	typedef ::color::category::rgb_uint64 akin_type;
9737 };
9738 template< >struct rgb< ::color::category::YCgCo_float > {
9739 	typedef ::color::category::rgb_float akin_type;
9740 };
9741 template< >struct rgb< ::color::category::YCgCo_double > {
9742 	typedef ::color::category::rgb_double akin_type;
9743 };
9744 template< >struct rgb< ::color::category::YCgCo_ldouble > {
9745 	typedef ::color::category::rgb_ldouble akin_type;
9746 };
9747 
9748 }
9749 }
9750 
9751 namespace color {
9752 namespace akin {
9753 
9754 template< >struct rgb< ::color::category::YDbDr_uint8 > {
9755 	typedef ::color::category::rgb_uint8 akin_type;
9756 };
9757 template< >struct rgb< ::color::category::YDbDr_uint16 > {
9758 	typedef ::color::category::rgb_uint16 akin_type;
9759 };
9760 template< >struct rgb< ::color::category::YDbDr_uint32 > {
9761 	typedef ::color::category::rgb_uint32 akin_type;
9762 };
9763 template< >struct rgb< ::color::category::YDbDr_uint64 > {
9764 	typedef ::color::category::rgb_uint64 akin_type;
9765 };
9766 template< >struct rgb< ::color::category::YDbDr_float > {
9767 	typedef ::color::category::rgb_float akin_type;
9768 };
9769 template< >struct rgb< ::color::category::YDbDr_double > {
9770 	typedef ::color::category::rgb_double akin_type;
9771 };
9772 template< >struct rgb< ::color::category::YDbDr_ldouble > {
9773 	typedef ::color::category::rgb_ldouble akin_type;
9774 };
9775 
9776 }
9777 }
9778 
9779 namespace color {
9780 namespace akin {
9781 
9782 template< ::color::constant::YPbPr::reference_enum reference_number >struct rgb< ::color::category::YPbPr_uint8 <reference_number> > {
9783 	typedef ::color::category::rgb_uint8 akin_type;
9784 };
9785 template< ::color::constant::YPbPr::reference_enum reference_number >struct rgb< ::color::category::YPbPr_uint16 <reference_number> > {
9786 	typedef ::color::category::rgb_uint16 akin_type;
9787 };
9788 template< ::color::constant::YPbPr::reference_enum reference_number >struct rgb< ::color::category::YPbPr_uint32 <reference_number> > {
9789 	typedef ::color::category::rgb_uint32 akin_type;
9790 };
9791 template< ::color::constant::YPbPr::reference_enum reference_number >struct rgb< ::color::category::YPbPr_uint64 <reference_number> > {
9792 	typedef ::color::category::rgb_uint64 akin_type;
9793 };
9794 template< ::color::constant::YPbPr::reference_enum reference_number >struct rgb< ::color::category::YPbPr_float <reference_number> > {
9795 	typedef ::color::category::rgb_float akin_type;
9796 };
9797 template< ::color::constant::YPbPr::reference_enum reference_number >struct rgb< ::color::category::YPbPr_double <reference_number> > {
9798 	typedef ::color::category::rgb_double akin_type;
9799 };
9800 template< ::color::constant::YPbPr::reference_enum reference_number >struct rgb< ::color::category::YPbPr_ldouble<reference_number> > {
9801 	typedef ::color::category::rgb_ldouble akin_type;
9802 };
9803 
9804 }
9805 }
9806 
9807 namespace color {
9808 namespace akin {
9809 
9810 template< >struct rgb< ::color::category::xyz_uint8 > {
9811 	typedef ::color::category::rgb_uint8 akin_type;
9812 };
9813 template< >struct rgb< ::color::category::xyz_uint16 > {
9814 	typedef ::color::category::rgb_uint16 akin_type;
9815 };
9816 template< >struct rgb< ::color::category::xyz_uint32 > {
9817 	typedef ::color::category::rgb_uint32 akin_type;
9818 };
9819 template< >struct rgb< ::color::category::xyz_uint64 > {
9820 	typedef ::color::category::rgb_uint64 akin_type;
9821 };
9822 template< >struct rgb< ::color::category::xyz_float > {
9823 	typedef ::color::category::rgb_float akin_type;
9824 };
9825 template< >struct rgb< ::color::category::xyz_double > {
9826 	typedef ::color::category::rgb_double akin_type;
9827 };
9828 template< >struct rgb< ::color::category::xyz_ldouble > {
9829 	typedef ::color::category::rgb_ldouble akin_type;
9830 };
9831 
9832 }
9833 }
9834 
9835 namespace color {
9836 namespace akin {
9837 
9838 template< >struct rgb< ::color::category::lab_uint8 <> > {
9839 	typedef ::color::category::rgb_uint8 akin_type;
9840 };
9841 template< >struct rgb< ::color::category::lab_uint16 <> > {
9842 	typedef ::color::category::rgb_uint16 akin_type;
9843 };
9844 template< >struct rgb< ::color::category::lab_uint32 <> > {
9845 	typedef ::color::category::rgb_uint32 akin_type;
9846 };
9847 template< >struct rgb< ::color::category::lab_uint64 <> > {
9848 	typedef ::color::category::rgb_uint64 akin_type;
9849 };
9850 template< >struct rgb< ::color::category::lab_float <> > {
9851 	typedef ::color::category::rgb_float akin_type;
9852 };
9853 template< >struct rgb< ::color::category::lab_double <> > {
9854 	typedef ::color::category::rgb_double akin_type;
9855 };
9856 template< >struct rgb< ::color::category::lab_ldouble<> > {
9857 	typedef ::color::category::rgb_ldouble akin_type;
9858 };
9859 
9860 }
9861 }
9862 
9863 namespace color {
9864 namespace akin {
9865 
9866 template< >struct rgb< ::color::category::xyy_uint8 > {
9867 	typedef ::color::category::rgb_uint8 akin_type;
9868 };
9869 template< >struct rgb< ::color::category::xyy_uint16 > {
9870 	typedef ::color::category::rgb_uint16 akin_type;
9871 };
9872 template< >struct rgb< ::color::category::xyy_uint32 > {
9873 	typedef ::color::category::rgb_uint32 akin_type;
9874 };
9875 template< >struct rgb< ::color::category::xyy_uint64 > {
9876 	typedef ::color::category::rgb_uint64 akin_type;
9877 };
9878 template< >struct rgb< ::color::category::xyy_float > {
9879 	typedef ::color::category::rgb_float akin_type;
9880 };
9881 template< >struct rgb< ::color::category::xyy_double > {
9882 	typedef ::color::category::rgb_double akin_type;
9883 };
9884 template< >struct rgb< ::color::category::xyy_ldouble > {
9885 	typedef ::color::category::rgb_ldouble akin_type;
9886 };
9887 
9888 }
9889 }
9890 
9891 namespace color {
9892 namespace akin {
9893 
9894 template< ::color::constant::lms::reference_enum reference_number >struct rgb< ::color::category::lms_uint8 < reference_number > > {
9895 	typedef ::color::category::rgb_uint8 akin_type;
9896 };
9897 template< ::color::constant::lms::reference_enum reference_number >struct rgb< ::color::category::lms_uint16 < reference_number > > {
9898 	typedef ::color::category::rgb_uint16 akin_type;
9899 };
9900 template< ::color::constant::lms::reference_enum reference_number >struct rgb< ::color::category::lms_uint32 < reference_number > > {
9901 	typedef ::color::category::rgb_uint32 akin_type;
9902 };
9903 template< ::color::constant::lms::reference_enum reference_number >struct rgb< ::color::category::lms_uint64 < reference_number > > {
9904 	typedef ::color::category::rgb_uint64 akin_type;
9905 };
9906 template< ::color::constant::lms::reference_enum reference_number >struct rgb< ::color::category::lms_float < reference_number > > {
9907 	typedef ::color::category::rgb_float akin_type;
9908 };
9909 template< ::color::constant::lms::reference_enum reference_number >struct rgb< ::color::category::lms_double < reference_number > > {
9910 	typedef ::color::category::rgb_double akin_type;
9911 };
9912 template< ::color::constant::lms::reference_enum reference_number >struct rgb< ::color::category::lms_ldouble< reference_number > > {
9913 	typedef ::color::category::rgb_ldouble akin_type;
9914 };
9915 
9916 }
9917 }
9918 
9919 namespace color {
9920 namespace akin {
9921 
9922 template< >struct rgb< ::color::category::luv_uint8 > {
9923 	typedef ::color::category::rgb_uint8 akin_type;
9924 };
9925 template< >struct rgb< ::color::category::luv_uint16 > {
9926 	typedef ::color::category::rgb_uint16 akin_type;
9927 };
9928 template< >struct rgb< ::color::category::luv_uint32 > {
9929 	typedef ::color::category::rgb_uint32 akin_type;
9930 };
9931 template< >struct rgb< ::color::category::luv_uint64 > {
9932 	typedef ::color::category::rgb_uint64 akin_type;
9933 };
9934 template< >struct rgb< ::color::category::luv_float > {
9935 	typedef ::color::category::rgb_float akin_type;
9936 };
9937 template< >struct rgb< ::color::category::luv_double > {
9938 	typedef ::color::category::rgb_double akin_type;
9939 };
9940 template< >struct rgb< ::color::category::luv_ldouble > {
9941 	typedef ::color::category::rgb_ldouble akin_type;
9942 };
9943 
9944 }
9945 }
9946 
9947 namespace color {
9948 namespace akin {
9949 
9950 template< >struct rgb< ::color::category::LabCH_uint8 > {
9951 	typedef ::color::category::rgb_uint8 akin_type;
9952 };
9953 template< >struct rgb< ::color::category::LabCH_uint16 > {
9954 	typedef ::color::category::rgb_uint16 akin_type;
9955 };
9956 template< >struct rgb< ::color::category::LabCH_uint32 > {
9957 	typedef ::color::category::rgb_uint32 akin_type;
9958 };
9959 template< >struct rgb< ::color::category::LabCH_uint64 > {
9960 	typedef ::color::category::rgb_uint64 akin_type;
9961 };
9962 template< >struct rgb< ::color::category::LabCH_float > {
9963 	typedef ::color::category::rgb_float akin_type;
9964 };
9965 template< >struct rgb< ::color::category::LabCH_double > {
9966 	typedef ::color::category::rgb_double akin_type;
9967 };
9968 template< >struct rgb< ::color::category::LabCH_ldouble > {
9969 	typedef ::color::category::rgb_ldouble akin_type;
9970 };
9971 
9972 }
9973 }
9974 
9975 namespace color {
9976 namespace akin {
9977 
9978 template< >struct rgb< ::color::category::LuvCH_uint8 > {
9979 	typedef ::color::category::rgb_uint8 akin_type;
9980 };
9981 template< >struct rgb< ::color::category::LuvCH_uint16 > {
9982 	typedef ::color::category::rgb_uint16 akin_type;
9983 };
9984 template< >struct rgb< ::color::category::LuvCH_uint32 > {
9985 	typedef ::color::category::rgb_uint32 akin_type;
9986 };
9987 template< >struct rgb< ::color::category::LuvCH_uint64 > {
9988 	typedef ::color::category::rgb_uint64 akin_type;
9989 };
9990 template< >struct rgb< ::color::category::LuvCH_float > {
9991 	typedef ::color::category::rgb_float akin_type;
9992 };
9993 template< >struct rgb< ::color::category::LuvCH_double > {
9994 	typedef ::color::category::rgb_double akin_type;
9995 };
9996 template< >struct rgb< ::color::category::LuvCH_ldouble > {
9997 	typedef ::color::category::rgb_ldouble akin_type;
9998 };
9999 
10000 }
10001 }
10002 
10003 namespace color {
10004 namespace trait {
10005 
10006 template <> struct info< ::color::category::rgb_error > {
10007 public:
10008 	enum { implemented_entity = false };
10009 	enum { meaningful_entity = false };
10010 };
10011 template <> struct info< ::color::category::rgb_uint8 > {
10012 public:
10013 	enum { implemented_entity = true };
10014 	enum { meaningful_entity = true };
10015 };
10016 template <> struct info< ::color::category::rgb_uint16 > {
10017 public:
10018 	enum { implemented_entity = true };
10019 	enum { meaningful_entity = true };
10020 };
10021 template <> struct info< ::color::category::rgb_uint32 > {
10022 public:
10023 	enum { implemented_entity = true };
10024 	enum { meaningful_entity = true };
10025 };
10026 template <> struct info< ::color::category::rgb_uint64 > {
10027 public:
10028 	enum { implemented_entity = true };
10029 	enum { meaningful_entity = true };
10030 };
10031 template <> struct info< ::color::category::rgb_float > {
10032 public:
10033 	enum { implemented_entity = true };
10034 	enum { meaningful_entity = true };
10035 };
10036 template <> struct info< ::color::category::rgb_double > {
10037 public:
10038 	enum { implemented_entity = true };
10039 	enum { meaningful_entity = true };
10040 };
10041 template <> struct info< ::color::category::rgb_ldouble > {
10042 public:
10043 	enum { implemented_entity = true };
10044 	enum { meaningful_entity = true };
10045 };
10046 
10047 template< unsigned first_size, unsigned second_size, unsigned third_size >
10048 struct info< ::color::category::rgb_pack< first_size, second_size, third_size > > {
10049 public:
10050 	enum { implemented_entity = true };
10051 	enum { meaningful_entity = true };
10052 };
10053 
10054 template <> struct info< ::color::category::rgba_error > {
10055 public:
10056 	enum { implemented_entity = false };
10057 	enum { meaningful_entity = false };
10058 };
10059 template <> struct info< ::color::category::rgba_uint8 > {
10060 public:
10061 	enum { implemented_entity = true };
10062 	enum { meaningful_entity = true };
10063 };
10064 template <> struct info< ::color::category::rgba_uint16 > {
10065 public:
10066 	enum { implemented_entity = true };
10067 	enum { meaningful_entity = true };
10068 };
10069 template <> struct info< ::color::category::rgba_uint32 > {
10070 public:
10071 	enum { implemented_entity = true };
10072 	enum { meaningful_entity = true };
10073 };
10074 template <> struct info< ::color::category::rgba_uint64 > {
10075 public:
10076 	enum { implemented_entity = true };
10077 	enum { meaningful_entity = true };
10078 };
10079 template <> struct info< ::color::category::rgba_float > {
10080 public:
10081 	enum { implemented_entity = true };
10082 	enum { meaningful_entity = true };
10083 };
10084 template <> struct info< ::color::category::rgba_double > {
10085 public:
10086 	enum { implemented_entity = true };
10087 	enum { meaningful_entity = true };
10088 };
10089 template <> struct info< ::color::category::rgba_ldouble > {
10090 public:
10091 	enum { implemented_entity = true };
10092 	enum { meaningful_entity = true };
10093 };
10094 
10095 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
10096 struct info< ::color::category::rgba_pack< first_size, second_size, third_size, fourth_size > > {
10097 public:
10098 	enum { implemented_entity = true };
10099 	enum { meaningful_entity = true };
10100 };
10101 
10102 template <> struct info< ::color::category::argb_error > {
10103 public:
10104 	enum { implemented_entity = false };
10105 	enum { meaningful_entity = false };
10106 };
10107 template <> struct info< ::color::category::argb_uint8 > {
10108 public:
10109 	enum { implemented_entity = true };
10110 	enum { meaningful_entity = true };
10111 };
10112 template <> struct info< ::color::category::argb_uint16 > {
10113 public:
10114 	enum { implemented_entity = true };
10115 	enum { meaningful_entity = true };
10116 };
10117 template <> struct info< ::color::category::argb_uint32 > {
10118 public:
10119 	enum { implemented_entity = true };
10120 	enum { meaningful_entity = true };
10121 };
10122 template <> struct info< ::color::category::argb_uint64 > {
10123 public:
10124 	enum { implemented_entity = true };
10125 	enum { meaningful_entity = true };
10126 };
10127 template <> struct info< ::color::category::argb_float > {
10128 public:
10129 	enum { implemented_entity = true };
10130 	enum { meaningful_entity = true };
10131 };
10132 template <> struct info< ::color::category::argb_double > {
10133 public:
10134 	enum { implemented_entity = true };
10135 	enum { meaningful_entity = true };
10136 };
10137 template <> struct info< ::color::category::argb_ldouble > {
10138 public:
10139 	enum { implemented_entity = true };
10140 	enum { meaningful_entity = true };
10141 };
10142 
10143 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
10144 struct info< ::color::category::argb_pack< first_size, second_size, third_size, fourth_size > > {
10145 public:
10146 	enum { implemented_entity = true };
10147 	enum { meaningful_entity = true };
10148 };
10149 
10150 template <> struct info< ::color::category::bgr_error > {
10151 public:
10152 	enum { implemented_entity = false };
10153 	enum { meaningful_entity = false };
10154 };
10155 template <> struct info< ::color::category::bgr_uint8 > {
10156 public:
10157 	enum { implemented_entity = true };
10158 	enum { meaningful_entity = true };
10159 };
10160 template <> struct info< ::color::category::bgr_uint16 > {
10161 public:
10162 	enum { implemented_entity = true };
10163 	enum { meaningful_entity = true };
10164 };
10165 template <> struct info< ::color::category::bgr_uint32 > {
10166 public:
10167 	enum { implemented_entity = true };
10168 	enum { meaningful_entity = true };
10169 };
10170 template <> struct info< ::color::category::bgr_uint64 > {
10171 public:
10172 	enum { implemented_entity = true };
10173 	enum { meaningful_entity = true };
10174 };
10175 template <> struct info< ::color::category::bgr_float > {
10176 public:
10177 	enum { implemented_entity = true };
10178 	enum { meaningful_entity = true };
10179 };
10180 template <> struct info< ::color::category::bgr_double > {
10181 public:
10182 	enum { implemented_entity = true };
10183 	enum { meaningful_entity = true };
10184 };
10185 template <> struct info< ::color::category::bgr_ldouble > {
10186 public:
10187 	enum { implemented_entity = true };
10188 	enum { meaningful_entity = true };
10189 };
10190 
10191 template< unsigned first_size, unsigned second_size, unsigned third_size >
10192 struct info< ::color::category::bgr_pack< first_size, second_size, third_size > > {
10193 public:
10194 	enum { implemented_entity = true };
10195 	enum { meaningful_entity = true };
10196 };
10197 
10198 template <> struct info< ::color::category::bgra_error > {
10199 public:
10200 	enum { implemented_entity = false };
10201 	enum { meaningful_entity = false };
10202 };
10203 template <> struct info< ::color::category::bgra_uint8 > {
10204 public:
10205 	enum { implemented_entity = true };
10206 	enum { meaningful_entity = true };
10207 };
10208 template <> struct info< ::color::category::bgra_uint16 > {
10209 public:
10210 	enum { implemented_entity = true };
10211 	enum { meaningful_entity = true };
10212 };
10213 template <> struct info< ::color::category::bgra_uint32 > {
10214 public:
10215 	enum { implemented_entity = true };
10216 	enum { meaningful_entity = true };
10217 };
10218 template <> struct info< ::color::category::bgra_uint64 > {
10219 public:
10220 	enum { implemented_entity = true };
10221 	enum { meaningful_entity = true };
10222 };
10223 template <> struct info< ::color::category::bgra_float > {
10224 public:
10225 	enum { implemented_entity = true };
10226 	enum { meaningful_entity = true };
10227 };
10228 template <> struct info< ::color::category::bgra_double > {
10229 public:
10230 	enum { implemented_entity = true };
10231 	enum { meaningful_entity = true };
10232 };
10233 template <> struct info< ::color::category::bgra_ldouble > {
10234 public:
10235 	enum { implemented_entity = true };
10236 	enum { meaningful_entity = true };
10237 };
10238 
10239 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
10240 struct info< ::color::category::bgra_pack< first_size, second_size, third_size, fourth_size > > {
10241 public:
10242 	enum { implemented_entity = true };
10243 	enum { meaningful_entity = true };
10244 };
10245 
10246 template <> struct info< ::color::category::abgr_error > {
10247 public:
10248 	enum { implemented_entity = false };
10249 	enum { meaningful_entity = false };
10250 };
10251 template <> struct info< ::color::category::abgr_uint8 > {
10252 public:
10253 	enum { implemented_entity = true };
10254 	enum { meaningful_entity = true };
10255 };
10256 template <> struct info< ::color::category::abgr_uint16 > {
10257 public:
10258 	enum { implemented_entity = true };
10259 	enum { meaningful_entity = true };
10260 };
10261 template <> struct info< ::color::category::abgr_uint32 > {
10262 public:
10263 	enum { implemented_entity = true };
10264 	enum { meaningful_entity = true };
10265 };
10266 template <> struct info< ::color::category::abgr_uint64 > {
10267 public:
10268 	enum { implemented_entity = true };
10269 	enum { meaningful_entity = true };
10270 };
10271 template <> struct info< ::color::category::abgr_float > {
10272 public:
10273 	enum { implemented_entity = true };
10274 	enum { meaningful_entity = true };
10275 };
10276 template <> struct info< ::color::category::abgr_double > {
10277 public:
10278 	enum { implemented_entity = true };
10279 	enum { meaningful_entity = true };
10280 };
10281 template <> struct info< ::color::category::abgr_ldouble > {
10282 public:
10283 	enum { implemented_entity = true };
10284 	enum { meaningful_entity = true };
10285 };
10286 
10287 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
10288 struct info< ::color::category::abgr_pack< first_size, second_size, third_size, fourth_size > > {
10289 public:
10290 	enum { implemented_entity = true };
10291 	enum { meaningful_entity = true };
10292 };
10293 
10294 }
10295 }
10296 
10297 namespace color {
10298 namespace trait {
10299 
10300 template< >
10301 struct bound< ::color::category::rgb_float >
10302 	: public ::color::_internal::utility::bound::general< float, typename ::color::trait::index< ::color::category::rgb_float >::instance_type > {
10303 };
10304 
10305 template< >
10306 struct bound< ::color::category::rgb_double >
10307 	: public ::color::_internal::utility::bound::general< double, typename ::color::trait::index< ::color::category::rgb_double >::instance_type > {
10308 };
10309 
10310 template< >
10311 struct bound< ::color::category::rgb_ldouble >
10312 	: public ::color::_internal::utility::bound::general< long double, typename ::color::trait::index< ::color::category::rgb_ldouble >::instance_type > {
10313 };
10314 
10315 }
10316 }
10317 
10318 namespace color {
10319 namespace trait {
10320 
10321 template< >
10322 struct bound< ::color::category::rgb_uint8 >
10323 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::rgb_uint8 >::instance_type > {
10324 };
10325 
10326 template< >
10327 struct bound< ::color::category::rgb_uint16 >
10328 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::rgb_uint16 >::instance_type > {
10329 };
10330 
10331 template< >
10332 struct bound< ::color::category::rgb_uint32 >
10333 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::rgb_uint32 >::instance_type > {
10334 };
10335 
10336 template< >
10337 struct bound< ::color::category::rgb_uint64 >
10338 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::rgb_uint64 >::instance_type > {
10339 };
10340 
10341 }
10342 }
10343 
10344 namespace color {
10345 namespace trait {
10346 
10347 template< typename value_name, unsigned first_position, unsigned second_position, unsigned third_position >
10348 struct bound< ::color::category::rgb< ::color::category::_internal::rgb_scramble< value_name, first_position, second_position, third_position > > >
10349 	: public ::color::_internal::utility::bound::general< value_name, typename ::color::trait::index< ::color::category::rgb< ::color::category::_internal::rgb_scramble< value_name, first_position, second_position, third_position > > >::instance_type > {
10350 };
10351 
10352 }
10353 }
10354 namespace color {
10355 namespace trait {
10356 
10357 template< typename value_name, unsigned first_position, unsigned second_position, unsigned third_position, unsigned fourth_position >
10358 struct bound< ::color::category::rgb< ::color::category::_internal::rgba_scramble< value_name, first_position, second_position, third_position,fourth_position > > >
10359 	: public ::color::_internal::utility::bound::general< value_name, typename ::color::trait::index< ::color::category::rgb< ::color::category::_internal::rgba_scramble< value_name, first_position, second_position, third_position,fourth_position > > >::instance_type > {
10360 };
10361 
10362 }
10363 }
10364 
10365 namespace color {
10366 namespace _internal {
10367 namespace utility {
10368 namespace bound {
10369 
10370 template
10371 <
10372 	typename unsigned_name
10373 	,typename index_name
10374 	,unsigned first_size, unsigned second_size, unsigned third_size
10375 	>
10376 struct pack3 {
10377 public:
10378 	typedef unsigned_name unsigned_type;
10379 	typedef index_name index_type;
10380 
10381 	typedef ::color::_internal::utility::type::traitP< unsigned_type > trait_type;
10382 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
10383 
10384 	typedef typename trait_type::instance_type instance_type;
10385 	typedef typename trait_type::return_image_type return_image_type;
10386 
10387 	typedef typename index_trait_type::instance_type index_instance_type;
10388 	typedef typename index_trait_type::model_type index_input_const_type;
10389 
10390 	enum {
10391 		first_max = (1 << first_size) - 1,
10392 		second_max = (1 << second_size) - 1,
10393 		third_max = (1 << third_size) - 1,
10394 	};
10395 
10396 	template< index_instance_type index >
maximumcolor::_internal::utility::bound::pack310397 	static return_image_type maximum() {
10398 		static const instance_type max_list[] = { first_max, second_max, third_max };
10399 		return max_list[index];
10400 	}
10401 
maximumcolor::_internal::utility::bound::pack310402 	static return_image_type maximum(index_input_const_type index) {
10403 		static const instance_type max_list[] = { first_max, second_max, third_max };
10404 		return max_list[index];
10405 	}
10406 
10407 	template< index_instance_type index >
minimumcolor::_internal::utility::bound::pack310408 	static return_image_type minimum() {
10409 		static const instance_type value=0;
10410 		return value;
10411 	}
10412 
minimumcolor::_internal::utility::bound::pack310413 	static return_image_type minimum(index_input_const_type index) {
10414 		static const instance_type value=0;
10415 		return value;
10416 	}
10417 
10418 	template< index_instance_type index >
rangecolor::_internal::utility::bound::pack310419 	static return_image_type range() {
10420 		static const instance_type max_list[] = { first_max, second_max, third_max };
10421 		return max_list[index];
10422 	}
10423 
rangecolor::_internal::utility::bound::pack310424 	static return_image_type range(index_input_const_type index) {
10425 		static const instance_type max_list[] = { first_max, second_max, third_max };
10426 		return max_list[index];
10427 	}
10428 };
10429 
10430 template< typename unsigned_name, unsigned first_size, unsigned second_size, unsigned third_size >
10431 using pack3_N_t = ::color::_internal::utility::bound::pack3< unsigned_name, unsigned, first_size, second_size, third_size >;
10432 
10433 template< unsigned first_size, unsigned second_size, unsigned third_size >
10434 using pack3_8_t = ::color::_internal::utility::bound::pack3_N_t< std::uint8_t, first_size, second_size, third_size >;
10435 
10436 template< unsigned first_size, unsigned second_size, unsigned third_size >
10437 using pack3_16_t = ::color::_internal::utility::bound::pack3_N_t< std::uint16_t, first_size, second_size, third_size >;
10438 
10439 template< unsigned first_size, unsigned second_size, unsigned third_size >
10440 using pack3_32_t = ::color::_internal::utility::bound::pack3_N_t< std::uint32_t, first_size, second_size, third_size >;
10441 
10442 template< unsigned first_size, unsigned second_size, unsigned third_size >
10443 using pack3_64_t = ::color::_internal::utility::bound::pack3_N_t< std::uint64_t, first_size, second_size, third_size >;
10444 
10445 using split233_t = ::color::_internal::utility::bound::pack3_8_t< 2, 3, 3 >;
10446 using split323_t = ::color::_internal::utility::bound::pack3_8_t< 3, 2, 3 >;
10447 using split332_t = ::color::_internal::utility::bound::pack3_8_t< 3, 3, 2 >;
10448 
10449 using split422_t = ::color::_internal::utility::bound::pack3_8_t< 4, 2, 2 >;
10450 using split242_t = ::color::_internal::utility::bound::pack3_8_t< 2, 4, 2 >;
10451 using split224_t = ::color::_internal::utility::bound::pack3_8_t< 2, 2, 4 >;
10452 
10453 using split655_t = ::color::_internal::utility::bound::pack3_16_t< 6, 5, 5 >;
10454 using split565_t = ::color::_internal::utility::bound::pack3_16_t< 5, 6, 5 >;
10455 using split556_t = ::color::_internal::utility::bound::pack3_16_t< 5, 5, 6 >;
10456 
10457 }
10458 }
10459 }
10460 }
10461 
10462 namespace color {
10463 namespace trait {
10464 
10465 namespace _internal {
10466 namespace rgb {
10467 
10468 template< unsigned size_size >
10469 struct pick_bound3 {
10470 	typedef ::color::type::error_t bound_type;
10471 };
10472 
10473 template<>
10474 struct pick_bound3<8> {
10475 	template< unsigned first_size, unsigned second_size, unsigned third_size >
10476 	using bound_type = ::color::_internal::utility::bound::pack3_8_t< first_size, second_size, third_size >;
10477 };
10478 
10479 template<>
10480 struct pick_bound3<16> {
10481 	template< unsigned first_size, unsigned second_size, unsigned third_size >
10482 	using bound_type = ::color::_internal::utility::bound::pack3_16_t< first_size, second_size, third_size >;
10483 };
10484 
10485 template<>
10486 struct pick_bound3<32> {
10487 	template< unsigned first_size, unsigned second_size, unsigned third_size >
10488 	using bound_type = ::color::_internal::utility::bound::pack3_32_t< first_size, second_size, third_size >;
10489 };
10490 
10491 template<>
10492 struct pick_bound3<64> {
10493 	template< unsigned first_size, unsigned second_size, unsigned third_size >
10494 	using bound_type = ::color::_internal::utility::bound::pack3_64_t< first_size, second_size, third_size >;
10495 };
10496 
10497 }
10498 }
10499 
10500 template
10501 <
10502 	unsigned first_index, unsigned first_size,
10503 	unsigned second_index, unsigned second_size,
10504 	unsigned third_index, unsigned third_size
10505 	>
10506 struct bound< ::color::category::rgb< ::color::category::_internal::rgb_scramble< ::color::type::pack3< first_size, second_size, third_size >, first_index, second_index, third_index > > >
10507 	: public ::color::trait::_internal::rgb::pick_bound3< first_size + second_size + third_size >:: template bound_type<first_size, second_size, third_size> {
10508 };
10509 
10510 }
10511 }
10512 
10513 namespace color {
10514 namespace _internal {
10515 namespace utility {
10516 namespace bound {
10517 
10518 template
10519 <
10520 	typename unsigned_name
10521 	,typename index_name
10522 	,unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size
10523 	>
10524 struct pack4 {
10525 public:
10526 	typedef unsigned_name unsigned_type;
10527 	typedef index_name index_type;
10528 
10529 	typedef ::color::_internal::utility::type::traitP< unsigned_type > trait_type;
10530 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
10531 
10532 	typedef typename trait_type::instance_type instance_type;
10533 	typedef typename trait_type::return_image_type return_image_type;
10534 
10535 	typedef typename index_trait_type::instance_type index_instance_type;
10536 	typedef typename index_trait_type::model_type index_input_const_type;
10537 
10538 	enum {
10539 		first_max = (1 << first_size) - 1,
10540 		second_max = (1 << second_size) - 1,
10541 		third_max = (1 << third_size) - 1,
10542 		fourth_max = (1 << fourth_size) - 1,
10543 	};
10544 
10545 	template< index_instance_type index >
maximumcolor::_internal::utility::bound::pack410546 	static return_image_type maximum() {
10547 		static const instance_type max_list[] = { first_max, second_max, third_max, fourth_max };
10548 		return max_list[index];
10549 	}
10550 
maximumcolor::_internal::utility::bound::pack410551 	static return_image_type maximum(index_input_const_type index) {
10552 		static const instance_type max_list[] = { first_max, second_max, third_max, fourth_max };
10553 		return max_list[index];
10554 	}
10555 
10556 	template< index_instance_type index >
minimumcolor::_internal::utility::bound::pack410557 	static return_image_type minimum() {
10558 		static const instance_type value=0;
10559 		return value;
10560 	}
10561 
minimumcolor::_internal::utility::bound::pack410562 	static return_image_type minimum(index_input_const_type index) {
10563 		static const instance_type value=0;
10564 		return value;
10565 	}
10566 
10567 	template< index_instance_type index >
rangecolor::_internal::utility::bound::pack410568 	static return_image_type range() {
10569 		static const instance_type max_list[] = { first_max, second_max, third_max, fourth_max };
10570 		return max_list[index];
10571 	}
10572 
rangecolor::_internal::utility::bound::pack410573 	static return_image_type range(index_input_const_type index) {
10574 		static const instance_type max_list[] = { first_max, second_max, third_max, fourth_max };
10575 		return max_list[index];
10576 	}
10577 };
10578 
10579 template< typename unsigned_name, unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
10580 using pack4_N_t = ::color::_internal::utility::bound::pack4< unsigned_name, unsigned, first_size, second_size, third_size, fourth_size >;
10581 
10582 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
10583 using pack4_8_t = ::color::_internal::utility::bound::pack4_N_t< std::uint8_t, first_size, second_size, third_size, fourth_size >;
10584 
10585 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
10586 using pack4_16_t = ::color::_internal::utility::bound::pack4_N_t< std::uint16_t, first_size, second_size, third_size, fourth_size >;
10587 
10588 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
10589 using pack4_32_t = ::color::_internal::utility::bound::pack4_N_t< std::uint32_t, first_size, second_size, third_size, fourth_size >;
10590 
10591 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
10592 using pack4_64_t = ::color::_internal::utility::bound::pack4_N_t< std::uint64_t, first_size, second_size, third_size, fourth_size >;
10593 
10594 typedef ::color::_internal::utility::bound::pack4_8_t< 2, 2, 2, 2 > split2222_t;
10595 
10596 typedef ::color::_internal::utility::bound::pack4_16_t< 4, 4, 4, 4 > split4444_t;
10597 typedef ::color::_internal::utility::bound::pack4_16_t< 6, 6, 6, 6 > split6666_t;
10598 
10599 typedef ::color::_internal::utility::bound::pack4_16_t< 1, 5, 5, 5 > split1555_t;
10600 typedef ::color::_internal::utility::bound::pack4_16_t< 5, 5, 5, 1 > split5551_t;
10601 
10602 typedef ::color::_internal::utility::bound::pack4_16_t< 6, 6, 6, 6 > split6666_t;
10603 
10604 typedef ::color::_internal::utility::bound::pack4_32_t< 8, 8, 8, 8 > split8888_t;
10605 
10606 typedef ::color::_internal::utility::bound::pack4_32_t< 0, 10, 10, 2 > splitAAA2_t;
10607 typedef ::color::_internal::utility::bound::pack4_32_t< 2, 10, 10, 10 > split2AAA_t;
10608 
10609 typedef ::color::_internal::utility::bound::pack4_32_t< 6, 16, 16, 16 > splitGGGG_t;
10610 
10611 }
10612 }
10613 }
10614 }
10615 
10616 namespace color {
10617 namespace trait {
10618 
10619 namespace _internal {
10620 namespace rgb {
10621 
10622 template< unsigned size_size >
10623 struct pick_bound4 {
10624 	typedef ::color::type::error_t bound_type;
10625 };
10626 
10627 template<>
10628 struct pick_bound4<8> {
10629 	template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
10630 	using bound_type = ::color::_internal::utility::bound::pack4_8_t< first_size, second_size, third_size, fourth_size >;
10631 };
10632 
10633 template<>
10634 struct pick_bound4<16> {
10635 	template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
10636 	using bound_type = ::color::_internal::utility::bound::pack4_16_t< first_size, second_size, third_size, fourth_size >;
10637 };
10638 
10639 template<>
10640 struct pick_bound4<32> {
10641 	template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
10642 	using bound_type = ::color::_internal::utility::bound::pack4_32_t< first_size, second_size, third_size, fourth_size >;
10643 };
10644 
10645 template<>
10646 struct pick_bound4<64> {
10647 	template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
10648 	using bound_type = ::color::_internal::utility::bound::pack4_64_t< first_size, second_size, third_size, fourth_size >;
10649 };
10650 
10651 }
10652 }
10653 
10654 template
10655 <
10656 	unsigned first_index, unsigned first_size,
10657 	unsigned second_index, unsigned second_size,
10658 	unsigned third_index, unsigned third_size,
10659 	unsigned fourth_index, unsigned fourth_size
10660 	>
10661 struct bound< ::color::category::rgb< ::color::category::_internal::rgba_scramble< ::color::type::pack4< first_size, second_size, third_size, fourth_size >, first_index, second_index, third_index, fourth_index > > >
10662 	: public ::color::trait::_internal::rgb::pick_bound4< first_size + second_size + third_size + fourth_size >:: template bound_type< first_size, second_size, third_size, fourth_size > {
10663 };
10664 
10665 }
10666 }
10667 
10668 namespace color {
10669 namespace trait {
10670 
10671 template< >
10672 struct container< ::color::category::rgb_float >
10673 	: public ::color::_internal::utility::container::array< float, 3 > {
10674 };
10675 
10676 template< >
10677 struct container< ::color::category::rgb_double >
10678 	: public ::color::_internal::utility::container::array< double, 3 > {
10679 };
10680 
10681 template< >
10682 struct container< ::color::category::rgb_ldouble >
10683 	: public ::color::_internal::utility::container::array< long double, 3 > {
10684 };
10685 
10686 }
10687 }
10688 
10689 namespace color {
10690 namespace trait {
10691 
10692 template< >
10693 struct container< ::color::category::rgb_uint8 >
10694 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
10695 };
10696 
10697 template< >
10698 struct container< ::color::category::rgb_uint16 >
10699 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
10700 };
10701 
10702 template< >
10703 struct container< ::color::category::rgb_uint32 >
10704 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
10705 };
10706 
10707 template< >
10708 struct container< ::color::category::rgb_uint64 >
10709 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
10710 };
10711 
10712 }
10713 }
10714 
10715 namespace color {
10716 namespace trait {
10717 
10718 template< typename value_name, unsigned first_position, unsigned second_position, unsigned third_position >
10719 struct container< ::color::category::rgb< ::color::category::_internal::rgb_scramble< value_name, first_position, second_position, third_position > > >
10720 	: public ::color::_internal::utility::container::array< value_name, 3 > {
10721 };
10722 
10723 }
10724 }
10725 namespace color {
10726 namespace trait {
10727 
10728 template< typename value_name, unsigned first_position, unsigned second_position, unsigned third_position, unsigned fourth_position >
10729 struct container< ::color::category::rgb< ::color::category::_internal::rgba_scramble< value_name, first_position, second_position, third_position,fourth_position > > >
10730 	: public ::color::_internal::utility::container::array< value_name, 4 > {
10731 };
10732 
10733 }
10734 }
10735 
10736 namespace color {
10737 namespace _internal {
10738 namespace utility {
10739 namespace container {
10740 
10741 template
10742 <
10743 	typename container_name,
10744 	typename component_name,
10745 	typename index_name
10746 	,unsigned first_size, unsigned second_size, unsigned third_size
10747 	>
10748 struct pack3 {
10749 public:
10750 	typedef container_name instance_type;
10751 	typedef component_name value_type;
10752 	typedef index_name index_type;
10753 
10754 	typedef ::color::_internal::utility::container::pack3< container_name, component_name, index_name, first_size, second_size, third_size > this_type;
10755 
10756 	typedef instance_type const const_type;
10757 	typedef instance_type const& return_image_type;
10758 	typedef instance_type & return_type;
10759 	typedef instance_type & return_original_type;
10760 	typedef instance_type const& model_type;
10761 	typedef instance_type & input_type;
10762 	typedef instance_type & output_type;
10763 
10764 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
10765 
10766 	typedef typename index_trait_type::instance_type index_instance_type;
10767 
10768 	typedef typename index_trait_type::model_type index_input_const_type;
10769 	typedef typename index_trait_type::return_image_type index_return_image_type;
10770 
10771 	typedef ::color::_internal::utility::type::traitP< value_type > component_trait_type;
10772 
10773 	typedef typename component_trait_type::instance_type component_type;
10774 	typedef typename component_trait_type::const_type component_const_type;
10775 	typedef typename component_trait_type::return_image_type component_return_const_type;
10776 	typedef typename component_trait_type::model_type component_input_const_type;
10777 
10778 	typedef ::color::_internal::utility::type::size< std::size_t > size_trait_type;
10779 
10780 	typedef typename size_trait_type::return_image_type size_return_image_type;
10781 	typedef typename size_trait_type::instance_type size_instance_type;
10782 
10783 	typedef void set_return_type;
10784 
10785 	enum { size_entity = 3 };
10786 	enum {
10787 		first_position = 0,
10788 		second_position = first_size,
10789 		third_position = first_size + second_size
10790 	};
10791 
10792 	enum {
10793 		first_mask = (1 << first_size)-1,
10794 		second_mask = (1 << second_size)-1,
10795 		third_mask = (1 << third_size)-1
10796 	};
10797 
initcolor::_internal::utility::container::pack310798 	static set_return_type init(input_type container, index_input_const_type index, component_input_const_type value) {
10799 		this_type::set(container, index, value);
10800 	}
10801 
10802 	template< index_instance_type index >
initcolor::_internal::utility::container::pack310803 	static set_return_type init(input_type container, component_input_const_type value) {
10804 		this_type:: template set<index>(container, value);
10805 	}
10806 
getcolor::_internal::utility::container::pack310807 	static component_return_const_type get(model_type container, index_input_const_type index) {
10808 		switch(index) {
10809 		default:
10810 		case(0):
10811 			return ((container >> (first_position)) & first_mask);
10812 		case(1):
10813 			return ((container >> (second_position)) & second_mask);
10814 		case(2):
10815 			return ((container >> (third_position)) & third_mask);
10816 		}
10817 		return 0;
10818 	}
10819 
10820 	template< index_instance_type index >
getcolor::_internal::utility::container::pack310821 	static component_return_const_type get(model_type container) {
10822 		switch(index) {
10823 		case(0):
10824 			return ((container >> (first_position)) & first_mask);
10825 		case(1):
10826 			return ((container >> (second_position)) & second_mask);
10827 		case(2):
10828 			return ((container >> (third_position)) & third_mask);
10829 		}
10830 		return 0;
10831 	}
10832 
setcolor::_internal::utility::container::pack310833 	static set_return_type set(input_type container, index_input_const_type index, component_input_const_type value) {
10834 		switch(index) {
10835 		default:
10836 		case(0) :
10837 			container = (container & ~(first_mask << (first_position))) | (((instance_type)value) << (first_position));
10838 			break;
10839 		case(1) :
10840 			container = (container & ~(second_mask << (second_position))) | (((instance_type)value) << (second_position));
10841 			break;
10842 		case(2) :
10843 			container = (container & ~(third_mask << (third_position))) | (((instance_type)value) << (third_position));
10844 			break;
10845 		}
10846 	}
10847 
10848 	template< index_instance_type index >
setcolor::_internal::utility::container::pack310849 	static set_return_type set(input_type container, component_input_const_type value) {
10850 		switch(index) {
10851 		case(0) :
10852 			container = (container & ~(first_mask << (first_position))) | (((instance_type)value) << (first_position));
10853 			break;
10854 		case(1) :
10855 			container = (container & ~(second_mask << (second_position))) | (((instance_type)value) << (second_position));
10856 			break;
10857 		case(2) :
10858 			container = (container & ~(third_mask << (third_position))) | (((instance_type)value) << (third_position));
10859 			break;
10860 		}
10861 	}
10862 
sizecolor::_internal::utility::container::pack310863 	static size_return_image_type size() {
10864 		static const size_instance_type local_length = size_entity;
10865 		return local_length;
10866 	}
10867 };
10868 
10869 template< typename container_name, typename component_name, unsigned first_size, unsigned second_size, unsigned third_size >
10870 using pack3_N_N_t = ::color::_internal::utility::container::pack3< container_name, component_name, unsigned, first_size, second_size, third_size >;
10871 
10872 template< unsigned first_size, unsigned second_size, unsigned third_size >
10873 using pack3_8_8_t = ::color::_internal::utility::container::pack3_N_N_t< std::uint8_t, std::uint8_t, first_size, second_size, third_size >;
10874 
10875 template< unsigned first_size, unsigned second_size, unsigned third_size >
10876 using pack3_16_8_t = ::color::_internal::utility::container::pack3_N_N_t< std::uint16_t, std::uint8_t, first_size, second_size, third_size >;
10877 
10878 template< unsigned first_size, unsigned second_size, unsigned third_size >
10879 using pack3_32_16_t = ::color::_internal::utility::container::pack3_N_N_t< std::uint32_t, std::uint16_t, first_size, second_size, third_size >;
10880 
10881 template< unsigned first_size, unsigned second_size, unsigned third_size >
10882 using pack3_64_16_t = ::color::_internal::utility::container::pack3_N_N_t< std::uint64_t, std::uint16_t, first_size, second_size, third_size >;
10883 
10884 template< unsigned first_size, unsigned second_size, unsigned third_size >
10885 using pack3_64_32_t = ::color::_internal::utility::container::pack3_N_N_t< std::uint64_t, std::uint32_t, first_size, second_size, third_size >;
10886 
10887 using split233_t = ::color::_internal::utility::container::pack3_8_8_t< 2, 3, 3 >;
10888 using split323_t = ::color::_internal::utility::container::pack3_8_8_t< 3, 2, 3 >;
10889 using split332_t = ::color::_internal::utility::container::pack3_8_8_t< 3, 3, 2 >;
10890 
10891 using split422_t = ::color::_internal::utility::container::pack3_8_8_t< 4, 2, 2 >;
10892 using split242_t = ::color::_internal::utility::container::pack3_8_8_t< 2, 4, 2 >;
10893 using split224_t = ::color::_internal::utility::container::pack3_8_8_t< 2, 2, 4 >;
10894 
10895 using split655_t = ::color::_internal::utility::container::pack3_16_8_t< 6, 5, 5 >;
10896 using split565_t = ::color::_internal::utility::container::pack3_16_8_t< 5, 6, 5 >;
10897 using split556_t = ::color::_internal::utility::container::pack3_16_8_t< 5, 5, 6 >;
10898 
10899 }
10900 }
10901 }
10902 }
10903 
10904 namespace color {
10905 namespace trait {
10906 namespace _internal {
10907 namespace rgb {
10908 
10909 template< unsigned size_size >
10910 struct pick_container3 {
10911 	typedef ::color::type::error_t container_type;
10912 };
10913 
10914 template<>
10915 struct pick_container3<8> {
10916 	template< unsigned first_size, unsigned second_size, unsigned third_size >
10917 	using container_type = ::color::_internal::utility::container::pack3_8_8_t< first_size, second_size, third_size >;
10918 };
10919 
10920 template<>
10921 struct pick_container3<16> {
10922 	template< unsigned first_size, unsigned second_size, unsigned third_size >
10923 	using container_type = ::color::_internal::utility::container::pack3_16_8_t< first_size, second_size, third_size >;
10924 };
10925 
10926 template<>
10927 struct pick_container3<32> {
10928 	template< unsigned first_size, unsigned second_size, unsigned third_size >
10929 	using container_type = ::color::_internal::utility::container::pack3_32_16_t< first_size, second_size, third_size >;
10930 };
10931 
10932 template<>
10933 struct pick_container3<64> {
10934 	template< unsigned first_size, unsigned second_size, unsigned third_size >
10935 	using container_type = ::color::_internal::utility::container::pack3_64_32_t< first_size, second_size, third_size >;
10936 };
10937 
10938 }
10939 }
10940 
10941 template
10942 <
10943 	unsigned first_index, unsigned first_size,
10944 	unsigned second_index, unsigned second_size,
10945 	unsigned third_index, unsigned third_size
10946 	>
10947 struct container< ::color::category::rgb< ::color::category::_internal::rgb_scramble< ::color::type::pack3< first_size, second_size, third_size >, first_index, second_index, third_index > > >
10948 	: public ::color::trait::_internal::rgb::pick_container3< first_size + second_size + third_size >:: template container_type<first_size, second_size, third_size> {
10949 };
10950 
10951 }
10952 }
10953 
10954 namespace color {
10955 namespace _internal {
10956 namespace utility {
10957 namespace container {
10958 
10959 template
10960 <
10961 	typename container_name,
10962 	typename component_name,
10963 	typename index_name
10964 	,unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size
10965 	>
10966 struct pack4 {
10967 public:
10968 	typedef container_name instance_type;
10969 	typedef component_name value_type;
10970 	typedef index_name index_type;
10971 
10972 	typedef ::color::_internal::utility::container::pack4< container_name, component_name, index_name, first_size, second_size, third_size, fourth_size > this_type;
10973 
10974 	typedef instance_type const const_type;
10975 	typedef instance_type const& return_image_type;
10976 	typedef instance_type & return_type;
10977 	typedef instance_type & return_original_type;
10978 	typedef instance_type const& model_type;
10979 	typedef instance_type & input_type;
10980 	typedef instance_type & output_type;
10981 
10982 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
10983 
10984 	typedef typename index_trait_type::instance_type index_instance_type;
10985 
10986 	typedef typename index_trait_type::model_type index_input_const_type;
10987 	typedef typename index_trait_type::return_image_type index_return_image_type;
10988 
10989 	typedef ::color::_internal::utility::type::traitP< value_type > component_trait_type;
10990 
10991 	typedef typename component_trait_type::instance_type component_type;
10992 	typedef typename component_trait_type::const_type component_const_type;
10993 	typedef typename component_trait_type::return_image_type component_return_const_type;
10994 	typedef typename component_trait_type::model_type component_input_const_type;
10995 
10996 	typedef ::color::_internal::utility::type::size< std::size_t > size_trait_type;
10997 
10998 	typedef typename size_trait_type::return_image_type size_return_image_type;
10999 	typedef typename size_trait_type::instance_type size_instance_type;
11000 
11001 	typedef void set_return_type;
11002 
11003 	enum { size_entity = 4 };
11004 	enum {
11005 		first_position = 0,
11006 		second_position = first_size,
11007 		third_position = first_size + second_size,
11008 		fourth_position = first_size + second_size + third_size
11009 	};
11010 
11011 	enum {
11012 		first_mask = (1 << first_size)-1,
11013 		second_mask = (1 << second_size)-1,
11014 		third_mask = (1 << third_size)-1,
11015 		fourth_mask = (1 << fourth_size)-1
11016 	};
11017 
initcolor::_internal::utility::container::pack411018 	static set_return_type init(input_type container, index_input_const_type index, component_input_const_type value) {
11019 		this_type::set(container, index, value);
11020 	}
11021 
11022 	template< index_instance_type index >
initcolor::_internal::utility::container::pack411023 	static set_return_type init(input_type container, component_input_const_type value) {
11024 		this_type:: template set<index>(container, value);
11025 	}
11026 
getcolor::_internal::utility::container::pack411027 	static component_return_const_type get(model_type container, index_input_const_type index) {
11028 		switch(index) {
11029 		default:
11030 		case(0):
11031 			return ((container >> (first_position)) & first_mask);
11032 		case(1):
11033 			return ((container >> (second_position)) & second_mask);
11034 		case(2):
11035 			return ((container >> (third_position)) & third_mask);
11036 		case(3):
11037 			return ((container >> (fourth_position)) & fourth_mask);
11038 		}
11039 		return 0;
11040 	}
11041 
11042 	template< index_instance_type index >
getcolor::_internal::utility::container::pack411043 	static component_return_const_type get(model_type container) {
11044 		switch(index) {
11045 		case(0):
11046 			return ((container >> (first_position)) & first_mask);
11047 		case(1):
11048 			return ((container >> (second_position)) & second_mask);
11049 		case(2):
11050 			return ((container >> (third_position)) & third_mask);
11051 		case(3):
11052 			return ((container >> (fourth_position)) & fourth_mask);
11053 		}
11054 		return 0;
11055 	}
11056 
setcolor::_internal::utility::container::pack411057 	static set_return_type set(input_type container, index_input_const_type index, component_input_const_type value) {
11058 		switch(index) {
11059 		default:
11060 		case(0) :
11061 			container = (container & ~(first_mask << (first_position))) | (((instance_type)value) << (first_position));
11062 			break;
11063 		case(1) :
11064 			container = (container & ~(second_mask << (second_position))) | (((instance_type)value) << (second_position));
11065 			break;
11066 		case(2) :
11067 			container = (container & ~(third_mask << (third_position))) | (((instance_type)value) << (third_position));
11068 			break;
11069 		case(3) :
11070 			container = (container & ~(fourth_mask << (fourth_position))) | (((instance_type)value) << (fourth_position));
11071 			break;
11072 		}
11073 	}
11074 
11075 	template< index_instance_type index >
setcolor::_internal::utility::container::pack411076 	static set_return_type set(input_type container, component_input_const_type value) {
11077 		switch(index) {
11078 		case(0) :
11079 			container = (container & ~(first_mask << (first_position))) | (((instance_type)value) << (first_position));
11080 			break;
11081 		case(1) :
11082 			container = (container & ~(second_mask << (second_position))) | (((instance_type)value) << (second_position));
11083 			break;
11084 		case(2) :
11085 			container = (container & ~(third_mask << (third_position))) | (((instance_type)value) << (third_position));
11086 			break;
11087 		case(3) :
11088 			container = (container & ~(fourth_mask << (fourth_position))) | (((instance_type)value) << (fourth_position));
11089 			break;
11090 		}
11091 	}
11092 
sizecolor::_internal::utility::container::pack411093 	static size_return_image_type size() {
11094 		static const size_instance_type local_length = size_entity;
11095 		return local_length;
11096 	}
11097 };
11098 
11099 template< typename container_name, typename component_name, unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11100 using pack4_N_N_t = ::color::_internal::utility::container::pack4< container_name, component_name, unsigned, first_size, second_size, third_size, fourth_size >;
11101 
11102 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11103 using pack4_8_8_t = ::color::_internal::utility::container::pack4_N_N_t< std::uint8_t, std::uint8_t, first_size, second_size, third_size, fourth_size >;
11104 
11105 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11106 using pack4_16_8_t = ::color::_internal::utility::container::pack4_N_N_t< std::uint16_t, std::uint8_t, first_size, second_size, third_size, fourth_size >;
11107 
11108 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11109 using pack4_32_8_t = ::color::_internal::utility::container::pack4_N_N_t< std::uint32_t, std::uint8_t, first_size, second_size, third_size, fourth_size >;
11110 
11111 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11112 using pack4_32_16_t = ::color::_internal::utility::container::pack4_N_N_t< std::uint32_t, std::uint16_t, first_size, second_size, third_size, fourth_size >;
11113 
11114 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11115 using pack4_64_16_t = ::color::_internal::utility::container::pack4_N_N_t< std::uint64_t, std::uint16_t, first_size, second_size, third_size, fourth_size >;
11116 
11117 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11118 using pack4_64_32_t = ::color::_internal::utility::container::pack4_N_N_t< std::uint64_t, std::uint32_t, first_size, second_size, third_size, fourth_size >;
11119 
11120 using split2222_t = ::color::_internal::utility::container::pack4_8_8_t< 2, 2, 2, 2 >;
11121 using split4444_t = ::color::_internal::utility::container::pack4_16_8_t< 4, 4, 4, 4 >;
11122 
11123 using split1555_t = ::color::_internal::utility::container::pack4_16_8_t< 1, 5, 5, 5 >;
11124 using split5551_t = ::color::_internal::utility::container::pack4_16_8_t< 5, 5, 5, 1 >;
11125 
11126 using split8888_t = ::color::_internal::utility::container::pack4_32_8_t< 8, 8, 8, 8 >;
11127 
11128 using split2AAA_t = ::color::_internal::utility::container::pack4_32_16_t< 2, 10, 10, 10 >;
11129 using splitAAA2_t = ::color::_internal::utility::container::pack4_32_16_t< 10, 10, 10, 2 >;
11130 
11131 using splitGGGG_t = ::color::_internal::utility::container::pack4_64_16_t< 16, 16, 16, 16 >;
11132 using splitIIIA_t = ::color::_internal::utility::container::pack4_64_16_t< 18, 18, 18, 10 >;
11133 using splitKKK6_t = ::color::_internal::utility::container::pack4_64_16_t< 20, 20, 20, 6 >;
11134 
11135 using splitAIII_t = ::color::_internal::utility::container::pack4_64_16_t< 10, 18, 18, 18 >;
11136 using split6KKK_t = ::color::_internal::utility::container::pack4_64_16_t< 6, 20, 20, 20 >;
11137 
11138 }
11139 }
11140 }
11141 }
11142 
11143 namespace color {
11144 namespace trait {
11145 
11146 namespace _internal {
11147 namespace rgb {
11148 
11149 template< unsigned size_size >
11150 struct pick_container4 {
11151 	typedef ::color::type::error_t container_type;
11152 };
11153 
11154 template<>
11155 struct pick_container4<8> {
11156 	template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11157 	using container_type = ::color::_internal::utility::container::pack4_8_8_t< first_size, second_size, third_size, fourth_size >;
11158 };
11159 
11160 template<>
11161 struct pick_container4<16> {
11162 	template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11163 	using container_type = ::color::_internal::utility::container::pack4_16_8_t< first_size, second_size, third_size, fourth_size >;
11164 };
11165 
11166 template<>
11167 struct pick_container4<32> {
11168 	template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11169 	using container_type = ::color::_internal::utility::container::pack4_32_16_t< first_size, second_size, third_size, fourth_size >;
11170 };
11171 
11172 template<>
11173 struct pick_container4<64> {
11174 	template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11175 	using container_type = ::color::_internal::utility::container::pack4_64_32_t< first_size, second_size, third_size, fourth_size >;
11176 };
11177 
11178 }
11179 }
11180 
11181 template
11182 <
11183 	unsigned first_index, unsigned first_size,
11184 	unsigned second_index, unsigned second_size,
11185 	unsigned third_index, unsigned third_size,
11186 	unsigned fourth_index, unsigned fourth_size
11187 	>
11188 struct container< ::color::category::rgb< ::color::category::_internal::rgba_scramble< ::color::type::pack4< first_size, second_size, third_size, fourth_size >, first_index, second_index, third_index, fourth_index > > >
11189 	: public ::color::trait::_internal::rgb::pick_container4< first_size + second_size + third_size + fourth_size >:: template container_type<first_size, second_size, third_size, fourth_size> {
11190 };
11191 
11192 }
11193 }
11194 
11195 namespace color {
11196 namespace _internal {
11197 
11198 template< typename type_name >
11199 struct pick_rgb {
11200 	typedef ::color::category::rgb_error category_type;
11201 };
11202 
11203 template<> struct pick_rgb< std::uint8_t > {
11204 	typedef ::color::category::rgb_uint8 category_type;
11205 };
11206 template<> struct pick_rgb< std::uint16_t > {
11207 	typedef ::color::category::rgb_uint16 category_type;
11208 };
11209 template<> struct pick_rgb< std::uint32_t > {
11210 	typedef ::color::category::rgb_uint32 category_type;
11211 };
11212 template<> struct pick_rgb< std::uint64_t > {
11213 	typedef ::color::category::rgb_uint64 category_type;
11214 };
11215 template<> struct pick_rgb< float > {
11216 	typedef ::color::category::rgb_float category_type;
11217 };
11218 template<> struct pick_rgb< double > {
11219 	typedef ::color::category::rgb_double category_type;
11220 };
11221 template<> struct pick_rgb< long double > {
11222 	typedef ::color::category::rgb_ldouble category_type;
11223 };
11224 
11225 template< unsigned first_size, unsigned second_size, unsigned third_size >
11226 struct pick_rgb< ::color::type::pack3< first_size, second_size, third_size > > {
11227 	typedef ::color::category::rgb_pack< first_size, second_size, third_size > category_type;
11228 };
11229 
11230 template< typename type_name >
11231 struct pick_rgba {
11232 	typedef ::color::category::rgba_error category_type;
11233 };
11234 
11235 template<> struct pick_rgba< std::uint8_t > {
11236 	typedef ::color::category::rgba_uint8 category_type;
11237 };
11238 template<> struct pick_rgba< std::uint16_t > {
11239 	typedef ::color::category::rgba_uint16 category_type;
11240 };
11241 template<> struct pick_rgba< std::uint32_t > {
11242 	typedef ::color::category::rgba_uint32 category_type;
11243 };
11244 template<> struct pick_rgba< std::uint64_t > {
11245 	typedef ::color::category::rgba_uint64 category_type;
11246 };
11247 template<> struct pick_rgba< float > {
11248 	typedef ::color::category::rgba_float category_type;
11249 };
11250 template<> struct pick_rgba< double > {
11251 	typedef ::color::category::rgba_double category_type;
11252 };
11253 template<> struct pick_rgba< long double > {
11254 	typedef ::color::category::rgba_ldouble category_type;
11255 };
11256 
11257 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11258 struct pick_rgba< ::color::type::pack4< first_size, second_size, third_size, fourth_size > > {
11259 	typedef ::color::category::rgba_pack< first_size, second_size, third_size, fourth_size > category_type;
11260 };
11261 
11262 template< typename type_name >
11263 struct pick_argb {
11264 	typedef ::color::category::argb_error category_type;
11265 };
11266 
11267 template<> struct pick_argb< std::uint8_t > {
11268 	typedef ::color::category::argb_uint8 category_type;
11269 };
11270 template<> struct pick_argb< std::uint16_t > {
11271 	typedef ::color::category::argb_uint16 category_type;
11272 };
11273 template<> struct pick_argb< std::uint32_t > {
11274 	typedef ::color::category::argb_uint32 category_type;
11275 };
11276 template<> struct pick_argb< std::uint64_t > {
11277 	typedef ::color::category::argb_uint64 category_type;
11278 };
11279 template<> struct pick_argb< float > {
11280 	typedef ::color::category::argb_float category_type;
11281 };
11282 template<> struct pick_argb< double > {
11283 	typedef ::color::category::argb_double category_type;
11284 };
11285 template<> struct pick_argb< long double > {
11286 	typedef ::color::category::argb_ldouble category_type;
11287 };
11288 
11289 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11290 struct pick_argb< ::color::type::pack4< first_size, second_size, third_size, fourth_size > > {
11291 	typedef ::color::category::argb_pack< first_size, second_size, third_size, fourth_size > category_type;
11292 };
11293 
11294 template< typename type_name >
11295 struct pick_bgr {
11296 	typedef ::color::category::bgr_error category_type;
11297 };
11298 
11299 template<> struct pick_bgr< std::uint8_t > {
11300 	typedef ::color::category::bgr_uint8 category_type;
11301 };
11302 template<> struct pick_bgr< std::uint16_t > {
11303 	typedef ::color::category::bgr_uint16 category_type;
11304 };
11305 template<> struct pick_bgr< std::uint32_t > {
11306 	typedef ::color::category::bgr_uint32 category_type;
11307 };
11308 template<> struct pick_bgr< std::uint64_t > {
11309 	typedef ::color::category::bgr_uint64 category_type;
11310 };
11311 template<> struct pick_bgr< float > {
11312 	typedef ::color::category::bgr_float category_type;
11313 };
11314 template<> struct pick_bgr< double > {
11315 	typedef ::color::category::bgr_double category_type;
11316 };
11317 template<> struct pick_bgr< long double > {
11318 	typedef ::color::category::bgr_ldouble category_type;
11319 };
11320 
11321 template< unsigned first_size, unsigned second_size, unsigned third_size >
11322 struct pick_bgr< ::color::type::pack3< first_size, second_size, third_size > > {
11323 	typedef ::color::category::bgr_pack< first_size, second_size, third_size > category_type;
11324 };
11325 
11326 template< typename type_name >
11327 struct pick_bgra {
11328 	typedef ::color::category::bgra_error category_type;
11329 };
11330 
11331 template<> struct pick_bgra< std::uint8_t > {
11332 	typedef ::color::category::bgra_uint8 category_type;
11333 };
11334 template<> struct pick_bgra< std::uint16_t > {
11335 	typedef ::color::category::bgra_uint16 category_type;
11336 };
11337 template<> struct pick_bgra< std::uint32_t > {
11338 	typedef ::color::category::bgra_uint32 category_type;
11339 };
11340 template<> struct pick_bgra< std::uint64_t > {
11341 	typedef ::color::category::bgra_uint64 category_type;
11342 };
11343 template<> struct pick_bgra< float > {
11344 	typedef ::color::category::bgra_float category_type;
11345 };
11346 template<> struct pick_bgra< double > {
11347 	typedef ::color::category::bgra_double category_type;
11348 };
11349 template<> struct pick_bgra< long double > {
11350 	typedef ::color::category::bgra_ldouble category_type;
11351 };
11352 
11353 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11354 struct pick_bgra< ::color::type::pack4< first_size, second_size, third_size, fourth_size > > {
11355 	typedef ::color::category::bgra_pack< first_size, second_size, third_size, fourth_size > category_type;
11356 };
11357 
11358 template< typename type_name >
11359 struct pick_abgr {
11360 	typedef ::color::category::abgr_error category_type;
11361 };
11362 
11363 template<> struct pick_abgr< std::uint8_t > {
11364 	typedef ::color::category::abgr_uint8 category_type;
11365 };
11366 template<> struct pick_abgr< std::uint16_t > {
11367 	typedef ::color::category::abgr_uint16 category_type;
11368 };
11369 template<> struct pick_abgr< std::uint32_t > {
11370 	typedef ::color::category::abgr_uint32 category_type;
11371 };
11372 template<> struct pick_abgr< std::uint64_t > {
11373 	typedef ::color::category::abgr_uint64 category_type;
11374 };
11375 template<> struct pick_abgr< float > {
11376 	typedef ::color::category::abgr_float category_type;
11377 };
11378 template<> struct pick_abgr< double > {
11379 	typedef ::color::category::abgr_double category_type;
11380 };
11381 template<> struct pick_abgr< long double > {
11382 	typedef ::color::category::abgr_ldouble category_type;
11383 };
11384 
11385 template< unsigned first_size, unsigned second_size, unsigned third_size, unsigned fourth_size >
11386 struct pick_abgr< ::color::type::pack4< first_size, second_size, third_size, fourth_size > > {
11387 	typedef ::color::category::abgr_pack< first_size, second_size, third_size, fourth_size > category_type;
11388 };
11389 
11390 }
11391 
11392 template< typename type_name >
11393 using rgb = ::color::model< typename ::color::_internal::pick_rgb< type_name >::category_type >;
11394 
11395 template< typename type_name >
11396 using rgba = ::color::model< typename ::color::_internal::pick_rgba< type_name >::category_type >;
11397 
11398 template< typename type_name >
11399 using argb = ::color::model< typename ::color::_internal::pick_argb< type_name >::category_type >;
11400 
11401 template< typename type_name >
11402 using bgr = ::color::model< typename ::color::_internal::pick_bgr< type_name >::category_type >;
11403 
11404 template< typename type_name >
11405 using bgra = ::color::model< typename ::color::_internal::pick_bgra< type_name >::category_type >;
11406 
11407 template< typename type_name >
11408 using abgr = ::color::model< typename ::color::_internal::pick_abgr< type_name >::category_type >;
11409 
11410 }
11411 
11412 namespace color {
11413 namespace get {
11414 
11415 namespace constant {
11416 namespace rgb {
11417 namespace hue {
11418 
11419 enum formula_enum {
11420 	error_entity
11421 	,hexagon_entity
11422 	,polar_atan2_entity
11423 	,polar_acos_entity
11424 	,polar_entity = polar_atan2_entity
11425 };
11426 
11427 }
11428 }
11429 }
11430 
11431 namespace _internal {
11432 namespace rgb {
11433 namespace hue {
11434 
11435 template
11436 <
11437 	typename category_name
11438 	,enum ::color::get::constant::rgb::hue::formula_enum formula_number
11439 	>
11440 struct usher {
11441 	typedef category_name category_type;
11442 	typedef ::color::model<category_type> model_type;
11443 
11444 	typedef typename ::color::trait::component< category_name >::return_type return_type;
11445 
processcolor::get::_internal::rgb::hue::usher11446 	static return_type process(model_type const& color_parameter) {
11447 		return color_parameter.template get<0>();
11448 	}
11449 };
11450 
11451 template< typename tag_name >
11452 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::hue::hexagon_entity > {
11453 	typedef ::color::category::rgb< tag_name > category_type;
11454 	typedef ::color::model< category_type > model_type;
11455 
11456 	typedef typename ::color::trait::scalar<category_type> scalar_trait_type;
11457 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
11458 
11459 	typedef typename ::color::trait::index<category_type>::instance_type index_type;
11460 
11461 	typedef typename ::color::trait::component< category_type >::return_type return_type;
11462 
11463 	typedef ::color::_internal::normalize< category_type > normalize_type;
11464 	typedef ::color::_internal::diverse< category_type > diverse_type;
11465 
11466 	typedef ::color::trait::container<category_type> container_trait_type;
11467 	typedef ::color::constant::generic< category_type > generic_constant_type;
11468 
11469 	typedef usher< category_type, ::color::get::constant::rgb::hue::hexagon_entity > this_type;
11470 
11471 	enum {
11472 		red_p = ::color::place::_internal::red<category_type>::position_enum
11473 		,green_p = ::color::place::_internal::green<category_type>::position_enum
11474 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
11475 	};
11476 
processcolor::get::_internal::rgb::hue::usher11477 	scalar_type process(scalar_type const& r, scalar_type const& g, scalar_type const& b) {
11478 		m_loValue = r;
11479 		m_midValue = g;
11480 		m_hiValue = b;
11481 		m_loIndex = 0;
11482 		m_midIndex = 1;
11483 		m_hiIndex = 2;
11484 		if(m_midValue < m_loValue) {
11485 			std::swap(m_midValue, m_loValue);
11486 			std::swap(m_midIndex, m_loIndex);
11487 		}
11488 		if(m_hiValue < m_midValue) {
11489 			std::swap(m_hiValue, m_midValue);
11490 			std::swap(m_hiIndex, m_midIndex);
11491 		}
11492 		if(m_midValue < m_loValue) {
11493 			std::swap(m_midValue, m_loValue);
11494 			std::swap(m_midIndex, m_loIndex);
11495 		}
11496 		m_delta = m_hiValue - m_loValue;
11497 		scalar_type h = 0;
11498 		if(true == scalar_trait_type::is_small(m_delta)) {
11499 			return h;
11500 		}
11501 		switch(m_hiIndex) {
11502 		case(0):
11503 			h = (scalar_type(60)/scalar_type(360)) * (g - b) / m_delta + (g < b ? scalar_type(1) : scalar_type(0));
11504 			break;
11505 		case(1):
11506 			h = (scalar_type(60)/scalar_type(360)) * (b - r) / m_delta + (scalar_type(120)/scalar_type(360));
11507 			break;
11508 		case(2):
11509 			h = (scalar_type(60)/scalar_type(360)) * (r - g) / m_delta + (scalar_type(240)/scalar_type(360));
11510 			break;
11511 		}
11512 		return h * generic_constant_type::two_pi();
11513 	}
11514 
processcolor::get::_internal::rgb::hue::usher11515 	static return_type process(model_type const& color_parameter) {
11516 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p>());
11517 		scalar_type g = normalize_type::template process<green_p>(color_parameter.template get<green_p>());
11518 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p>());
11519 		this_type t;
11520 		return diverse_type::template process< red_p >(t.process(r, g, b) / generic_constant_type::two_pi());
11521 	}
11522 
11523 	scalar_type m_loValue;
11524 	index_type m_loIndex;
11525 
11526 	scalar_type m_midValue;
11527 	index_type m_midIndex;
11528 
11529 	scalar_type m_hiValue;
11530 	index_type m_hiIndex;
11531 
11532 	scalar_type m_delta;
11533 };
11534 
11535 template< typename tag_name >
11536 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::hue::polar_atan2_entity > {
11537 	typedef ::color::category::rgb< tag_name > category_type;
11538 	typedef ::color::model< category_type > model_type;
11539 
11540 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
11541 
11542 	typedef typename ::color::trait::component< category_type >::return_type return_type;
11543 
11544 	typedef ::color::_internal::normalize< category_type > normalize_type;
11545 	typedef ::color::_internal::diverse< category_type > diverse_type;
11546 
11547 	typedef ::color::constant::generic< category_type > generic_constant_type;
11548 
11549 	enum {
11550 		red_p = ::color::place::_internal::red<category_type>::position_enum
11551 		,green_p = ::color::place::_internal::green<category_type>::position_enum
11552 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
11553 	};
11554 
processcolor::get::_internal::rgb::hue::usher11555 	static scalar_type process(scalar_type const& r, scalar_type const& g, scalar_type const& b) {
11556 		scalar_type h = 0;
11557 		scalar_type c1 = scalar_type(2) * r - g - b ;
11558 		scalar_type c2 = (g - b) * generic_constant_type::sqrt_3();
11559 		scalar_type thetaX = atan2(c2, c1);
11560 		if(thetaX < 0) {
11561 			thetaX += generic_constant_type::two_pi();
11562 		}
11563 		h = thetaX;
11564 		return h;
11565 	}
11566 
processcolor::get::_internal::rgb::hue::usher11567 	static return_type process(model_type const& color_parameter) {
11568 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p>());
11569 		scalar_type g = normalize_type::template process<green_p>(color_parameter.template get<green_p>());
11570 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p>());
11571 		return diverse_type::template process< red_p >(process(r, g, b) / generic_constant_type::two_pi());
11572 	}
11573 
11574 };
11575 
11576 template< typename tag_name >
11577 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::hue::polar_acos_entity > {
11578 	typedef ::color::category::rgb< tag_name > category_type;
11579 	typedef ::color::model< category_type > model_type;
11580 
11581 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
11582 
11583 	typedef typename ::color::trait::component< category_type >::return_type return_type;
11584 
11585 	typedef ::color::_internal::normalize< category_type > normalize_type;
11586 	typedef ::color::_internal::diverse< category_type > diverse_type;
11587 
11588 	typedef ::color::constant::generic< category_type > generic_constant_type;
11589 
11590 	enum {
11591 		red_p = ::color::place::_internal::red<category_type>::position_enum
11592 		,green_p = ::color::place::_internal::green<category_type>::position_enum
11593 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
11594 	};
11595 
processcolor::get::_internal::rgb::hue::usher11596 	static scalar_type process(scalar_type const& r, scalar_type const& g, scalar_type const& b) {
11597 		scalar_type h = 0;
11598 		scalar_type alpha = ((r-g) + (r- b)) * scalar_type(0.5);
11599 		scalar_type beta = (r-g)*(r-g) + (r-b)*(g-b) ;
11600 		beta = sqrt(beta);
11601 		scalar_type thetaA = acos(alpha / beta);
11602 		if(b > g) {
11603 			thetaA = generic_constant_type::two_pi() - thetaA;
11604 		}
11605 		h = thetaA;
11606 		return h;
11607 	}
11608 
processcolor::get::_internal::rgb::hue::usher11609 	static return_type process(model_type const& color_parameter) {
11610 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p>());
11611 		scalar_type g = normalize_type::template process<green_p>(color_parameter.template get<green_p>());
11612 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p>());
11613 		return diverse_type::template process< red_p >(process(r, g, b) / generic_constant_type::two_pi());
11614 	}
11615 };
11616 
11617 }
11618 }
11619 }
11620 
11621 template
11622 <
11623 	enum ::color::get::constant::rgb::hue::formula_enum formula_number = ::color::get::constant::rgb::hue::polar_entity
11624 ,typename tag_name
11625 >
11626 inline
11627 typename ::color::model< ::color::category::rgb< tag_name> >::component_const_type
hue(::color::model<::color::category::rgb<tag_name>> const & color_parameter)11628 hue
11629 (
11630 	::color::model< ::color::category::rgb< tag_name> > const& color_parameter
11631 ) {
11632 	typedef ::color::get::_internal::rgb::hue::usher< ::color::category::rgb< tag_name >, formula_number > usher_type;
11633 	return usher_type::process(color_parameter);
11634 }
11635 }
11636 }
11637 
11638 namespace color {
11639 namespace get {
11640 
11641 namespace constant {
11642 namespace rgb {
11643 namespace red {
11644 
11645 enum formula_enum {
11646 	channel_entity
11647 	,hsl_star_entity
11648 	,hue_angle_entity
11649 };
11650 
11651 }
11652 }
11653 }
11654 
11655 namespace _internal {
11656 namespace rgb {
11657 namespace red {
11658 
11659 template
11660 <
11661 	typename category_name
11662 	,enum ::color::get::constant::rgb::red::formula_enum formula_number = ::color::get::constant::rgb::red::channel_entity
11663 	>
11664 struct usher {
11665 	typedef category_name category_type;
11666 
11667 	typedef ::color::model<category_type> model_type;
11668 	typedef typename ::color::trait::component< category_name >::return_type return_type;
11669 
11670 	enum {
11671 		red_p = ::color::place::_internal::red<category_type>::position_enum
11672 	};
11673 
processcolor::get::_internal::rgb::red::usher11674 	static return_type process(model_type const& color_parameter) {
11675 		return color_parameter.template get<red_p>();
11676 	}
11677 };
11678 
11679 template< typename tag_name >
11680 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::red::hsl_star_entity > {
11681 	typedef ::color::category::rgb< tag_name> category_type;
11682 	typedef ::color::model< category_type > model_type;
11683 
11684 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
11685 
11686 	typedef typename ::color::trait::component< category_type >::return_type return_type;
11687 
11688 	typedef ::color::_internal::diverse< category_type > diverse_type;
11689 	typedef ::color::_internal::normalize< category_type > normalize_type;
11690 
11691 	enum {
11692 		red_p = ::color::place::_internal::red<category_type>::position_enum
11693 		,green_p = ::color::place::_internal::green<category_type>::position_enum
11694 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
11695 	};
11696 
processcolor::get::_internal::rgb::red::usher11697 	static return_type process(model_type const& color_parameter) {
11698 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p >());
11699 		scalar_type g = normalize_type::template process<green_p>(color_parameter.template get<green_p>());
11700 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
11701 		scalar_type result;
11702 		while(true) {
11703 			if(g < b) {
11704 				result = (r - b)* (scalar_type(1) - (b - g));
11705 				break;
11706 			}
11707 			{
11708 				result = (r - g) * (scalar_type(1) - (g - b));
11709 				break;
11710 			}
11711 		}
11712 		return diverse_type::template process<red_p >(result);
11713 	}
11714 };
11715 
11716 template< typename tag_name >
11717 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::red::hue_angle_entity > {
11718 	typedef ::color::category::rgb< tag_name> category_type;
11719 	typedef ::color::model< category_type > model_type;
11720 
11721 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
11722 
11723 	typedef typename ::color::trait::component< category_type >::return_type return_type;
11724 
11725 	typedef ::color::_internal::diverse< category_type > diverse_type;
11726 	typedef ::color::_internal::normalize< category_type > normalize_type;
11727 
11728 	enum {
11729 		red_p = ::color::place::_internal::red<category_type>::position_enum
11730 
11731 	};
11732 
processcolor::get::_internal::rgb::red::usher11733 	static return_type process(model_type const& color_parameter) {
11734 		auto h = ::color::get::hue< ::color::get::constant::rgb::hue::polar_atan2_entity >(color_parameter);
11735 		scalar_type result = normalize_type::template process<red_p>(h);
11736 		if(result < scalar_type(0.5)) {
11737 			result = scalar_type(0.5) - result;
11738 		} else {
11739 			result = result - scalar_type(0.5);
11740 		}
11741 		return diverse_type::template process<red_p >(scalar_type(2) * result);
11742 	}
11743 };
11744 
11745 }
11746 }
11747 }
11748 
11749 template
11750 <
11751 	enum ::color::get::constant::rgb::red::formula_enum formula_number = ::color::get::constant::rgb::red::channel_entity
11752 ,typename tag_name
11753 >
11754 inline
11755 typename ::color::model< ::color::category::rgb< tag_name> >::component_const_type
red(::color::model<::color::category::rgb<tag_name>> const & color_parameter)11756 red
11757 (
11758 	::color::model< ::color::category::rgb< tag_name> > const& color_parameter
11759 ) {
11760 	return ::color::get::_internal::rgb::red::usher< ::color::category::rgb< tag_name >, formula_number >::process(color_parameter);
11761 }
11762 
11763 }
11764 }
11765 
11766 namespace color {
11767 namespace get {
11768 
11769 namespace constant {
11770 namespace rgb {
11771 namespace green {
11772 
11773 enum formula_enum {
11774 	channel_entity
11775 	,hsl_star_entity
11776 	,hue_angle_entity
11777 };
11778 
11779 }
11780 }
11781 }
11782 
11783 namespace _internal {
11784 namespace rgb {
11785 namespace green {
11786 
11787 template
11788 <
11789 	typename category_name
11790 	,enum ::color::get::constant::rgb::green::formula_enum formula_number = ::color::get::constant::rgb::green::channel_entity
11791 	>
11792 struct usher {
11793 	typedef category_name category_type;
11794 
11795 	typedef ::color::model<category_type> model_type;
11796 	typedef typename ::color::trait::component< category_name >::return_type return_type;
11797 
11798 	enum {
11799 		green_p = ::color::place::_internal::green<category_type>::position_enum
11800 	};
11801 
processcolor::get::_internal::rgb::green::usher11802 	static return_type process(model_type const& color_parameter) {
11803 		return color_parameter.template get<green_p>();
11804 	}
11805 };
11806 
11807 template< typename tag_name >
11808 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::green::hsl_star_entity > {
11809 	typedef ::color::category::rgb< tag_name> category_type;
11810 	typedef ::color::model< category_type > model_type;
11811 
11812 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
11813 
11814 	typedef typename ::color::trait::component< category_type >::return_type return_type;
11815 
11816 	typedef ::color::_internal::diverse< category_type > diverse_type;
11817 	typedef ::color::_internal::normalize< category_type > normalize_type;
11818 
11819 	enum {
11820 		red_p = ::color::place::_internal::red<category_type>::position_enum
11821 		,green_p = ::color::place::_internal::green<category_type>::position_enum
11822 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
11823 	};
11824 
processcolor::get::_internal::rgb::green::usher11825 	static return_type process(model_type const& color_parameter) {
11826 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p >());
11827 		scalar_type g = normalize_type::template process<green_p>(color_parameter.template get<green_p>());
11828 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
11829 		scalar_type result;
11830 		while(true) {
11831 			if(r < b) {
11832 				result = (g - b)* (scalar_type(1) - (b - r));
11833 				break;
11834 			}
11835 			{
11836 				result = (g - r)* (scalar_type(1) - (r - b));
11837 				break;
11838 			}
11839 		}
11840 		return diverse_type::template process<green_p >(result);
11841 	}
11842 };
11843 
11844 template< typename tag_name >
11845 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::green::hue_angle_entity > {
11846 	typedef ::color::category::rgb< tag_name> category_type;
11847 	typedef ::color::model< category_type > model_type;
11848 
11849 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
11850 
11851 	typedef typename ::color::trait::component< category_type >::return_type return_type;
11852 
11853 	typedef ::color::_internal::diverse< category_type > diverse_type;
11854 	typedef ::color::_internal::normalize< category_type > normalize_type;
11855 
11856 	enum {
11857 		red_p = ::color::place::_internal::red<category_type>::position_enum
11858 		,green_p = ::color::place::_internal::green<category_type>::position_enum
11859 	};
11860 
processcolor::get::_internal::rgb::green::usher11861 	static return_type process(model_type const& color_parameter) {
11862 		static const scalar_type pivot = scalar_type(1)/scalar_type(3);
11863 		auto h = ::color::get::hue< ::color::get::constant::rgb::hue::polar_atan2_entity >(color_parameter);
11864 		scalar_type result = normalize_type::template process<red_p>(h);
11865 		result -= pivot;
11866 		if(result < scalar_type(0)) {
11867 			result += scalar_type(1);
11868 		}
11869 		if(result < scalar_type(0.5)) {
11870 			result = scalar_type(0.5) - result;
11871 		} else {
11872 			result = result - scalar_type(0.5);
11873 		}
11874 		return diverse_type::template process<green_p >(scalar_type(2) * result);
11875 	}
11876 };
11877 
11878 }
11879 }
11880 }
11881 
11882 template
11883 <
11884 	enum ::color::get::constant::rgb::green::formula_enum formula_number = ::color::get::constant::rgb::green::channel_entity
11885 ,typename tag_name
11886 >
11887 inline
11888 typename ::color::model< ::color::category::rgb< tag_name> >::component_const_type
green(::color::model<::color::category::rgb<tag_name>> const & color_parameter)11889 green
11890 (
11891 	::color::model< ::color::category::rgb< tag_name> > const& color_parameter
11892 ) {
11893 	return ::color::get::_internal::rgb::green::usher< ::color::category::rgb< tag_name >, formula_number >::process(color_parameter);
11894 }
11895 
11896 }
11897 }
11898 
11899 namespace color {
11900 namespace get {
11901 
11902 namespace constant {
11903 namespace rgb {
11904 namespace blue {
11905 
11906 enum formula_enum {
11907 	channel_entity
11908 	,hsl_star_entity
11909 	,hue_angle_entity
11910 };
11911 
11912 }
11913 }
11914 }
11915 
11916 namespace _internal {
11917 namespace rgb {
11918 namespace blue {
11919 
11920 template
11921 <
11922 	typename category_name
11923 	,enum ::color::get::constant::rgb::blue::formula_enum formula_number = ::color::get::constant::rgb::blue::channel_entity
11924 	>
11925 struct usher {
11926 	typedef category_name category_type;
11927 
11928 	typedef ::color::model<category_type> model_type;
11929 	typedef typename ::color::trait::component< category_name >::return_type return_type;
11930 
11931 	enum {
11932 		blue_p = ::color::place::_internal::blue<category_type>::position_enum
11933 	};
11934 
processcolor::get::_internal::rgb::blue::usher11935 	static return_type process(model_type const& color_parameter) {
11936 		return color_parameter.template get<blue_p>();
11937 	}
11938 };
11939 
11940 template< typename tag_name >
11941 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::blue::hsl_star_entity > {
11942 	typedef ::color::category::rgb< tag_name> category_type;
11943 	typedef ::color::model< category_type > model_type;
11944 
11945 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
11946 
11947 	typedef typename ::color::trait::component< category_type >::return_type return_type;
11948 
11949 	typedef ::color::_internal::diverse< category_type > diverse_type;
11950 	typedef ::color::_internal::normalize< category_type > normalize_type;
11951 
11952 	enum {
11953 		red_p = ::color::place::_internal::red<category_type>::position_enum
11954 		,green_p = ::color::place::_internal::green<category_type>::position_enum
11955 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
11956 	};
11957 
processcolor::get::_internal::rgb::blue::usher11958 	static return_type process(model_type const& color_parameter) {
11959 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p >());
11960 		scalar_type g = normalize_type::template process<green_p>(color_parameter.template get<green_p>());
11961 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
11962 		scalar_type result;
11963 		while(true) {
11964 			if(r < g) {
11965 				result = (b - g) * (scalar_type(1) - (g - r));
11966 				break;
11967 			}
11968 			result = (b - r) * (scalar_type(1) - (r - g));
11969 			break;
11970 		}
11971 		return diverse_type::template process<blue_p >(result);
11972 	}
11973 };
11974 
11975 template< typename tag_name >
11976 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::blue::hue_angle_entity > {
11977 	typedef ::color::category::rgb< tag_name> category_type;
11978 	typedef ::color::model< category_type > model_type;
11979 
11980 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
11981 
11982 	typedef typename ::color::trait::component< category_type >::return_type return_type;
11983 
11984 	typedef ::color::_internal::diverse< category_type > diverse_type;
11985 	typedef ::color::_internal::normalize< category_type > normalize_type;
11986 
11987 	enum {
11988 		red_p = ::color::place::_internal::red<category_type>::position_enum
11989 
11990 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
11991 	};
11992 
processcolor::get::_internal::rgb::blue::usher11993 	static return_type process(model_type const& color_parameter) {
11994 		static const scalar_type pivot = scalar_type(2)/scalar_type(3);
11995 		auto h = ::color::get::hue< ::color::get::constant::rgb::hue::polar_atan2_entity >(color_parameter);
11996 		scalar_type result = normalize_type::template process<red_p>(h);
11997 		result -= pivot;
11998 		if(result < scalar_type(0)) {
11999 			result += scalar_type(1);
12000 		}
12001 		if(result < scalar_type(0.5)) {
12002 			result = scalar_type(0.5) - result;
12003 		} else {
12004 			result = result - scalar_type(0.5);
12005 		}
12006 		return diverse_type::template process<blue_p >(scalar_type(2) * result);
12007 	}
12008 };
12009 
12010 }
12011 }
12012 }
12013 
12014 template
12015 <
12016 	enum ::color::get::constant::rgb::blue::formula_enum formula_number = ::color::get::constant::rgb::blue::channel_entity
12017 ,typename tag_name
12018 >
12019 inline
12020 typename ::color::model< ::color::category::rgb< tag_name> >::component_const_type
blue(::color::model<::color::category::rgb<tag_name>> const & color_parameter)12021 blue
12022 (
12023 	::color::model< ::color::category::rgb< tag_name> > const& color_parameter
12024 ) {
12025 	return ::color::get::_internal::rgb::blue::usher< ::color::category::rgb< tag_name >, formula_number >::process(color_parameter);
12026 }
12027 
12028 }
12029 }
12030 
12031 namespace color {
12032 namespace get {
12033 
12034 namespace constant {
12035 namespace rgb {
12036 namespace cyan {
12037 
12038 enum formula_enum {
12039 	cmy_entity
12040 	,cmyk_entity
12041 	,hsl_star_entity
12042 };
12043 
12044 }
12045 }
12046 }
12047 
12048 namespace _internal {
12049 namespace rgb {
12050 namespace cyan {
12051 
12052 template
12053 <
12054 	typename category_name
12055 	,enum ::color::get::constant::rgb::cyan::formula_enum formula_number
12056 	>
12057 struct usher {
12058 	typedef category_name category_type;
12059 
12060 	typedef ::color::model<category_type> model_type;
12061 	typedef typename ::color::trait::component< category_name >::return_type return_type;
12062 
processcolor::get::_internal::rgb::cyan::usher12063 	static return_type process(model_type const& m) {
12064 		return m.template get<0>();
12065 	}
12066 };
12067 
12068 template< typename tag_name >
12069 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::cyan::cmy_entity > {
12070 	typedef ::color::category::rgb< tag_name > category_type;
12071 	typedef ::color::model< category_type > model_type;
12072 
12073 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12074 
12075 	typedef typename ::color::trait::component< category_type >::return_type return_type;
12076 
12077 	typedef ::color::_internal::diverse< category_type > diverse_type;
12078 	typedef ::color::_internal::normalize< category_type > normalize_type;
12079 
12080 	typedef ::color::operation::_internal::invert< category_type > invert_type;
12081 	enum {
12082 		red_p = ::color::place::_internal::red<category_type>::position_enum
12083 
12084 	};
12085 
processcolor::get::_internal::rgb::cyan::usher12086 	static return_type process(model_type const& color_parameter) {
12087 		return invert_type::template component< red_p >(color_parameter.template get<red_p>());
12088 	}
12089 };
12090 
12091 template< typename tag_name >
12092 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::cyan::cmyk_entity > {
12093 	typedef ::color::category::rgb< tag_name > category_type;
12094 	typedef ::color::model< category_type > model_type;
12095 
12096 	typedef typename ::color::trait::scalar<category_type> scalar_trait_type;
12097 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12098 
12099 	typedef typename ::color::trait::component< category_type >::return_type return_type;
12100 
12101 	typedef ::color::_internal::diverse< category_type > diverse_type;
12102 	typedef ::color::_internal::normalize< category_type > normalize_type;
12103 
12104 	enum {
12105 		red_p = ::color::place::_internal::red<category_type>::position_enum
12106 		,green_p = ::color::place::_internal::green<category_type>::position_enum
12107 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
12108 	};
12109 
processcolor::get::_internal::rgb::cyan::usher12110 	static return_type process(model_type const& color_parameter) {
12111 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p >());
12112 		scalar_type g = normalize_type::template process<green_p>(color_parameter.template get<green_p>());
12113 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
12114 		scalar_type max = std::max<scalar_type>({ r, g, b });
12115 		scalar_type c = scalar_type(0);
12116 		if(false == scalar_trait_type::is_small(max)) {
12117 			c = scalar_type(1) - r / max;
12118 		}
12119 		return diverse_type::template process< red_p >(c);
12120 	}
12121 };
12122 
12123 template< typename tag_name >
12124 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::cyan::hsl_star_entity > {
12125 	typedef ::color::category::rgb< tag_name> category_type;
12126 	typedef ::color::model< category_type > model_type;
12127 
12128 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12129 
12130 	typedef typename ::color::trait::component< category_type >::return_type return_type;
12131 
12132 	typedef ::color::_internal::diverse< category_type > diverse_type;
12133 	typedef ::color::_internal::normalize< category_type > normalize_type;
12134 
12135 	enum {
12136 		red_p = ::color::place::_internal::red<category_type>::position_enum
12137 		,green_p = ::color::place::_internal::green<category_type>::position_enum
12138 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
12139 	};
12140 
processcolor::get::_internal::rgb::cyan::usher12141 	static return_type process(model_type const& color_parameter) {
12142 		scalar_type c = scalar_type(1) - normalize_type::template process<red_p >(color_parameter.template get<red_p >());
12143 		scalar_type y = scalar_type(1) - normalize_type::template process<green_p>(color_parameter.template get<green_p>());
12144 		scalar_type m = scalar_type(1) - normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
12145 		scalar_type result;
12146 		while(true) {
12147 			if(m < y) {
12148 				result = (c - y) * (scalar_type(1) - (y - m));
12149 				break;
12150 			}
12151 			{
12152 				result = (c - m) * (scalar_type(1) - (m - y));
12153 				break;
12154 			}
12155 		}
12156 		return diverse_type::template process<red_p >(result);
12157 	}
12158 };
12159 
12160 }
12161 }
12162 }
12163 
12164 template
12165 <
12166 	enum ::color::get::constant::rgb::cyan::formula_enum formula_number = ::color::get::constant::rgb::cyan::cmy_entity
12167 ,typename tag_name
12168 >
12169 inline
12170 typename ::color::model< ::color::category::rgb< tag_name> >::component_const_type
cyan(::color::model<::color::category::rgb<tag_name>> const & color_parameter)12171 cyan
12172 (
12173 	::color::model< ::color::category::rgb< tag_name> > const& color_parameter
12174 ) {
12175 	return ::color::get::_internal::rgb::cyan::usher< ::color::category::rgb< tag_name >, formula_number >::process(color_parameter);
12176 }
12177 
12178 }
12179 }
12180 
12181 namespace color {
12182 namespace get {
12183 
12184 namespace constant {
12185 namespace rgb {
12186 namespace magenta {
12187 
12188 enum formula_enum {
12189 	cmy_entity
12190 	,cmyk_entity
12191 	,hsl_star_entity
12192 };
12193 
12194 }
12195 }
12196 }
12197 
12198 namespace _internal {
12199 namespace rgb {
12200 namespace magenta {
12201 
12202 template
12203 <
12204 	typename category_name
12205 	,enum ::color::get::constant::rgb::magenta::formula_enum formula_number
12206 	>
12207 struct usher {
12208 	typedef category_name category_type;
12209 
12210 	typedef ::color::model<category_type> model_type;
12211 	typedef typename ::color::trait::component< category_name >::return_type return_type;
12212 
processcolor::get::_internal::rgb::magenta::usher12213 	static return_type process(model_type const& m) {
12214 		return m.template get<0>();
12215 	}
12216 };
12217 
12218 template< typename tag_name >
12219 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::magenta::cmy_entity > {
12220 	typedef ::color::category::rgb< tag_name > category_type;
12221 	typedef ::color::model< category_type > model_type;
12222 
12223 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12224 
12225 	typedef typename ::color::trait::component< category_type >::return_type return_type;
12226 
12227 	typedef ::color::_internal::diverse< category_type > diverse_type;
12228 	typedef ::color::_internal::normalize< category_type > normalize_type;
12229 
12230 	typedef ::color::operation::_internal::invert< category_type > invert_type;
12231 	enum {
12232 
12233 		green_p = ::color::place::_internal::green<category_type>::position_enum
12234 	};
12235 
processcolor::get::_internal::rgb::magenta::usher12236 	static return_type process(model_type const& color_parameter) {
12237 		return invert_type::template component< green_p >(color_parameter.template get<green_p>());
12238 	}
12239 };
12240 
12241 template< typename tag_name >
12242 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::magenta::cmyk_entity > {
12243 	typedef ::color::category::rgb< tag_name > category_type;
12244 	typedef ::color::model< category_type > model_type;
12245 
12246 	typedef typename ::color::trait::scalar<category_type> scalar_trait_type;
12247 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12248 
12249 	typedef typename ::color::trait::component< category_type >::return_type return_type;
12250 
12251 	typedef ::color::_internal::diverse< category_type > diverse_type;
12252 	typedef ::color::_internal::normalize< category_type > normalize_type;
12253 
12254 	enum {
12255 		red_p = ::color::place::_internal::red<category_type>::position_enum
12256 		,green_p = ::color::place::_internal::green<category_type>::position_enum
12257 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
12258 	};
12259 
processcolor::get::_internal::rgb::magenta::usher12260 	static return_type process(model_type const& color_parameter) {
12261 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p >());
12262 		scalar_type g = normalize_type::template process<green_p>(color_parameter.template get<green_p>());
12263 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
12264 		scalar_type max = std::max<scalar_type>({ r, g, b });
12265 		scalar_type m = scalar_type(0);
12266 		if(false == scalar_trait_type::is_small(max)) {
12267 			m = scalar_type(1) - g / max;
12268 		}
12269 		return diverse_type::template process< green_p >(m);
12270 	}
12271 };
12272 
12273 template< typename tag_name >
12274 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::magenta::hsl_star_entity > {
12275 	typedef ::color::category::rgb< tag_name> category_type;
12276 	typedef ::color::model< category_type > model_type;
12277 
12278 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12279 
12280 	typedef typename ::color::trait::component< category_type >::return_type return_type;
12281 
12282 	typedef ::color::_internal::diverse< category_type > diverse_type;
12283 	typedef ::color::_internal::normalize< category_type > normalize_type;
12284 
12285 	enum {
12286 		red_p = ::color::place::_internal::red<category_type>::position_enum
12287 		,green_p = ::color::place::_internal::green<category_type>::position_enum
12288 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
12289 	};
12290 
processcolor::get::_internal::rgb::magenta::usher12291 	static return_type process(model_type const& color_parameter) {
12292 		scalar_type c = scalar_type(1) - normalize_type::template process<red_p >(color_parameter.template get<red_p >());
12293 		scalar_type m = scalar_type(1) - normalize_type::template process<green_p>(color_parameter.template get<green_p>());
12294 		scalar_type y = scalar_type(1) - normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
12295 		scalar_type result;
12296 		while(true) {
12297 			if(c < y) {
12298 				result = (m - y) * (scalar_type(1) - (y - c));
12299 				break;
12300 			}
12301 			{
12302 				result = (m - c) * (scalar_type(1) - (c - y));
12303 				break;
12304 			}
12305 		}
12306 		return diverse_type::template process<red_p >(result);
12307 	}
12308 };
12309 
12310 }
12311 }
12312 }
12313 
12314 template
12315 <
12316 	enum ::color::get::constant::rgb::magenta::formula_enum formula_number = ::color::get::constant::rgb::magenta::cmy_entity
12317 ,typename tag_name
12318 >
12319 inline
12320 typename ::color::model< ::color::category::rgb< tag_name> >::component_const_type
magenta(::color::model<::color::category::rgb<tag_name>> const & color_parameter)12321 magenta
12322 (
12323 	::color::model< ::color::category::rgb< tag_name> > const& color_parameter
12324 ) {
12325 	return ::color::get::_internal::rgb::magenta::usher< ::color::category::rgb< tag_name >, formula_number >::process(color_parameter);
12326 }
12327 
12328 }
12329 }
12330 
12331 namespace color {
12332 namespace get {
12333 
12334 namespace constant {
12335 namespace rgb {
12336 namespace yellow {
12337 
12338 enum formula_enum {
12339 	cmy_entity
12340 	,cmyk_entity
12341 	,hsl_star_entity
12342 };
12343 
12344 }
12345 }
12346 }
12347 
12348 namespace _internal {
12349 namespace rgb {
12350 namespace yellow {
12351 
12352 template
12353 <
12354 	typename category_name
12355 	,enum ::color::get::constant::rgb::yellow::formula_enum formula_number
12356 	>
12357 struct usher {
12358 	typedef category_name category_type;
12359 
12360 	typedef ::color::model<category_type> model_type;
12361 	typedef typename ::color::trait::component< category_name >::return_type return_type;
12362 
processcolor::get::_internal::rgb::yellow::usher12363 	static return_type process(model_type const& color_parameter) {
12364 		return color_parameter.template get<0>();
12365 	}
12366 };
12367 
12368 template< typename tag_name >
12369 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::yellow::cmy_entity > {
12370 	typedef ::color::category::rgb< tag_name > category_type;
12371 	typedef ::color::model< category_type > model_type;
12372 
12373 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12374 
12375 	typedef typename ::color::trait::component< category_type >::return_type return_type;
12376 
12377 	typedef ::color::_internal::diverse< category_type > diverse_type;
12378 	typedef ::color::_internal::normalize< category_type > normalize_type;
12379 
12380 	typedef ::color::operation::_internal::invert< category_type > invert_type;
12381 	enum {
12382 
12383 		blue_p = ::color::place::_internal::blue<category_type>::position_enum
12384 	};
12385 
processcolor::get::_internal::rgb::yellow::usher12386 	static return_type process(model_type const& color_parameter) {
12387 		return invert_type::template component< blue_p >(color_parameter.template get<blue_p>());
12388 	}
12389 };
12390 
12391 template< typename tag_name >
12392 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::yellow::cmyk_entity > {
12393 	typedef ::color::category::rgb< tag_name > category_type;
12394 	typedef ::color::model< category_type > model_type;
12395 
12396 	typedef typename ::color::trait::scalar<category_type> scalar_trait_type;
12397 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12398 
12399 	typedef typename ::color::trait::component< category_type >::return_type return_type;
12400 
12401 	typedef ::color::_internal::diverse< category_type > diverse_type;
12402 	typedef ::color::_internal::normalize< category_type > normalize_type;
12403 
12404 	enum {
12405 		red_p = ::color::place::_internal::red<category_type>::position_enum
12406 		,green_p = ::color::place::_internal::green<category_type>::position_enum
12407 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
12408 	};
12409 
processcolor::get::_internal::rgb::yellow::usher12410 	static return_type process(model_type const& color_parameter) {
12411 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p >());
12412 		scalar_type g = normalize_type::template process<green_p>(color_parameter.template get<green_p>());
12413 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
12414 		scalar_type max = std::max<scalar_type>({ r, g, b });
12415 		scalar_type y = scalar_type(0);
12416 		if(false == scalar_trait_type::is_small(max)) {
12417 			y = scalar_type(1) - b / max;
12418 		}
12419 		return diverse_type::template process< blue_p >(y);
12420 	}
12421 };
12422 
12423 template< typename tag_name >
12424 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::yellow::hsl_star_entity > {
12425 	typedef ::color::category::rgb< tag_name > category_type;
12426 	typedef ::color::model< category_type > model_type;
12427 
12428 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12429 
12430 	typedef typename ::color::trait::component< category_type >::return_type return_type;
12431 
12432 	typedef ::color::_internal::diverse< category_type > diverse_type;
12433 	typedef ::color::_internal::normalize< category_type > normalize_type;
12434 
12435 	enum {
12436 		red_p = ::color::place::_internal::red<category_type>::position_enum
12437 		,green_p = ::color::place::_internal::green<category_type>::position_enum
12438 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
12439 	};
12440 
processcolor::get::_internal::rgb::yellow::usher12441 	static return_type process(model_type const& color_parameter) {
12442 		scalar_type c = scalar_type(1) - normalize_type::template process<red_p >(color_parameter.template get<red_p >());
12443 		scalar_type m = scalar_type(1) - normalize_type::template process<green_p>(color_parameter.template get<green_p>());
12444 		scalar_type y = scalar_type(1) - normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
12445 		scalar_type result;
12446 		while(true) {
12447 			if(c < m) {
12448 				result = (y - m) * (scalar_type(1) - (m - c));
12449 				break;
12450 			}
12451 			{
12452 				result = (y - c) * (scalar_type(1) - (c - m));
12453 				break;
12454 			}
12455 		}
12456 		return diverse_type::template process<red_p >(result);
12457 	}
12458 };
12459 
12460 }
12461 }
12462 }
12463 
12464 template
12465 <
12466 	enum ::color::get::constant::rgb::yellow::formula_enum formula_number = ::color::get::constant::rgb::yellow::cmy_entity
12467 ,typename tag_name
12468 >
12469 inline
12470 typename ::color::model< ::color::category::rgb< tag_name> >::component_const_type
yellow(::color::model<::color::category::rgb<tag_name>> const & color_parameter)12471 yellow
12472 (
12473 	::color::model< ::color::category::rgb< tag_name> > const& color_parameter
12474 ) {
12475 	return ::color::get::_internal::rgb::yellow::usher< ::color::category::rgb< tag_name >, formula_number >::process(color_parameter);
12476 }
12477 
12478 }
12479 }
12480 
12481 namespace color {
12482 namespace get {
12483 
12484 namespace constant {
12485 namespace rgb {
12486 namespace black {
12487 
12488 enum formula_enum {
12489 	alvy_entity
12490 	,hsl_star_entity
12491 };
12492 
12493 }
12494 }
12495 }
12496 
12497 namespace _internal {
12498 namespace rgb {
12499 namespace black {
12500 
12501 template
12502 <
12503 	typename category_name
12504 	,enum ::color::get::constant::rgb::black::formula_enum formula_number
12505 	>
12506 struct usher {
12507 	typedef category_name category_type;
12508 
12509 	typedef ::color::model<category_type> model_type;
12510 	typedef typename ::color::trait::component< category_name >::return_type return_type;
12511 
processcolor::get::_internal::rgb::black::usher12512 	static return_type process(model_type const& m) {
12513 		return m.template get<0>();
12514 	}
12515 };
12516 
12517 template< typename tag_name >
12518 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::black::alvy_entity > {
12519 	typedef ::color::category::rgb< tag_name > category_type;
12520 	typedef ::color::model< category_type > model_type;
12521 
12522 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12523 
12524 	typedef typename ::color::trait::component< category_type >::return_type return_type;
12525 
12526 	typedef ::color::_internal::diverse< category_type > diverse_type;
12527 	typedef ::color::_internal::normalize< category_type > normalize_type;
12528 
12529 	enum {
12530 		red_p = ::color::place::_internal::red<category_type>::position_enum
12531 		,green_p = ::color::place::_internal::green<category_type>::position_enum
12532 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
12533 	};
12534 
processcolor::get::_internal::rgb::black::usher12535 	static return_type process(model_type const& color_parameter) {
12536 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p >());
12537 		scalar_type g = normalize_type::template process<green_p>(color_parameter.template get<green_p>());
12538 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
12539 		scalar_type hi = std::max<scalar_type>({r,g,b});
12540 		scalar_type black = scalar_type(1) - hi;
12541 		return diverse_type::template process<red_p >(black);
12542 	}
12543 };
12544 
12545 template< typename tag_name >
12546 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::black::hsl_star_entity > {
12547 	typedef ::color::category::rgb< tag_name > category_type;
12548 	typedef ::color::model< category_type > model_type;
12549 
12550 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12551 
12552 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
12553 
12554 	typedef typename ::color::trait::component< akin_type >::return_type return_type;
12555 
12556 	typedef ::color::_internal::diverse< akin_type > diverse_type;
12557 	typedef ::color::_internal::normalize< category_type > normalize_type;
12558 
12559 	enum {
12560 		red_p = ::color::place::_internal::red<category_type>::position_enum
12561 		,green_p = ::color::place::_internal::green<category_type>::position_enum
12562 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
12563 	};
12564 
processcolor::get::_internal::rgb::black::usher12565 	static return_type process(model_type const& color_parameter) {
12566 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p >());
12567 		scalar_type g = normalize_type::template process<green_p>(color_parameter.template get<green_p>());
12568 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
12569 		scalar_type lightnes = std::max<scalar_type>({r,g,b});
12570 		scalar_type saturation = std::max<scalar_type>({r,g,b}) - std::min<scalar_type>({r,g,b});
12571 		return diverse_type::template process<red_p >((scalar_type(1) - lightnes) * (scalar_type(1) - saturation));
12572 	}
12573 };
12574 
12575 }
12576 }
12577 }
12578 
12579 template
12580 <
12581 	enum ::color::get::constant::rgb::black::formula_enum formula_number = ::color::get::constant::rgb::black::alvy_entity
12582 ,typename tag_name
12583 >
12584 inline
12585 typename ::color::model< ::color::category::rgb< tag_name > >::component_const_type
black(::color::model<::color::category::rgb<tag_name>> const & color_parameter)12586 black
12587 (
12588 	::color::model< ::color::category::rgb< tag_name > > const& color_parameter
12589 ) {
12590 	return ::color::get::_internal::rgb::black::usher< ::color::category::rgb< tag_name >, formula_number >::process(color_parameter);
12591 }
12592 
12593 }
12594 }
12595 
12596 namespace color {
12597 namespace get {
12598 
12599 namespace constant {
12600 namespace rgb {
12601 namespace white {
12602 
12603 enum formula_enum {
12604 	alvy_entity
12605 	,hsl_star_entity
12606 };
12607 
12608 }
12609 }
12610 }
12611 
12612 namespace _internal {
12613 namespace rgb {
12614 namespace white {
12615 
12616 template
12617 <
12618 	typename category_name
12619 	,enum ::color::get::constant::rgb::white::formula_enum formula_number
12620 	>
12621 struct usher {
12622 	typedef category_name category_type;
12623 
12624 	typedef ::color::model<category_type> model_type;
12625 	typedef typename ::color::trait::component< category_name >::return_type return_type;
12626 
processcolor::get::_internal::rgb::white::usher12627 	static return_type process(model_type const& m) {
12628 		return m.template get<0>();
12629 	}
12630 };
12631 
12632 template< typename tag_name >
12633 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::white::alvy_entity > {
12634 	typedef ::color::category::rgb< tag_name > category_type;
12635 	typedef ::color::model< category_type > model_type;
12636 
12637 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12638 
12639 	typedef typename ::color::trait::component< category_type >::return_type return_type;
12640 
12641 	typedef ::color::_internal::diverse< category_type > diverse_type;
12642 	typedef ::color::_internal::normalize< category_type > normalize_type;
12643 
12644 	enum {
12645 		red_p = ::color::place::_internal::red<category_type>::position_enum
12646 		,green_p = ::color::place::_internal::green<category_type>::position_enum
12647 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
12648 	};
12649 
processcolor::get::_internal::rgb::white::usher12650 	static return_type process(model_type const& color_parameter) {
12651 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p >());
12652 		scalar_type g = normalize_type::template process<green_p>(color_parameter.template get<green_p>());
12653 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
12654 		scalar_type lo = std::min<scalar_type>({r,g,b});
12655 		scalar_type white = lo;
12656 		return diverse_type::template process<red_p >(white);
12657 	}
12658 };
12659 
12660 template< typename tag_name >
12661 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::white::hsl_star_entity > {
12662 	typedef ::color::category::rgb< tag_name > category_type;
12663 	typedef ::color::model< category_type > model_type;
12664 
12665 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12666 
12667 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
12668 
12669 	typedef typename ::color::trait::component< akin_type >::return_type return_type;
12670 
12671 	typedef ::color::_internal::diverse< akin_type > diverse_type;
12672 	typedef ::color::_internal::normalize< category_type > normalize_type;
12673 
12674 	enum {
12675 		red_p = ::color::place::_internal::red<category_type>::position_enum
12676 		,green_p = ::color::place::_internal::green<category_type>::position_enum
12677 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
12678 	};
12679 
processcolor::get::_internal::rgb::white::usher12680 	static return_type process(model_type const& color_parameter) {
12681 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p >());
12682 		scalar_type g = normalize_type::template process<green_p>(color_parameter.template get<green_p>());
12683 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
12684 		scalar_type lightnes = std::min<scalar_type>({r,g,b});
12685 		scalar_type saturation = std::max<scalar_type>({r,g,b}) - std::min<scalar_type>({r,g,b});
12686 		return diverse_type::template process<red_p >((lightnes)* (scalar_type(1) - saturation));
12687 	}
12688 };
12689 
12690 }
12691 }
12692 }
12693 
12694 template
12695 <
12696 	enum ::color::get::constant::rgb::white::formula_enum formula_number = ::color::get::constant::rgb::white::alvy_entity
12697 ,typename tag_name
12698 >
12699 inline
12700 typename ::color::model< ::color::category::rgb< tag_name > >::component_const_type
white(::color::model<::color::category::rgb<tag_name>> const & color_parameter)12701 white
12702 (
12703 	::color::model< ::color::category::rgb< tag_name > > const& color_parameter
12704 ) {
12705 	return ::color::get::_internal::rgb::white::usher< ::color::category::rgb< tag_name >, formula_number >::process(color_parameter);
12706 }
12707 
12708 }
12709 }
12710 
12711 namespace color {
12712 namespace get {
12713 
12714 template< typename value_name, unsigned red_position, unsigned green_position, unsigned blue_position, unsigned alpha_position >
12715 inline
12716 typename ::color::trait::component
12717 <
12718 ::color::category::rgb
12719 <
12720 ::color::category::_internal::rgba_scramble < value_name, red_position, green_position, blue_position, alpha_position >
12721 >
12722 >::return_image_type
alpha(::color::model<::color::category::rgb<::color::category::_internal::rgba_scramble<value_name,red_position,green_position,blue_position,alpha_position>>> const & color_parameter)12723 alpha(::color::model< ::color::category::rgb< ::color::category::_internal::rgba_scramble< value_name, red_position, green_position, blue_position, alpha_position > > > const& color_parameter) {
12724 	typedef ::color::category::_internal::rgba_scramble< value_name, red_position, green_position, blue_position, alpha_position > tag_type;
12725 	typedef ::color::category::rgb< tag_type > category_type;
12726 	enum { alpha_enum = ::color::place::_internal::alpha< category_type >::position_enum };
12727 	return color_parameter.template get< alpha_position >();
12728 }
12729 }
12730 }
12731 
12732 namespace color {
12733 namespace akin {
12734 
12735 template< >struct yiq< ::color::category::rgb_uint8 > {
12736 	typedef ::color::category::yiq_uint8 akin_type;
12737 };
12738 template< >struct yiq< ::color::category::rgb_uint16 > {
12739 	typedef ::color::category::yiq_uint16 akin_type;
12740 };
12741 template< >struct yiq< ::color::category::rgb_uint32 > {
12742 	typedef ::color::category::yiq_uint32 akin_type;
12743 };
12744 template< >struct yiq< ::color::category::rgb_uint64 > {
12745 	typedef ::color::category::yiq_uint64 akin_type;
12746 };
12747 template< >struct yiq< ::color::category::rgb_float > {
12748 	typedef ::color::category::yiq_float akin_type;
12749 };
12750 template< >struct yiq< ::color::category::rgb_double > {
12751 	typedef ::color::category::yiq_double akin_type;
12752 };
12753 template< >struct yiq< ::color::category::rgb_ldouble > {
12754 	typedef ::color::category::yiq_ldouble akin_type;
12755 };
12756 
12757 }
12758 }
12759 
12760 namespace color {
12761 namespace place {
12762 namespace _internal {
12763 
12764 template< typename tag_name >
12765 struct luma< ::color::category::yiq< tag_name > > {
12766 public:
12767 	typedef ::color::category::yiq< tag_name > category_type;
12768 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
12769 
12770 	enum { position_enum = 0 };
12771 	enum { has_enum = true };
12772 
positioncolor::place::_internal::luma12773 	static index_instance_type position() {
12774 		return position_enum;
12775 	}
12776 };
12777 
12778 }
12779 }
12780 }
12781 
12782 namespace color {
12783 namespace place {
12784 namespace _internal {
12785 
12786 template< typename tag_name >
12787 struct inphase< ::color::category::yiq< tag_name > > {
12788 public:
12789 	typedef ::color::category::yiq< tag_name > category_type;
12790 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
12791 
12792 	enum { position_enum = 1 };
12793 	enum { has_enum = true };
12794 
positioncolor::place::_internal::inphase12795 	static index_instance_type position() {
12796 		return position_enum;
12797 	}
12798 };
12799 
12800 }
12801 }
12802 }
12803 
12804 namespace color {
12805 namespace place {
12806 namespace _internal {
12807 
12808 template< typename tag_name >
12809 struct quadrature< ::color::category::yiq< tag_name > > {
12810 public:
12811 	typedef ::color::category::yiq< tag_name > category_type;
12812 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
12813 
12814 	enum { position_enum = 2 };
12815 	enum { has_enum = true };
12816 
positioncolor::place::_internal::quadrature12817 	static index_instance_type position() {
12818 		return position_enum;
12819 	}
12820 };
12821 
12822 }
12823 }
12824 }
12825 
12826 namespace color {
12827 namespace get {
12828 
12829 template< typename tag_name >
12830 inline
12831 typename ::color::model< typename ::color::akin::yiq< ::color::category::rgb<tag_name> >::akin_type >::component_const_type
inphase(::color::model<::color::category::rgb<tag_name>> const & color_parameter)12832 inphase(::color::model< ::color::category::rgb<tag_name> > const& color_parameter) {
12833 	typedef ::color::category::rgb<tag_name> category_type;
12834 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12835 	typedef typename ::color::akin::yiq<category_type>::akin_type akin_type;
12836 	typedef ::color::_internal::diverse< akin_type > diverse_type;
12837 	typedef ::color::_internal::normalize< category_type > normalize_type;
12838 	typedef ::color::constant::yiq< akin_type > yiq_const_type;
12839 	enum {
12840 		inphase_p = ::color::place::_internal::inphase<akin_type>::position_enum
12841 	};
12842 	enum {
12843 		red_p = ::color::place::_internal::red<category_type>::position_enum
12844 		,green_p = ::color::place::_internal::green<category_type>::position_enum
12845 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
12846 	};
12847 	scalar_type value =
12848 		+ yiq_const_type::b21() * normalize_type::template process<red_p >(color_parameter.template get<red_p >())
12849 	+ yiq_const_type::b22() * normalize_type::template process<green_p >(color_parameter.template get<green_p >())
12850 	+ yiq_const_type::b23() * normalize_type::template process<blue_p >(color_parameter.template get<blue_p >())
12851 	;
12852 	value = value / yiq_const_type::i_range() + scalar_type(0.5);
12853 	return diverse_type::template process<inphase_p>(value);
12854 }
12855 
12856 }
12857 }
12858 
12859 namespace color {
12860 namespace get {
12861 
12862 template< typename tag_name >
12863 inline
12864 typename ::color::model< typename ::color::akin::yiq< ::color::category::rgb<tag_name> >::akin_type >::component_const_type
quadrature(::color::model<::color::category::rgb<tag_name>> const & color_parameter)12865 quadrature(::color::model< ::color::category::rgb<tag_name> > const& color_parameter) {
12866 	typedef ::color::category::rgb<tag_name> category_type;
12867 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
12868 	typedef typename ::color::akin::yiq<category_type >::akin_type akin_type;
12869 	typedef ::color::_internal::diverse< akin_type > diverse_type;
12870 	typedef ::color::_internal::normalize< category_type > normalize_type;
12871 	typedef ::color::constant::yiq< akin_type > yiq_const_type;
12872 	enum {
12873 		red_p = ::color::place::_internal::red<category_type>::position_enum
12874 		,green_p = ::color::place::_internal::green<category_type>::position_enum
12875 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
12876 	};
12877 	scalar_type value =
12878 		+ yiq_const_type::b31() * normalize_type::template process<red_p >(color_parameter.template get<red_p >())
12879 	+ yiq_const_type::b32() * normalize_type::template process<green_p >(color_parameter.template get<green_p >())
12880 	+ yiq_const_type::b33() * normalize_type::template process<blue_p >(color_parameter.template get<blue_p >())
12881 	;
12882 	value = value / yiq_const_type::q_range() + scalar_type(0.5);
12883 	return diverse_type::template process<2>(value);
12884 }
12885 
12886 }
12887 }
12888 
12889 namespace color {
12890 namespace constant {
12891 namespace xyz {
12892 namespace illuminant {
12893 
12894 enum observer_entity { two_entity, ten_entity };
12895 enum name_entity {
12896 	A_entity,
12897 	B_entity,
12898 	C_entity,
12899 	D50_entity,
12900 	D55_entity,
12901 	D65_entity,
12902 	D75_entity,
12903 	E_entity,
12904 	F1_entity,
12905 	F2_entity,
12906 	F3_entity,
12907 	F4_entity,
12908 	F5_entity,
12909 	F6_entity,
12910 	F7_entity,
12911 	F8_entity,
12912 	F9_entity,
12913 	F10_entity,
12914 	F11_entity,
12915 	F12_entity
12916 };
12917 
12918 namespace _intrnal {
12919 
12920 template
12921 <
12922 	typename scalar_name
12923 	,::color::constant::xyz::illuminant::name_entity name_number
12924 	,::color::constant::xyz::illuminant::observer_entity observer_number
12925 	>
12926 struct base {
12927 };
12928 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::A_entity, ::color::constant::xyz::illuminant::two_entity > {
12929 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base12930 	static scalar_type x() {
12931 		return scalar_type(0.44757);
12932 	} static scalar_type y() {
12933 		return scalar_type(0.40745);
12934 	}
12935 };
12936 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::B_entity, ::color::constant::xyz::illuminant::two_entity > {
12937 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base12938 	static scalar_type x() {
12939 		return scalar_type(0.34842);
12940 	} static scalar_type y() {
12941 		return scalar_type(0.35161);
12942 	}
12943 };
12944 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::C_entity, ::color::constant::xyz::illuminant::two_entity > {
12945 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base12946 	static scalar_type x() {
12947 		return scalar_type(0.310063);
12948 	} static scalar_type y() {
12949 		return scalar_type(0.316158);
12950 	}
12951 };
12952 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::D50_entity, ::color::constant::xyz::illuminant::two_entity > {
12953 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base12954 	static scalar_type x() {
12955 		return scalar_type(0.34567);
12956 	} static scalar_type y() {
12957 		return scalar_type(0.35850);
12958 	}
12959 };
12960 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::D55_entity, ::color::constant::xyz::illuminant::two_entity > {
12961 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base12962 	static scalar_type x() {
12963 		return scalar_type(0.33242);
12964 	} static scalar_type y() {
12965 		return scalar_type(0.34743);
12966 	}
12967 };
12968 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > {
12969 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base12970 	static scalar_type x() {
12971 		return scalar_type(0.312713);
12972 	} static scalar_type y() {
12973 		return scalar_type(0.329016);
12974 	}
12975 };
12976 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::D75_entity, ::color::constant::xyz::illuminant::two_entity > {
12977 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base12978 	static scalar_type x() {
12979 		return scalar_type(0.29902);
12980 	} static scalar_type y() {
12981 		return scalar_type(0.31485);
12982 	}
12983 };
12984 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::E_entity, ::color::constant::xyz::illuminant::two_entity > {
12985 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base12986 	static scalar_type x() {
12987 		return scalar_type(0.33333);
12988 	} static scalar_type y() {
12989 		return scalar_type(0.33333);
12990 	}
12991 };
12992 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F1_entity, ::color::constant::xyz::illuminant::two_entity > {
12993 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base12994 	static scalar_type x() {
12995 		return scalar_type(0.31310);
12996 	} static scalar_type y() {
12997 		return scalar_type(0.33727);
12998 	}
12999 };
13000 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F2_entity, ::color::constant::xyz::illuminant::two_entity > {
13001 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13002 	static scalar_type x() {
13003 		return scalar_type(0.37208);
13004 	} static scalar_type y() {
13005 		return scalar_type(0.37529);
13006 	}
13007 };
13008 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F3_entity, ::color::constant::xyz::illuminant::two_entity > {
13009 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13010 	static scalar_type x() {
13011 		return scalar_type(0.40910);
13012 	} static scalar_type y() {
13013 		return scalar_type(0.39430);
13014 	}
13015 };
13016 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F4_entity, ::color::constant::xyz::illuminant::two_entity > {
13017 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13018 	static scalar_type x() {
13019 		return scalar_type(0.44018);
13020 	} static scalar_type y() {
13021 		return scalar_type(0.40329);
13022 	}
13023 };
13024 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F5_entity, ::color::constant::xyz::illuminant::two_entity > {
13025 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13026 	static scalar_type x() {
13027 		return scalar_type(0.31379);
13028 	} static scalar_type y() {
13029 		return scalar_type(0.34531);
13030 	}
13031 };
13032 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F6_entity, ::color::constant::xyz::illuminant::two_entity > {
13033 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13034 	static scalar_type x() {
13035 		return scalar_type(0.37790);
13036 	} static scalar_type y() {
13037 		return scalar_type(0.38835);
13038 	}
13039 };
13040 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F7_entity, ::color::constant::xyz::illuminant::two_entity > {
13041 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13042 	static scalar_type x() {
13043 		return scalar_type(0.31292);
13044 	} static scalar_type y() {
13045 		return scalar_type(0.32933);
13046 	}
13047 };
13048 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F8_entity, ::color::constant::xyz::illuminant::two_entity > {
13049 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13050 	static scalar_type x() {
13051 		return scalar_type(0.34588);
13052 	} static scalar_type y() {
13053 		return scalar_type(0.35875);
13054 	}
13055 };
13056 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F9_entity, ::color::constant::xyz::illuminant::two_entity > {
13057 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13058 	static scalar_type x() {
13059 		return scalar_type(0.37417);
13060 	} static scalar_type y() {
13061 		return scalar_type(0.37281);
13062 	}
13063 };
13064 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F10_entity, ::color::constant::xyz::illuminant::two_entity > {
13065 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13066 	static scalar_type x() {
13067 		return scalar_type(0.34609);
13068 	} static scalar_type y() {
13069 		return scalar_type(0.35986);
13070 	}
13071 };
13072 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F11_entity, ::color::constant::xyz::illuminant::two_entity > {
13073 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13074 	static scalar_type x() {
13075 		return scalar_type(0.38052);
13076 	} static scalar_type y() {
13077 		return scalar_type(0.37713);
13078 	}
13079 };
13080 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F12_entity, ::color::constant::xyz::illuminant::two_entity > {
13081 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13082 	static scalar_type x() {
13083 		return scalar_type(0.43695);
13084 	} static scalar_type y() {
13085 		return scalar_type(0.40441);
13086 	}
13087 };
13088 
13089 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::A_entity, ::color::constant::xyz::illuminant::ten_entity > {
13090 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13091 	static scalar_type x() {
13092 		return scalar_type(0.45117);
13093 	} static scalar_type y() {
13094 		return scalar_type(0.40594);
13095 	}
13096 };
13097 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::B_entity, ::color::constant::xyz::illuminant::ten_entity > {
13098 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13099 	static scalar_type x() {
13100 		return scalar_type(0.34980);
13101 	} static scalar_type y() {
13102 		return scalar_type(0.35270);
13103 	}
13104 };
13105 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::C_entity, ::color::constant::xyz::illuminant::ten_entity > {
13106 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13107 	static scalar_type x() {
13108 		return scalar_type(0.31039);
13109 	} static scalar_type y() {
13110 		return scalar_type(0.31905);
13111 	}
13112 };
13113 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::D50_entity, ::color::constant::xyz::illuminant::ten_entity > {
13114 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13115 	static scalar_type x() {
13116 		return scalar_type(0.34773);
13117 	} static scalar_type y() {
13118 		return scalar_type(0.35952);
13119 	}
13120 };
13121 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::D55_entity, ::color::constant::xyz::illuminant::ten_entity > {
13122 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13123 	static scalar_type x() {
13124 		return scalar_type(0.33411);
13125 	} static scalar_type y() {
13126 		return scalar_type(0.34877);
13127 	}
13128 };
13129 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::ten_entity > {
13130 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13131 	static scalar_type x() {
13132 		return scalar_type(0.31382);
13133 	} static scalar_type y() {
13134 		return scalar_type(0.33100);
13135 	}
13136 };
13137 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::D75_entity, ::color::constant::xyz::illuminant::ten_entity > {
13138 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13139 	static scalar_type x() {
13140 		return scalar_type(0.29968);
13141 	} static scalar_type y() {
13142 		return scalar_type(0.31740);
13143 	}
13144 };
13145 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::E_entity, ::color::constant::xyz::illuminant::ten_entity > {
13146 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13147 	static scalar_type x() {
13148 		return scalar_type(0.33333);
13149 	} static scalar_type y() {
13150 		return scalar_type(0.33333);
13151 	}
13152 };
13153 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F1_entity, ::color::constant::xyz::illuminant::ten_entity > {
13154 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13155 	static scalar_type x() {
13156 		return scalar_type(0.31811);
13157 	} static scalar_type y() {
13158 		return scalar_type(0.33559);
13159 	}
13160 };
13161 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F2_entity, ::color::constant::xyz::illuminant::ten_entity > {
13162 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13163 	static scalar_type x() {
13164 		return scalar_type(0.37925);
13165 	} static scalar_type y() {
13166 		return scalar_type(0.36733);
13167 	}
13168 };
13169 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F3_entity, ::color::constant::xyz::illuminant::ten_entity > {
13170 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13171 	static scalar_type x() {
13172 		return scalar_type(0.41761);
13173 	} static scalar_type y() {
13174 		return scalar_type(0.38324);
13175 	}
13176 };
13177 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F4_entity, ::color::constant::xyz::illuminant::ten_entity > {
13178 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13179 	static scalar_type x() {
13180 		return scalar_type(0.44920);
13181 	} static scalar_type y() {
13182 		return scalar_type(0.39074);
13183 	}
13184 };
13185 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F5_entity, ::color::constant::xyz::illuminant::ten_entity > {
13186 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13187 	static scalar_type x() {
13188 		return scalar_type(0.31975);
13189 	} static scalar_type y() {
13190 		return scalar_type(0.34246);
13191 	}
13192 };
13193 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F6_entity, ::color::constant::xyz::illuminant::ten_entity > {
13194 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13195 	static scalar_type x() {
13196 		return scalar_type(0.38660);
13197 	} static scalar_type y() {
13198 		return scalar_type(0.37847);
13199 	}
13200 };
13201 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F7_entity, ::color::constant::xyz::illuminant::ten_entity > {
13202 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13203 	static scalar_type x() {
13204 		return scalar_type(0.31569);
13205 	} static scalar_type y() {
13206 		return scalar_type(0.32960);
13207 	}
13208 };
13209 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F8_entity, ::color::constant::xyz::illuminant::ten_entity > {
13210 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13211 	static scalar_type x() {
13212 		return scalar_type(0.34902);
13213 	} static scalar_type y() {
13214 		return scalar_type(0.35939);
13215 	}
13216 };
13217 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F9_entity, ::color::constant::xyz::illuminant::ten_entity > {
13218 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13219 	static scalar_type x() {
13220 		return scalar_type(0.37829);
13221 	} static scalar_type y() {
13222 		return scalar_type(0.37045);
13223 	}
13224 };
13225 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F10_entity, ::color::constant::xyz::illuminant::ten_entity > {
13226 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13227 	static scalar_type x() {
13228 		return scalar_type(0.35090);
13229 	} static scalar_type y() {
13230 		return scalar_type(0.35444);
13231 	}
13232 };
13233 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F11_entity, ::color::constant::xyz::illuminant::ten_entity > {
13234 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13235 	static scalar_type x() {
13236 		return scalar_type(0.38541);
13237 	} static scalar_type y() {
13238 		return scalar_type(0.37123);
13239 	}
13240 };
13241 template< typename scalar_name > struct base< scalar_name, ::color::constant::xyz::illuminant::F12_entity, ::color::constant::xyz::illuminant::ten_entity > {
13242 	typedef scalar_name scalar_type;
xcolor::constant::xyz::illuminant::_intrnal::base13243 	static scalar_type x() {
13244 		return scalar_type(0.44256);
13245 	} static scalar_type y() {
13246 		return scalar_type(0.39717);
13247 	}
13248 };
13249 
13250 }
13251 
13252 template
13253 <
13254 	typename scalar_name
13255 	,::color::constant::xyz::illuminant::name_entity name_number
13256 	,::color::constant::xyz::illuminant::observer_entity observer_number
13257 	>
13258 struct point
13259 	: private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, name_number, observer_number > {
13260 private:
13261 	typedef scalar_name scalar_type;
13262 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, name_number, observer_number > base_type;
13263 
13264 public:
Xcolor::constant::xyz::illuminant::point13265 	static scalar_type const X() {
13266 		return base_type::x()/base_type::y();
13267 	}
Ycolor::constant::xyz::illuminant::point13268 	static scalar_type const Y() {
13269 		return scalar_type(1);
13270 	}
Zcolor::constant::xyz::illuminant::point13271 	static scalar_type const Z() {
13272 		return (scalar_type(1)-base_type::x()-base_type::y())/base_type::y();
13273 	}
13274 };
13275 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::A_entity, ::color::constant::xyz::illuminant::two_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::A_entity, ::color::constant::xyz::illuminant::two_entity > {
13276 private:
13277 	typedef scalar_name scalar_type;
13278 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::A_entity, ::color::constant::xyz::illuminant::two_entity > base_type;
13279 public:
Xcolor::constant::xyz::illuminant::point13280 	static scalar_type const X() {
13281 		return scalar_type(1.09850);
13282 	} static scalar_type const Y() {
13283 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13284 	} static scalar_type const Z() {
13285 		return scalar_type(0.35585);
13286 	}
13287 };
13288 
13289 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::C_entity, ::color::constant::xyz::illuminant::two_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::C_entity, ::color::constant::xyz::illuminant::two_entity > {
13290 private:
13291 	typedef scalar_name scalar_type;
13292 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::C_entity, ::color::constant::xyz::illuminant::two_entity > base_type;
13293 public:
Xcolor::constant::xyz::illuminant::point13294 	static scalar_type const X() {
13295 		return scalar_type(0.98074);
13296 	} static scalar_type const Y() {
13297 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13298 	} static scalar_type const Z() {
13299 		return scalar_type(1.18232);
13300 	}
13301 };
13302 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::D50_entity, ::color::constant::xyz::illuminant::two_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::D50_entity, ::color::constant::xyz::illuminant::two_entity > {
13303 private:
13304 	typedef scalar_name scalar_type;
13305 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::D50_entity, ::color::constant::xyz::illuminant::two_entity > base_type;
13306 public:
Xcolor::constant::xyz::illuminant::point13307 	static scalar_type const X() {
13308 		return scalar_type(0.96422);
13309 	} static scalar_type const Y() {
13310 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13311 	} static scalar_type const Z() {
13312 		return scalar_type(0.82521);
13313 	}
13314 };
13315 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::D55_entity, ::color::constant::xyz::illuminant::two_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::D55_entity, ::color::constant::xyz::illuminant::two_entity > {
13316 private:
13317 	typedef scalar_name scalar_type;
13318 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::D55_entity, ::color::constant::xyz::illuminant::two_entity > base_type;
13319 public:
Xcolor::constant::xyz::illuminant::point13320 	static scalar_type const X() {
13321 		return scalar_type(0.95682);
13322 	} static scalar_type const Y() {
13323 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13324 	} static scalar_type const Z() {
13325 		return scalar_type(0.92149);
13326 	}
13327 };
13328 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > {
13329 private:
13330 	typedef scalar_name scalar_type;
13331 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > base_type;
13332 public:
Xcolor::constant::xyz::illuminant::point13333 	static scalar_type const X() {
13334 		return scalar_type(0.95047);
13335 	} static scalar_type const Y() {
13336 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13337 	} static scalar_type const Z() {
13338 		return scalar_type(1.08883);
13339 	}
13340 };
13341 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::D75_entity, ::color::constant::xyz::illuminant::two_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::D75_entity, ::color::constant::xyz::illuminant::two_entity > {
13342 private:
13343 	typedef scalar_name scalar_type;
13344 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::D75_entity, ::color::constant::xyz::illuminant::two_entity > base_type;
13345 public:
Xcolor::constant::xyz::illuminant::point13346 	static scalar_type const X() {
13347 		return scalar_type(0.94972);
13348 	} static scalar_type const Y() {
13349 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13350 	} static scalar_type const Z() {
13351 		return scalar_type(1.22638);
13352 	}
13353 };
13354 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::E_entity, ::color::constant::xyz::illuminant::two_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::E_entity, ::color::constant::xyz::illuminant::two_entity > {
13355 private:
13356 	typedef scalar_name scalar_type;
13357 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::E_entity, ::color::constant::xyz::illuminant::two_entity > base_type;
13358 public:
Xcolor::constant::xyz::illuminant::point13359 	static scalar_type const X() {
13360 		return scalar_type(1.00000);
13361 	} static scalar_type const Y() {
13362 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13363 	} static scalar_type const Z() {
13364 		return scalar_type(1.00000);
13365 	}
13366 };
13367 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::F2_entity, ::color::constant::xyz::illuminant::two_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::F2_entity, ::color::constant::xyz::illuminant::two_entity > {
13368 private:
13369 	typedef scalar_name scalar_type;
13370 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::F2_entity, ::color::constant::xyz::illuminant::two_entity > base_type;
13371 public:
Xcolor::constant::xyz::illuminant::point13372 	static scalar_type const X() {
13373 		return scalar_type(0.99186);
13374 	} static scalar_type const Y() {
13375 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13376 	} static scalar_type const Z() {
13377 		return scalar_type(0.67393);
13378 	}
13379 };
13380 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::F7_entity, ::color::constant::xyz::illuminant::two_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::F7_entity, ::color::constant::xyz::illuminant::two_entity > {
13381 private:
13382 	typedef scalar_name scalar_type;
13383 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::F7_entity, ::color::constant::xyz::illuminant::two_entity > base_type;
13384 public:
Xcolor::constant::xyz::illuminant::point13385 	static scalar_type const X() {
13386 		return scalar_type(0.95041);
13387 	} static scalar_type const Y() {
13388 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13389 	} static scalar_type const Z() {
13390 		return scalar_type(1.08747);
13391 	}
13392 };
13393 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::F11_entity, ::color::constant::xyz::illuminant::two_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::F11_entity, ::color::constant::xyz::illuminant::two_entity > {
13394 private:
13395 	typedef scalar_name scalar_type;
13396 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::F11_entity, ::color::constant::xyz::illuminant::two_entity > base_type;
13397 public:
Xcolor::constant::xyz::illuminant::point13398 	static scalar_type const X() {
13399 		return scalar_type(1.00962);
13400 	} static scalar_type const Y() {
13401 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13402 	} static scalar_type const Z() {
13403 		return scalar_type(0.64350);
13404 	}
13405 };
13406 
13407 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::A_entity, ::color::constant::xyz::illuminant::ten_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::A_entity, ::color::constant::xyz::illuminant::ten_entity > {
13408 private:
13409 	typedef scalar_name scalar_type;
13410 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::A_entity, ::color::constant::xyz::illuminant::ten_entity > base_type;
13411 public:
Xcolor::constant::xyz::illuminant::point13412 	static scalar_type const X() {
13413 		return scalar_type(1.11144);
13414 	} static scalar_type const Y() {
13415 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13416 	} static scalar_type const Z() {
13417 		return scalar_type(0.35200);
13418 	}
13419 };
13420 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::C_entity, ::color::constant::xyz::illuminant::ten_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::C_entity, ::color::constant::xyz::illuminant::ten_entity > {
13421 private:
13422 	typedef scalar_name scalar_type;
13423 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::C_entity, ::color::constant::xyz::illuminant::ten_entity > base_type;
13424 public:
Xcolor::constant::xyz::illuminant::point13425 	static scalar_type const X() {
13426 		return scalar_type(0.97285);
13427 	} static scalar_type const Y() {
13428 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13429 	} static scalar_type const Z() {
13430 		return scalar_type(1.16145);
13431 	}
13432 };
13433 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::D50_entity, ::color::constant::xyz::illuminant::ten_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::D50_entity, ::color::constant::xyz::illuminant::ten_entity > {
13434 private:
13435 	typedef scalar_name scalar_type;
13436 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::D50_entity, ::color::constant::xyz::illuminant::ten_entity > base_type;
13437 public:
Xcolor::constant::xyz::illuminant::point13438 	static scalar_type const X() {
13439 		return scalar_type(0.96720);
13440 	} static scalar_type const Y() {
13441 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13442 	} static scalar_type const Z() {
13443 		return scalar_type(0.81427);
13444 	}
13445 };
13446 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::D55_entity, ::color::constant::xyz::illuminant::ten_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::D55_entity, ::color::constant::xyz::illuminant::ten_entity > {
13447 private:
13448 	typedef scalar_name scalar_type;
13449 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::D55_entity, ::color::constant::xyz::illuminant::ten_entity > base_type;
13450 public:
Xcolor::constant::xyz::illuminant::point13451 	static scalar_type const X() {
13452 		return scalar_type(0.95799);
13453 	} static scalar_type const Y() {
13454 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13455 	} static scalar_type const Z() {
13456 		return scalar_type(0.90926);
13457 	}
13458 };
13459 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::ten_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::ten_entity > {
13460 private:
13461 	typedef scalar_name scalar_type;
13462 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::ten_entity > base_type;
13463 public:
Xcolor::constant::xyz::illuminant::point13464 	static scalar_type const X() {
13465 		return scalar_type(0.94811);
13466 	} static scalar_type const Y() {
13467 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13468 	} static scalar_type const Z() {
13469 		return scalar_type(1.07304);
13470 	}
13471 };
13472 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::D75_entity, ::color::constant::xyz::illuminant::ten_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::D75_entity, ::color::constant::xyz::illuminant::ten_entity > {
13473 private:
13474 	typedef scalar_name scalar_type;
13475 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::D75_entity, ::color::constant::xyz::illuminant::ten_entity > base_type;
13476 public:
Xcolor::constant::xyz::illuminant::point13477 	static scalar_type const X() {
13478 		return scalar_type(0.94416);
13479 	} static scalar_type const Y() {
13480 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13481 	} static scalar_type const Z() {
13482 		return scalar_type(1.20641);
13483 	}
13484 };
13485 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::F2_entity, ::color::constant::xyz::illuminant::ten_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::F2_entity, ::color::constant::xyz::illuminant::ten_entity > {
13486 private:
13487 	typedef scalar_name scalar_type;
13488 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::F2_entity, ::color::constant::xyz::illuminant::ten_entity > base_type;
13489 public:
Xcolor::constant::xyz::illuminant::point13490 	static scalar_type const X() {
13491 		return scalar_type(1.03279);
13492 	} static scalar_type const Y() {
13493 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13494 	} static scalar_type const Z() {
13495 		return scalar_type(0.69027);
13496 	}
13497 };
13498 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::F7_entity, ::color::constant::xyz::illuminant::ten_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::F7_entity, ::color::constant::xyz::illuminant::ten_entity > {
13499 private:
13500 	typedef scalar_name scalar_type;
13501 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::F7_entity, ::color::constant::xyz::illuminant::ten_entity > base_type;
13502 public:
Xcolor::constant::xyz::illuminant::point13503 	static scalar_type const X() {
13504 		return scalar_type(0.95792);
13505 	} static scalar_type const Y() {
13506 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13507 	} static scalar_type const Z() {
13508 		return scalar_type(1.07687);
13509 	}
13510 };
13511 template< typename scalar_name > struct point< scalar_name, ::color::constant::xyz::illuminant::F11_entity, ::color::constant::xyz::illuminant::ten_entity > : private ::color::constant::xyz::illuminant::_intrnal::base<scalar_name, ::color::constant::xyz::illuminant::F11_entity, ::color::constant::xyz::illuminant::ten_entity > {
13512 private:
13513 	typedef scalar_name scalar_type;
13514 	typedef ::color::constant::xyz::illuminant::_intrnal::base< scalar_name, ::color::constant::xyz::illuminant::F11_entity, ::color::constant::xyz::illuminant::ten_entity > base_type;
13515 public:
Xcolor::constant::xyz::illuminant::point13516 	static scalar_type const X() {
13517 		return scalar_type(1.03863);
13518 	} static scalar_type const Y() {
13519 		return scalar_type(1);
Zcolor::constant::xyz::illuminant::point13520 	} static scalar_type const Z() {
13521 		return scalar_type(0.65607);
13522 	}
13523 };
13524 
13525 }
13526 }
13527 }
13528 }
13529 
13530 namespace color {
13531 namespace constant {
13532 namespace xyz {
13533 namespace space {
13534 
13535 enum name_entity {
13536 	none_entity,
13537 	LabGamut_entity,
13538 	Adobe_entity,
13539 	Apple_entity,
13540 	Best_entity,
13541 	Beta_entity,
13542 	Bruce_entity,
13543 	CIE_entity,
13544 	ColorMatch_entity,
13545 	Don_entity,
13546 	ECI_entity,
13547 	Ekta_Space_PS5_entity,
13548 	NTSC_entity,
13549 	PAL_SECAM_entity,
13550 	ProPhoto_entity,
13551 	SMPTE_C_entity,
13552 	sRGB_entity,
13553 	WideGamut_entity,
13554 
13555 };
13556 
13557 template< typename scalar_name, ::color::constant::xyz::space::name_entity name_number >
13558 struct primary {
13559 public:
13560 	typedef scalar_name scalar_type;
13561 	enum { name_entity = name_number };
13562 private:
13563 	typedef std::array<scalar_type,2> coord_type;
13564 public:
redcolor::constant::xyz::space::primary13565 	static coord_type const& red() {
13566 		static coord_type value{};
13567 		return value;
13568 	}
greencolor::constant::xyz::space::primary13569 	static coord_type const& green() {
13570 		static coord_type value{};
13571 		return value;
13572 	}
bluecolor::constant::xyz::space::primary13573 	static coord_type const& blue() {
13574 		static coord_type value{};
13575 		return value;
13576 	}
13577 };
13578 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::Adobe_entity > {
13579 public:
13580 	typedef scalar_name scalar_type;
13581 	enum { name_entity = ::color::constant::xyz::space::Adobe_entity };
13582 private:
13583 	typedef std::array<scalar_type,2> coord_type;
13584 public:
redcolor::constant::xyz::space::primary13585 	static coord_type const& red() {
13586 		static coord_type value{ { 0.6400, 0.3300 } };
13587 		return value;
13588 	} static coord_type const& green() {
13589 		static coord_type value{ { 0.2100, 0.7100 } };
13590 		return value;
bluecolor::constant::xyz::space::primary13591 	} static coord_type const& blue() {
13592 		static coord_type value{ { 0.1500, 0.0600 } };
13593 		return value;
13594 	}
13595 };
13596 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::Apple_entity > {
13597 public:
13598 	typedef scalar_name scalar_type;
13599 	enum { name_entity = ::color::constant::xyz::space::Apple_entity };
13600 private:
13601 	typedef std::array<scalar_type,2> coord_type;
13602 public:
redcolor::constant::xyz::space::primary13603 	static coord_type const& red() {
13604 		static coord_type value{ { 0.6250, 0.3400 } };
13605 		return value;
13606 	} static coord_type const& green() {
13607 		static coord_type value{ { 0.2800, 0.5950 } };
13608 		return value;
bluecolor::constant::xyz::space::primary13609 	} static coord_type const& blue() {
13610 		static coord_type value{ { 0.1550, 0.0700 } };
13611 		return value;
13612 	}
13613 };
13614 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::Best_entity > {
13615 public:
13616 	typedef scalar_name scalar_type;
13617 	enum { name_entity = ::color::constant::xyz::space::Best_entity };
13618 private:
13619 	typedef std::array<scalar_type,2> coord_type;
13620 public:
redcolor::constant::xyz::space::primary13621 	static coord_type const& red() {
13622 		static coord_type value{ { 0.7347, 0.2653 } };
13623 		return value;
13624 	} static coord_type const& green() {
13625 		static coord_type value{ { 0.2150, 0.7750 } };
13626 		return value;
bluecolor::constant::xyz::space::primary13627 	} static coord_type const& blue() {
13628 		static coord_type value{ { 0.1300, 0.0350 } };
13629 		return value;
13630 	}
13631 };
13632 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::Beta_entity > {
13633 public:
13634 	typedef scalar_name scalar_type;
13635 	enum { name_entity = ::color::constant::xyz::space::Beta_entity };
13636 private:
13637 	typedef std::array<scalar_type,2> coord_type;
13638 public:
redcolor::constant::xyz::space::primary13639 	static coord_type const& red() {
13640 		static coord_type value{ { 0.6888, 0.3112 } };
13641 		return value;
13642 	} static coord_type const& green() {
13643 		static coord_type value{ { 0.1986, 0.7551 } };
13644 		return value;
bluecolor::constant::xyz::space::primary13645 	} static coord_type const& blue() {
13646 		static coord_type value{ { 0.1265, 0.0352 } };
13647 		return value;
13648 	}
13649 };
13650 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::Bruce_entity > {
13651 public:
13652 	typedef scalar_name scalar_type;
13653 	enum { name_entity = ::color::constant::xyz::space::Bruce_entity };
13654 private:
13655 	typedef std::array<scalar_type,2> coord_type;
13656 public:
redcolor::constant::xyz::space::primary13657 	static coord_type const& red() {
13658 		static coord_type value{ { 0.6400, 0.3300 } };
13659 		return value;
13660 	} static coord_type const& green() {
13661 		static coord_type value{ { 0.2800, 0.6500 } };
13662 		return value;
bluecolor::constant::xyz::space::primary13663 	} static coord_type const& blue() {
13664 		static coord_type value{ { 0.1500, 0.0600 } };
13665 		return value;
13666 	}
13667 };
13668 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::CIE_entity > {
13669 public:
13670 	typedef scalar_name scalar_type;
13671 	enum { name_entity = ::color::constant::xyz::space::CIE_entity };
13672 private:
13673 	typedef std::array<scalar_type,2> coord_type;
13674 public:
redcolor::constant::xyz::space::primary13675 	static coord_type const& red() {
13676 		static coord_type value{ { 0.7350, 0.2650 } };
13677 		return value;
13678 	} static coord_type const& green() {
13679 		static coord_type value{ { 0.2740, 0.7170 } };
13680 		return value;
bluecolor::constant::xyz::space::primary13681 	} static coord_type const& blue() {
13682 		static coord_type value{ { 0.1670, 0.0090 } };
13683 		return value;
13684 	}
13685 };
13686 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::ColorMatch_entity > {
13687 public:
13688 	typedef scalar_name scalar_type;
13689 	enum { name_entity = ::color::constant::xyz::space::ColorMatch_entity };
13690 private:
13691 	typedef std::array<scalar_type,2> coord_type;
13692 public:
redcolor::constant::xyz::space::primary13693 	static coord_type const& red() {
13694 		static coord_type value{ { 0.6300, 0.3400 } };
13695 		return value;
13696 	} static coord_type const& green() {
13697 		static coord_type value{ { 0.2950, 0.6050 } };
13698 		return value;
bluecolor::constant::xyz::space::primary13699 	} static coord_type const& blue() {
13700 		static coord_type value{ { 0.1500, 0.0750 } };
13701 		return value;
13702 	}
13703 };
13704 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::Don_entity > {
13705 public:
13706 	typedef scalar_name scalar_type;
13707 	enum { name_entity = ::color::constant::xyz::space::Don_entity };
13708 private:
13709 	typedef std::array<scalar_type,2> coord_type;
13710 public:
redcolor::constant::xyz::space::primary13711 	static coord_type const& red() {
13712 		static coord_type value{ { 0.6960, 0.3000 } };
13713 		return value;
13714 	} static coord_type const& green() {
13715 		static coord_type value{ { 0.2150, 0.7650 } };
13716 		return value;
bluecolor::constant::xyz::space::primary13717 	} static coord_type const& blue() {
13718 		static coord_type value{ { 0.1300, 0.0350 } };
13719 		return value;
13720 	}
13721 };
13722 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::ECI_entity > {
13723 public:
13724 	typedef scalar_name scalar_type;
13725 	enum { name_entity = ::color::constant::xyz::space::ECI_entity };
13726 private:
13727 	typedef std::array<scalar_type,2> coord_type;
13728 public:
redcolor::constant::xyz::space::primary13729 	static coord_type const& red() {
13730 		static coord_type value{ { 0.6700, 0.3300 } };
13731 		return value;
13732 	} static coord_type const& green() {
13733 		static coord_type value{ { 0.2100, 0.7100 } };
13734 		return value;
bluecolor::constant::xyz::space::primary13735 	} static coord_type const& blue() {
13736 		static coord_type value{ { 0.1400, 0.0800 } };
13737 		return value;
13738 	}
13739 };
13740 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::Ekta_Space_PS5_entity > {
13741 public:
13742 	typedef scalar_name scalar_type;
13743 	enum { name_entity = ::color::constant::xyz::space::Ekta_Space_PS5_entity };
13744 private:
13745 	typedef std::array<scalar_type,2> coord_type;
13746 public:
redcolor::constant::xyz::space::primary13747 	static coord_type const& red() {
13748 		static coord_type value{ { 0.6950, 0.3050 } };
13749 		return value;
13750 	} static coord_type const& green() {
13751 		static coord_type value{ { 0.2600, 0.7000 } };
13752 		return value;
bluecolor::constant::xyz::space::primary13753 	} static coord_type const& blue() {
13754 		static coord_type value{ { 0.1100, 0.0050 } };
13755 		return value;
13756 	}
13757 };
13758 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::NTSC_entity > {
13759 public:
13760 	typedef scalar_name scalar_type;
13761 	enum { name_entity = ::color::constant::xyz::space::NTSC_entity };
13762 private:
13763 	typedef std::array<scalar_type,2> coord_type;
13764 public:
redcolor::constant::xyz::space::primary13765 	static coord_type const& red() {
13766 		static coord_type value{ { 0.6700, 0.3300 } };
13767 		return value;
13768 	} static coord_type const& green() {
13769 		static coord_type value{ { 0.2100, 0.7100 } };
13770 		return value;
bluecolor::constant::xyz::space::primary13771 	} static coord_type const& blue() {
13772 		static coord_type value{ { 0.1400, 0.0800 } };
13773 		return value;
13774 	}
13775 };
13776 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::PAL_SECAM_entity > {
13777 public:
13778 	typedef scalar_name scalar_type;
13779 	enum { name_entity = ::color::constant::xyz::space::PAL_SECAM_entity };
13780 private:
13781 	typedef std::array<scalar_type,2> coord_type;
13782 public:
redcolor::constant::xyz::space::primary13783 	static coord_type const& red() {
13784 		static coord_type value{ { 0.6400, 0.3300 } };
13785 		return value;
13786 	} static coord_type const& green() {
13787 		static coord_type value{ { 0.2900, 0.6000 } };
13788 		return value;
bluecolor::constant::xyz::space::primary13789 	} static coord_type const& blue() {
13790 		static coord_type value{ { 0.1500, 0.0600 } };
13791 		return value;
13792 	}
13793 };
13794 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::ProPhoto_entity > {
13795 public:
13796 	typedef scalar_name scalar_type;
13797 	enum { name_entity = ::color::constant::xyz::space::ProPhoto_entity };
13798 private:
13799 	typedef std::array<scalar_type,2> coord_type;
13800 public:
redcolor::constant::xyz::space::primary13801 	static coord_type const& red() {
13802 		static coord_type value{ { 0.7347, 0.2653 } };
13803 		return value;
13804 	} static coord_type const& green() {
13805 		static coord_type value{ { 0.1596, 0.8404 } };
13806 		return value;
bluecolor::constant::xyz::space::primary13807 	} static coord_type const& blue() {
13808 		static coord_type value{ { 0.0366, 0.0001 } };
13809 		return value;
13810 	}
13811 };
13812 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::SMPTE_C_entity > {
13813 public:
13814 	typedef scalar_name scalar_type;
13815 	enum { name_entity = ::color::constant::xyz::space::SMPTE_C_entity };
13816 private:
13817 	typedef std::array<scalar_type,2> coord_type;
13818 public:
redcolor::constant::xyz::space::primary13819 	static coord_type const& red() {
13820 		static coord_type value{ { 0.6300, 0.3400 } };
13821 		return value;
13822 	} static coord_type const& green() {
13823 		static coord_type value{ { 0.3100, 0.5950 } };
13824 		return value;
bluecolor::constant::xyz::space::primary13825 	} static coord_type const& blue() {
13826 		static coord_type value{ { 0.1550, 0.0700 } };
13827 		return value;
13828 	}
13829 };
13830 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::sRGB_entity > {
13831 public:
13832 	typedef scalar_name scalar_type;
13833 	enum { name_entity = ::color::constant::xyz::space::sRGB_entity };
13834 private:
13835 	typedef std::array<scalar_type,2> coord_type;
13836 public:
redcolor::constant::xyz::space::primary13837 	static coord_type const& red() {
13838 		static coord_type value{ { 0.6400, 0.3300 } };
13839 		return value;
13840 	} static coord_type const& green() {
13841 		static coord_type value{ { 0.3000, 0.6000 } };
13842 		return value;
bluecolor::constant::xyz::space::primary13843 	} static coord_type const& blue() {
13844 		static coord_type value{ { 0.1500, 0.0600 } };
13845 		return value;
13846 	}
13847 };
13848 template< typename scalar_name > struct primary< scalar_name, ::color::constant::xyz::space::WideGamut_entity > {
13849 public:
13850 	typedef scalar_name scalar_type;
13851 	enum { name_entity = ::color::constant::xyz::space::WideGamut_entity };
13852 private:
13853 	typedef std::array<scalar_type,2> coord_type;
13854 public:
redcolor::constant::xyz::space::primary13855 	static coord_type const& red() {
13856 		static coord_type value{ { 0.7350, 0.2650 } };
13857 		return value;
13858 	} static coord_type const& green() {
13859 		static coord_type value{ { 0.1150, 0.8260 } };
13860 		return value;
bluecolor::constant::xyz::space::primary13861 	} static coord_type const& blue() {
13862 		static coord_type value{ { 0.1570, 0.0180 } };
13863 		return value;
13864 	}
13865 };
13866 
13867 template< typename scalar_name, ::color::constant::xyz::space::name_entity name_number = ::color::constant::xyz::space::none_entity >
13868 struct gamma {
13869 	typedef scalar_name scalar_type;
13870 
encodecolor::constant::xyz::space::gamma13871 	static scalar_type encode(scalar_type const& value) {
13872 		return value ;
13873 	}
13874 
decodecolor::constant::xyz::space::gamma13875 	static scalar_type decode(scalar_type const& value) {
13876 		return value;
13877 	}
13878 };
13879 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::ECI_entity > {
13880 	typedef scalar_name scalar_type;
scolor::constant::xyz::space::gamma13881 	static scalar_type s() {
13882 		return pow((1+0.16)/ 3, 3) * pow((3 -1) / 0.16, 3 -1);
13883 	} static scalar_type t() {
13884 		return 0.16/(3 -1);
encodecolor::constant::xyz::space::gamma13885 	} static scalar_type encode(scalar_type const& value) {
13886 		if(value < t()/s()) {
13887 			return s() * value;
13888 		}
13889 		return (1 + 0.16) * pow(value, scalar_type(1) / scalar_type(3)) - 0.16;
13890 	} static scalar_type decode(scalar_type const& value) {
13891 		if(value < t()) {
13892 			return value / s();
13893 		}
13894 		return pow((value + 0.16) / (1 + 0.16), 3);
13895 	}
13896 };
13897 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::sRGB_entity > {
13898 	typedef scalar_name scalar_type;
scolor::constant::xyz::space::gamma13899 	static scalar_type s() {
13900 		return pow((1+0.055)/ 2.4, 2.4) * pow((2.4 -1) / 0.055, 2.4 -1);
13901 	} static scalar_type t() {
13902 		return 0.055/(2.4 -1);
encodecolor::constant::xyz::space::gamma13903 	} static scalar_type encode(scalar_type const& value) {
13904 		if(value < t()/s()) {
13905 			return s() * value;
13906 		}
13907 		return (1 + 0.055) * pow(value, scalar_type(1) / scalar_type(2.4)) - 0.055;
13908 	} static scalar_type decode(scalar_type const& value) {
13909 		if(value < t()) {
13910 			return value / s();
13911 		}
13912 		return pow((value + 0.055) / (1 + 0.055), 2.4);
13913 	}
13914 };
13915 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::Adobe_entity > {
13916 	typedef scalar_name scalar_type;
encodecolor::constant::xyz::space::gamma13917 	static scalar_type encode(scalar_type const& value) {
13918 		return pow(value, scalar_type(1) / scalar_type(2.19921875));
13919 	} static scalar_type decode(scalar_type const& value) {
13920 		return pow(value, scalar_type(2.19921875));
13921 	}
13922 };
13923 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::Apple_entity > {
13924 	typedef scalar_name scalar_type;
encodecolor::constant::xyz::space::gamma13925 	static scalar_type encode(scalar_type const& value) {
13926 		return pow(value, scalar_type(1) / scalar_type(1.8));
13927 	} static scalar_type decode(scalar_type const& value) {
13928 		return pow(value, scalar_type(1.8));
13929 	}
13930 };
13931 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::Best_entity > {
13932 	typedef scalar_name scalar_type;
encodecolor::constant::xyz::space::gamma13933 	static scalar_type encode(scalar_type const& value) {
13934 		return pow(value, scalar_type(1) / scalar_type(2.2));
13935 	} static scalar_type decode(scalar_type const& value) {
13936 		return pow(value, scalar_type(2.2));
13937 	}
13938 };
13939 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::Beta_entity > {
13940 	typedef scalar_name scalar_type;
encodecolor::constant::xyz::space::gamma13941 	static scalar_type encode(scalar_type const& value) {
13942 		return pow(value, scalar_type(1) / scalar_type(2.2));
13943 	} static scalar_type decode(scalar_type const& value) {
13944 		return pow(value, scalar_type(2.2));
13945 	}
13946 };
13947 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::Bruce_entity > {
13948 	typedef scalar_name scalar_type;
encodecolor::constant::xyz::space::gamma13949 	static scalar_type encode(scalar_type const& value) {
13950 		return pow(value, scalar_type(1) / scalar_type(2.2));
13951 	} static scalar_type decode(scalar_type const& value) {
13952 		return pow(value, scalar_type(2.2));
13953 	}
13954 };
13955 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::CIE_entity > {
13956 	typedef scalar_name scalar_type;
encodecolor::constant::xyz::space::gamma13957 	static scalar_type encode(scalar_type const& value) {
13958 		return pow(value, scalar_type(1) / scalar_type(2.2));
13959 	} static scalar_type decode(scalar_type const& value) {
13960 		return pow(value, scalar_type(2.2));
13961 	}
13962 };
13963 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::ColorMatch_entity > {
13964 	typedef scalar_name scalar_type;
encodecolor::constant::xyz::space::gamma13965 	static scalar_type encode(scalar_type const& value) {
13966 		return pow(value, scalar_type(1) / scalar_type(1.8));
13967 	} static scalar_type decode(scalar_type const& value) {
13968 		return pow(value, scalar_type(1.8));
13969 	}
13970 };
13971 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::Don_entity > {
13972 	typedef scalar_name scalar_type;
encodecolor::constant::xyz::space::gamma13973 	static scalar_type encode(scalar_type const& value) {
13974 		return pow(value, scalar_type(1) / scalar_type(2.2));
13975 	} static scalar_type decode(scalar_type const& value) {
13976 		return pow(value, scalar_type(2.2));
13977 	}
13978 };
13979 
13980 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::Ekta_Space_PS5_entity > {
13981 	typedef scalar_name scalar_type;
encodecolor::constant::xyz::space::gamma13982 	static scalar_type encode(scalar_type const& value) {
13983 		return pow(value, scalar_type(1) / scalar_type(2.2));
13984 	} static scalar_type decode(scalar_type const& value) {
13985 		return pow(value, scalar_type(2.2));
13986 	}
13987 };
13988 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::NTSC_entity > {
13989 	typedef scalar_name scalar_type;
encodecolor::constant::xyz::space::gamma13990 	static scalar_type encode(scalar_type const& value) {
13991 		return pow(value, scalar_type(1) / scalar_type(2.2));
13992 	} static scalar_type decode(scalar_type const& value) {
13993 		return pow(value, scalar_type(2.2));
13994 	}
13995 };
13996 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::PAL_SECAM_entity > {
13997 	typedef scalar_name scalar_type;
encodecolor::constant::xyz::space::gamma13998 	static scalar_type encode(scalar_type const& value) {
13999 		return pow(value, scalar_type(1) / scalar_type(2.2));
14000 	} static scalar_type decode(scalar_type const& value) {
14001 		return pow(value, scalar_type(2.2));
14002 	}
14003 };
14004 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::ProPhoto_entity > {
14005 	typedef scalar_name scalar_type;
encodecolor::constant::xyz::space::gamma14006 	static scalar_type encode(scalar_type const& value) {
14007 		return pow(value, scalar_type(1) / scalar_type(1.8));
14008 	} static scalar_type decode(scalar_type const& value) {
14009 		return pow(value, scalar_type(1.8));
14010 	}
14011 };
14012 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::SMPTE_C_entity > {
14013 	typedef scalar_name scalar_type;
encodecolor::constant::xyz::space::gamma14014 	static scalar_type encode(scalar_type const& value) {
14015 		return pow(value, scalar_type(1) / scalar_type(2.2));
14016 	} static scalar_type decode(scalar_type const& value) {
14017 		return pow(value, scalar_type(2.2));
14018 	}
14019 };
14020 
14021 template< typename scalar_name > struct gamma< scalar_name, ::color::constant::xyz::space::WideGamut_entity > {
14022 	typedef scalar_name scalar_type;
encodecolor::constant::xyz::space::gamma14023 	static scalar_type encode(scalar_type const& value) {
14024 		return pow(value, scalar_type(1) / scalar_type(2.2));
14025 	} static scalar_type decode(scalar_type const& value) {
14026 		return pow(value, scalar_type(2.2));
14027 	}
14028 };
14029 
14030 template< ::color::constant::xyz::space::name_entity name_number >
14031 struct illuminant {
14032 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14033 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14034 
namecolor::constant::xyz::space::illuminant14035 	static name_type name() {
14036 		return ::color::constant::xyz::illuminant::D65_entity;
14037 	}
observercolor::constant::xyz::space::illuminant14038 	static observer_type observer() {
14039 		return ::color::constant::xyz::illuminant::two_entity ;
14040 	}
14041 };
14042 template<> struct illuminant< ::color::constant::xyz::space::LabGamut_entity > {
14043 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14044 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14045 	enum { name_entity = ::color::constant::xyz::illuminant::D65_entity };
14046 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14047 	static name_type name() {
14048 		return ::color::constant::xyz::illuminant::D65_entity;
14049 	} static observer_type observer() {
14050 		return ::color::constant::xyz::illuminant::two_entity;
14051 	}
14052 };
14053 template<> struct illuminant< ::color::constant::xyz::space::Adobe_entity > {
14054 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14055 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14056 	enum { name_entity = ::color::constant::xyz::illuminant::D65_entity };
14057 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14058 	static name_type name() {
14059 		return ::color::constant::xyz::illuminant::D65_entity;
14060 	} static observer_type observer() {
14061 		return ::color::constant::xyz::illuminant::two_entity;
14062 	}
14063 };
14064 template<> struct illuminant< ::color::constant::xyz::space::Apple_entity > {
14065 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14066 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14067 	enum { name_entity = ::color::constant::xyz::illuminant::D65_entity };
14068 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14069 	static name_type name() {
14070 		return ::color::constant::xyz::illuminant::D65_entity;
14071 	} static observer_type observer() {
14072 		return ::color::constant::xyz::illuminant::two_entity;
14073 	}
14074 };
14075 template<> struct illuminant< ::color::constant::xyz::space::Best_entity > {
14076 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14077 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14078 	enum { name_entity = ::color::constant::xyz::illuminant::D50_entity };
14079 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14080 	static name_type name() {
14081 		return ::color::constant::xyz::illuminant::D50_entity;
14082 	} static observer_type observer() {
14083 		return ::color::constant::xyz::illuminant::two_entity;
14084 	}
14085 };
14086 template<> struct illuminant< ::color::constant::xyz::space::Beta_entity > {
14087 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14088 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14089 	enum { name_entity = ::color::constant::xyz::illuminant::D50_entity };
14090 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14091 	static name_type name() {
14092 		return ::color::constant::xyz::illuminant::D50_entity;
14093 	} static observer_type observer() {
14094 		return ::color::constant::xyz::illuminant::two_entity;
14095 	}
14096 };
14097 template<> struct illuminant< ::color::constant::xyz::space::Bruce_entity > {
14098 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14099 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14100 	enum { name_entity = ::color::constant::xyz::illuminant::D65_entity };
14101 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14102 	static name_type name() {
14103 		return ::color::constant::xyz::illuminant::D65_entity;
14104 	} static observer_type observer() {
14105 		return ::color::constant::xyz::illuminant::two_entity;
14106 	}
14107 };
14108 template<> struct illuminant< ::color::constant::xyz::space::CIE_entity > {
14109 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14110 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14111 	enum { name_entity = ::color::constant::xyz::illuminant::E_entity };
14112 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14113 	static name_type name() {
14114 		return ::color::constant::xyz::illuminant::E_entity;
14115 	} static observer_type observer() {
14116 		return ::color::constant::xyz::illuminant::two_entity;
14117 	}
14118 };
14119 template<> struct illuminant< ::color::constant::xyz::space::ColorMatch_entity > {
14120 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14121 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14122 	enum { name_entity = ::color::constant::xyz::illuminant::D50_entity };
14123 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14124 	static name_type name() {
14125 		return ::color::constant::xyz::illuminant::D50_entity;
14126 	} static observer_type observer() {
14127 		return ::color::constant::xyz::illuminant::two_entity;
14128 	}
14129 };
14130 template<> struct illuminant< ::color::constant::xyz::space::Don_entity > {
14131 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14132 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14133 	enum { name_entity = ::color::constant::xyz::illuminant::D50_entity };
14134 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14135 	static name_type name() {
14136 		return ::color::constant::xyz::illuminant::D50_entity;
14137 	} static observer_type observer() {
14138 		return ::color::constant::xyz::illuminant::two_entity;
14139 	}
14140 };
14141 template<> struct illuminant< ::color::constant::xyz::space::ECI_entity > {
14142 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14143 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14144 	enum { name_entity = ::color::constant::xyz::illuminant::D50_entity };
14145 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14146 	static name_type name() {
14147 		return ::color::constant::xyz::illuminant::D50_entity;
14148 	} static observer_type observer() {
14149 		return ::color::constant::xyz::illuminant::two_entity;
14150 	}
14151 };
14152 template<> struct illuminant< ::color::constant::xyz::space::Ekta_Space_PS5_entity > {
14153 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14154 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14155 	enum { name_entity = ::color::constant::xyz::illuminant::D50_entity };
14156 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14157 	static name_type name() {
14158 		return ::color::constant::xyz::illuminant::D50_entity;
14159 	} static observer_type observer() {
14160 		return ::color::constant::xyz::illuminant::two_entity;
14161 	}
14162 };
14163 template<> struct illuminant< ::color::constant::xyz::space::NTSC_entity > {
14164 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14165 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14166 	enum { name_entity = ::color::constant::xyz::illuminant::C_entity };
14167 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14168 	static name_type name() {
14169 		return ::color::constant::xyz::illuminant::C_entity;
14170 	} static observer_type observer() {
14171 		return ::color::constant::xyz::illuminant::two_entity;
14172 	}
14173 };
14174 template<> struct illuminant< ::color::constant::xyz::space::PAL_SECAM_entity > {
14175 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14176 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14177 	enum { name_entity = ::color::constant::xyz::illuminant::D65_entity };
14178 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14179 	static name_type name() {
14180 		return ::color::constant::xyz::illuminant::D65_entity;
14181 	} static observer_type observer() {
14182 		return ::color::constant::xyz::illuminant::two_entity;
14183 	}
14184 };
14185 template<> struct illuminant< ::color::constant::xyz::space::ProPhoto_entity > {
14186 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14187 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14188 	enum { name_entity = ::color::constant::xyz::illuminant::D50_entity };
14189 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14190 	static name_type name() {
14191 		return ::color::constant::xyz::illuminant::D50_entity;
14192 	} static observer_type observer() {
14193 		return ::color::constant::xyz::illuminant::two_entity;
14194 	}
14195 };
14196 template<> struct illuminant< ::color::constant::xyz::space::SMPTE_C_entity > {
14197 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14198 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14199 	enum { name_entity = ::color::constant::xyz::illuminant::D65_entity };
14200 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14201 	static name_type name() {
14202 		return ::color::constant::xyz::illuminant::D65_entity;
14203 	} static observer_type observer() {
14204 		return ::color::constant::xyz::illuminant::two_entity;
14205 	}
14206 };
14207 template<> struct illuminant< ::color::constant::xyz::space::sRGB_entity > {
14208 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14209 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14210 	enum { name_entity = ::color::constant::xyz::illuminant::D65_entity };
14211 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14212 	static name_type name() {
14213 		return ::color::constant::xyz::illuminant::D65_entity;
14214 	} static observer_type observer() {
14215 		return ::color::constant::xyz::illuminant::two_entity;
14216 	}
14217 };
14218 template<> struct illuminant< ::color::constant::xyz::space::WideGamut_entity > {
14219 	typedef ::color::constant::xyz::illuminant::name_entity name_type;
14220 	typedef ::color::constant::xyz::illuminant::observer_entity observer_type;
14221 	enum { name_entity = ::color::constant::xyz::illuminant::D50_entity };
14222 	enum { observer_entity = ::color::constant::xyz::illuminant::two_entity };
namecolor::constant::xyz::space::illuminant14223 	static name_type name() {
14224 		return ::color::constant::xyz::illuminant::D50_entity;
14225 	} static observer_type observer() {
14226 		return ::color::constant::xyz::illuminant::two_entity;
14227 	}
14228 };
14229 
14230 }
14231 }
14232 }
14233 }
14234 
14235 namespace color {
14236 namespace constant {
14237 namespace xyz {
14238 namespace adaptation {
14239 
14240 enum scaling_entity {
14241 	XYZ_entity
14242 	,Bradford_entity
14243 	,VonKries_entity
14244 };
14245 
14246 template
14247 <
14248 	typename scalar_name
14249 	,::color::constant::xyz::adaptation::scaling_entity scaling_number = ::color::constant::xyz::adaptation::XYZ_entity
14250 	>
14251 struct method {
14252 	typedef scalar_name scalar_type;
14253 
a11color::constant::xyz::adaptation::method14254 	static scalar_type const a11() {
14255 		return 1;
14256 	}
a12color::constant::xyz::adaptation::method14257 	static scalar_type const a12() {
14258 		return 0;
14259 	}
a13color::constant::xyz::adaptation::method14260 	static scalar_type const a13() {
14261 		return 0;
14262 	}
14263 
a21color::constant::xyz::adaptation::method14264 	static scalar_type const a21() {
14265 		return 0;
14266 	}
a22color::constant::xyz::adaptation::method14267 	static scalar_type const a22() {
14268 		return 1;
14269 	}
a23color::constant::xyz::adaptation::method14270 	static scalar_type const a23() {
14271 		return 0;
14272 	}
14273 
a31color::constant::xyz::adaptation::method14274 	static scalar_type const a31() {
14275 		return 0;
14276 	}
a32color::constant::xyz::adaptation::method14277 	static scalar_type const a32() {
14278 		return 0;
14279 	}
a33color::constant::xyz::adaptation::method14280 	static scalar_type const a33() {
14281 		return 1;
14282 	}
14283 
i11color::constant::xyz::adaptation::method14284 	static scalar_type const i11() {
14285 		return 1;
14286 	}
i12color::constant::xyz::adaptation::method14287 	static scalar_type const i12() {
14288 		return 0;
14289 	}
i13color::constant::xyz::adaptation::method14290 	static scalar_type const i13() {
14291 		return 0;
14292 	}
14293 
i21color::constant::xyz::adaptation::method14294 	static scalar_type const i21() {
14295 		return 0;
14296 	}
i22color::constant::xyz::adaptation::method14297 	static scalar_type const i22() {
14298 		return 1;
14299 	}
i23color::constant::xyz::adaptation::method14300 	static scalar_type const i23() {
14301 		return 0;
14302 	}
14303 
i31color::constant::xyz::adaptation::method14304 	static scalar_type const i31() {
14305 		return 0;
14306 	}
i32color::constant::xyz::adaptation::method14307 	static scalar_type const i32() {
14308 		return 0;
14309 	}
i33color::constant::xyz::adaptation::method14310 	static scalar_type const i33() {
14311 		return 1;
14312 	}
14313 };
14314 template < typename scalar_name > struct method< scalar_name, ::color::constant::xyz::adaptation::XYZ_entity > {
14315 	typedef scalar_name scalar_type;
a11color::constant::xyz::adaptation::method14316 	static scalar_type const a11() {
14317 		return 1;
14318 	} static scalar_type const a12() {
14319 		return 0;
a13color::constant::xyz::adaptation::method14320 	} static scalar_type const a13() {
14321 		return 0;
14322 	} static scalar_type const a21() {
14323 		return 0;
a22color::constant::xyz::adaptation::method14324 	} static scalar_type const a22() {
14325 		return 1;
14326 	} static scalar_type const a23() {
14327 		return 0;
a31color::constant::xyz::adaptation::method14328 	} static scalar_type const a31() {
14329 		return 0;
14330 	} static scalar_type const a32() {
14331 		return 0;
a33color::constant::xyz::adaptation::method14332 	} static scalar_type const a33() {
14333 		return 1;
14334 	} static scalar_type const i11() {
14335 		return 1;
i12color::constant::xyz::adaptation::method14336 	} static scalar_type const i12() {
14337 		return 0;
14338 	} static scalar_type const i13() {
14339 		return 0;
i21color::constant::xyz::adaptation::method14340 	} static scalar_type const i21() {
14341 		return 0;
14342 	} static scalar_type const i22() {
14343 		return 1;
i23color::constant::xyz::adaptation::method14344 	} static scalar_type const i23() {
14345 		return 0;
14346 	} static scalar_type const i31() {
14347 		return 0;
i32color::constant::xyz::adaptation::method14348 	} static scalar_type const i32() {
14349 		return 0;
14350 	} static scalar_type const i33() {
14351 		return 1;
14352 	}
14353 }
14354 
14355 ;
14356 
14357 template < typename scalar_name > struct method< scalar_name, ::color::constant::xyz::adaptation::Bradford_entity > {
14358 	typedef scalar_name scalar_type;
a11color::constant::xyz::adaptation::method14359 	static scalar_type const a11() {
14360 		return 0.8951000;
14361 	} static scalar_type const a12() {
14362 		return 0.2664000;
a13color::constant::xyz::adaptation::method14363 	} static scalar_type const a13() {
14364 		return -0.1614000;
14365 	} static scalar_type const a21() {
14366 		return -0.7502000;
a22color::constant::xyz::adaptation::method14367 	} static scalar_type const a22() {
14368 		return 1.7135000;
14369 	} static scalar_type const a23() {
14370 		return 0.0367000;
a31color::constant::xyz::adaptation::method14371 	} static scalar_type const a31() {
14372 		return 0.0389000;
14373 	} static scalar_type const a32() {
14374 		return -0.0685000;
a33color::constant::xyz::adaptation::method14375 	} static scalar_type const a33() {
14376 		return 1.0296000;
14377 	} static scalar_type const i11() {
14378 		return 0.9869929;
i12color::constant::xyz::adaptation::method14379 	} static scalar_type const i12() {
14380 		return -0.1470543;
14381 	} static scalar_type const i13() {
14382 		return 0.1599627;
i21color::constant::xyz::adaptation::method14383 	} static scalar_type const i21() {
14384 		return 0.4323053;
14385 	} static scalar_type const i22() {
14386 		return 0.5183603;
i23color::constant::xyz::adaptation::method14387 	} static scalar_type const i23() {
14388 		return 0.0492912;
14389 	} static scalar_type const i31() {
14390 		return -0.0085287;
i32color::constant::xyz::adaptation::method14391 	} static scalar_type const i32() {
14392 		return 0.0400428;
14393 	} static scalar_type const i33() {
14394 		return 0.9684867;
14395 	}
14396 }
14397 
14398 ;
14399 
14400 template < typename scalar_name > struct method< scalar_name, ::color::constant::xyz::adaptation::VonKries_entity > {
14401 	typedef scalar_name scalar_type;
a11color::constant::xyz::adaptation::method14402 	static scalar_type const a11() {
14403 		return 0.4002400;
14404 	} static scalar_type const a12() {
14405 		return 0.7076000;
a13color::constant::xyz::adaptation::method14406 	} static scalar_type const a13() {
14407 		return -0.0808100;
14408 	} static scalar_type const a21() {
14409 		return -0.2263000;
a22color::constant::xyz::adaptation::method14410 	} static scalar_type const a22() {
14411 		return 1.1653200;
14412 	} static scalar_type const a23() {
14413 		return 0.0457000;
a31color::constant::xyz::adaptation::method14414 	} static scalar_type const a31() {
14415 		return 0.0000000;
14416 	} static scalar_type const a32() {
14417 		return 0.0000000;
a33color::constant::xyz::adaptation::method14418 	} static scalar_type const a33() {
14419 		return 0.9182200;
14420 	} static scalar_type const i11() {
14421 		return 1.8599364;
i12color::constant::xyz::adaptation::method14422 	} static scalar_type const i12() {
14423 		return -1.1293816;
14424 	} static scalar_type const i13() {
14425 		return 0.2198974;
i21color::constant::xyz::adaptation::method14426 	} static scalar_type const i21() {
14427 		return 0.3611914;
14428 	} static scalar_type const i22() {
14429 		return 0.6388125;
i23color::constant::xyz::adaptation::method14430 	} static scalar_type const i23() {
14431 		return -0.0000064;
14432 	} static scalar_type const i31() {
14433 		return 0.0000000;
i32color::constant::xyz::adaptation::method14434 	} static scalar_type const i32() {
14435 		return 0.0000000;
14436 	} static scalar_type const i33() {
14437 		return 1.0890636;
14438 	}
14439 }
14440 
14441 ;
14442 
14443 template
14444 <
14445 	typename scalar_name
14446 	,::color::constant::xyz::illuminant::name_entity left_number = ::color::constant::xyz::illuminant::D50_entity
14447 	,::color::constant::xyz::illuminant::name_entity right_number = ::color::constant::xyz::illuminant::D65_entity
14448 	,::color::constant::xyz::adaptation::scaling_entity scaling_number = ::color::constant::xyz::adaptation::XYZ_entity
14449 	>
14450 struct matrix {
14451 	typedef scalar_name scalar_type;
14452 	typedef method<scalar_type,scaling_number > method_type;
14453 
14454 	typedef ::color::constant::xyz::illuminant::point< scalar_name, left_number, ::color::constant::xyz::illuminant::two_entity > source_type;
14455 	typedef ::color::constant::xyz::illuminant::point< scalar_name, right_number, ::color::constant::xyz::illuminant::two_entity > destination_type;
14456 
rho_Scolor::constant::xyz::adaptation::matrix14457 	static scalar_type rho_S() {
14458 		return method_type::a11() * source_type::X() + method_type::a12() * source_type::Y() + method_type::a13() * source_type::Z();
14459 	}
gamma_Scolor::constant::xyz::adaptation::matrix14460 	static scalar_type gamma_S() {
14461 		return method_type::a21() * source_type::X() + method_type::a22() * source_type::Y() + method_type::a23() * source_type::Z();
14462 	}
beta_Scolor::constant::xyz::adaptation::matrix14463 	static scalar_type beta_S() {
14464 		return method_type::a31() * source_type::X() + method_type::a32() * source_type::Y() + method_type::a33() * source_type::Z();
14465 	}
14466 
rho_Dcolor::constant::xyz::adaptation::matrix14467 	static scalar_type rho_D() {
14468 		return method_type::a11() * destination_type::X() + method_type::a12() * destination_type::Y() + method_type::a13() * destination_type::Z();
14469 	}
gamma_Dcolor::constant::xyz::adaptation::matrix14470 	static scalar_type gamma_D() {
14471 		return method_type::a21() * destination_type::X() + method_type::a22() * destination_type::Y() + method_type::a23() * destination_type::Z();
14472 	}
beta_Dcolor::constant::xyz::adaptation::matrix14473 	static scalar_type beta_D() {
14474 		return method_type::a31() * destination_type::X() + method_type::a32() * destination_type::Y() + method_type::a33() * destination_type::Z();
14475 	}
14476 
rho_Rcolor::constant::xyz::adaptation::matrix14477 	static scalar_type rho_R() {
14478 		return rho_D() / rho_S();
14479 	}
gamma_Rcolor::constant::xyz::adaptation::matrix14480 	static scalar_type gamma_R() {
14481 		return gamma_D() / gamma_S();
14482 	}
beta_Rcolor::constant::xyz::adaptation::matrix14483 	static scalar_type beta_R() {
14484 		return beta_D() / beta_S();
14485 	}
14486 
a11color::constant::xyz::adaptation::matrix14487 	static scalar_type const a11() {
14488 		return method_type::a11()*method_type::i11()*rho_R() + method_type::a21()*method_type::i12()*gamma_R() + method_type::a31()*method_type::i13()*beta_R();
14489 	}
a12color::constant::xyz::adaptation::matrix14490 	static scalar_type const a12() {
14491 		return method_type::a12()*method_type::i11()*rho_R() + method_type::a22()*method_type::i12()*gamma_R() + method_type::a32()*method_type::i13()*beta_R();
14492 	}
a13color::constant::xyz::adaptation::matrix14493 	static scalar_type const a13() {
14494 		return method_type::a13()*method_type::i11()*rho_R() + method_type::a23()*method_type::i12()*gamma_R() + method_type::a33()*method_type::i13()*beta_R();
14495 	}
a21color::constant::xyz::adaptation::matrix14496 	static scalar_type const a21() {
14497 		return method_type::a11()*method_type::i21()*rho_R() + method_type::a21()*method_type::i22()*gamma_R() + method_type::a31()*method_type::i23()*beta_R();
14498 	}
a22color::constant::xyz::adaptation::matrix14499 	static scalar_type const a22() {
14500 		return method_type::a12()*method_type::i21()*rho_R() + method_type::a22()*method_type::i22()*gamma_R() + method_type::a32()*method_type::i23()*beta_R();
14501 	}
a23color::constant::xyz::adaptation::matrix14502 	static scalar_type const a23() {
14503 		return method_type::a13()*method_type::i21()*rho_R() + method_type::a23()*method_type::i22()*gamma_R() + method_type::a33()*method_type::i23()*beta_R();
14504 	}
a31color::constant::xyz::adaptation::matrix14505 	static scalar_type const a31() {
14506 		return method_type::a11()*method_type::i31()*rho_R() + method_type::a21()*method_type::i32()*gamma_R() + method_type::a31()*method_type::i33()*beta_R();
14507 	}
a32color::constant::xyz::adaptation::matrix14508 	static scalar_type const a32() {
14509 		return method_type::a12()*method_type::i31()*rho_R() + method_type::a22()*method_type::i32()*gamma_R() + method_type::a32()*method_type::i33()*beta_R();
14510 	}
a33color::constant::xyz::adaptation::matrix14511 	static scalar_type const a33() {
14512 		return method_type::a13()*method_type::i31()*rho_R() + method_type::a23()*method_type::i32()*gamma_R() + method_type::a33()*method_type::i33()*beta_R();
14513 	}
14514 
i11color::constant::xyz::adaptation::matrix14515 	static scalar_type const i11() {
14516 		return method_type::a11()*method_type::i11()/rho_R() + method_type::a21()*method_type::i12()/gamma_R() + method_type::a31()*method_type::i13()/beta_R();
14517 	}
i12color::constant::xyz::adaptation::matrix14518 	static scalar_type const i12() {
14519 		return method_type::a12()*method_type::i11()/rho_R() + method_type::a22()*method_type::i12()/gamma_R() + method_type::a32()*method_type::i13()/beta_R();
14520 	}
i13color::constant::xyz::adaptation::matrix14521 	static scalar_type const i13() {
14522 		return method_type::a13()*method_type::i11()/rho_R() + method_type::a23()*method_type::i12()/gamma_R() + method_type::a33()*method_type::i13()/beta_R();
14523 	}
i21color::constant::xyz::adaptation::matrix14524 	static scalar_type const i21() {
14525 		return method_type::a11()*method_type::i21()/rho_R() + method_type::a21()*method_type::i22()/gamma_R() + method_type::a31()*method_type::i23()/beta_R();
14526 	}
i22color::constant::xyz::adaptation::matrix14527 	static scalar_type const i22() {
14528 		return method_type::a12()*method_type::i21()/rho_R() + method_type::a22()*method_type::i22()/gamma_R() + method_type::a32()*method_type::i23()/beta_R();
14529 	}
i23color::constant::xyz::adaptation::matrix14530 	static scalar_type const i23() {
14531 		return method_type::a13()*method_type::i21()/rho_R() + method_type::a23()*method_type::i22()/gamma_R() + method_type::a33()*method_type::i23()/beta_R();
14532 	}
i31color::constant::xyz::adaptation::matrix14533 	static scalar_type const i31() {
14534 		return method_type::a11()*method_type::i31()/rho_R() + method_type::a21()*method_type::i32()/gamma_R() + method_type::a31()*method_type::i33()/beta_R();
14535 	}
i32color::constant::xyz::adaptation::matrix14536 	static scalar_type const i32() {
14537 		return method_type::a12()*method_type::i31()/rho_R() + method_type::a22()*method_type::i32()/gamma_R() + method_type::a32()*method_type::i33()/beta_R();
14538 	}
i33color::constant::xyz::adaptation::matrix14539 	static scalar_type const i33() {
14540 		return method_type::a13()*method_type::i31()/rho_R() + method_type::a23()*method_type::i32()/gamma_R() + method_type::a33()*method_type::i33()/beta_R();
14541 	}
14542 
encodecolor::constant::xyz::adaptation::matrix14543 	static void encode(scalar_name &X, scalar_name &Y, scalar_name &Z) {
14544 		scalar_type x = a11() * X + a12() * Y + a13() * Z;
14545 		scalar_type y = a21() * X + a22() * Y + a23() * Z;
14546 		scalar_type z = a31() * X + a32() * Y + a33() * Z;
14547 		X = x;
14548 		Y = y;
14549 		Z = z;
14550 	}
14551 
decodecolor::constant::xyz::adaptation::matrix14552 	static void decode(scalar_name &X, scalar_name &Y, scalar_name &Z) {
14553 		scalar_type x = i11() * X + i12() * Y + i13() * Z;
14554 		scalar_type y = i21() * X + i22() * Y + i23() * Z;
14555 		scalar_type z = i31() * X + i32() * Y + i33() * Z;
14556 		X = x;
14557 		Y = y;
14558 		Z = z;
14559 	}
14560 
14561 };
14562 
14563 template
14564 <
14565 	typename scalar_name
14566 	,::color::constant::xyz::illuminant::name_entity both_number
14567 	,::color::constant::xyz::adaptation::scaling_entity scaling_number
14568 	>
14569 struct matrix< scalar_name, both_number, both_number, scaling_number > {
14570 	typedef scalar_name scalar_type;
14571 
encodecolor::constant::xyz::adaptation::matrix14572 	static void encode(scalar_name &X, scalar_name &Y, scalar_name &Z) {
14573 	}
decodecolor::constant::xyz::adaptation::matrix14574 	static void decode(scalar_name &X, scalar_name &Y, scalar_name &Z) {
14575 	}
14576 };
14577 
14578 }
14579 }
14580 }
14581 }
14582 
14583 namespace color {
14584 namespace constant {
14585 namespace xyz {
14586 namespace transformation {
14587 
14588 template
14589 <
14590 	typename scalar_name
14591 	, ::color::constant::xyz::space::name_entity space_number = ::color::constant::xyz::space::sRGB_entity
14592 	, ::color::constant::xyz::illuminant::name_entity illuminant_number = static_cast< ::color::constant::xyz::illuminant::name_entity >(::color::constant::xyz::space::illuminant< space_number >::name_entity)
14593 	, ::color::constant::xyz::illuminant::observer_entity observer_number = static_cast< ::color::constant::xyz::illuminant::observer_entity >(::color::constant::xyz::space::illuminant< space_number >::observer_entity)
14594 	>
14595 struct matrix {
14596 public:
14597 	typedef scalar_name scalar_type;
14598 
14599 	typedef ::color::constant::xyz::transformation::matrix<scalar_type> this_type;
14600 
14601 	typedef ::color::constant::xyz::space::primary< scalar_type, space_number > system_type;
14602 
14603 	typedef ::color::constant::xyz::illuminant::point< scalar_type, illuminant_number, observer_number > wp_type;
14604 
xrcolor::constant::xyz::transformation::matrix14605 	static scalar_type const xr() {
14606 		return system_type::red()[0];
14607 	}
yrcolor::constant::xyz::transformation::matrix14608 	static scalar_type const yr() {
14609 		return system_type::red()[1];
14610 	}
xgcolor::constant::xyz::transformation::matrix14611 	static scalar_type const xg() {
14612 		return system_type::green()[0];
14613 	}
ygcolor::constant::xyz::transformation::matrix14614 	static scalar_type const yg() {
14615 		return system_type::green()[1];
14616 	}
xbcolor::constant::xyz::transformation::matrix14617 	static scalar_type const xb() {
14618 		return system_type::blue()[0];
14619 	}
ybcolor::constant::xyz::transformation::matrix14620 	static scalar_type const yb() {
14621 		return system_type::blue()[1];
14622 	}
14623 
14624 private:
detQcolor::constant::xyz::transformation::matrix14625 	static scalar_type const detQ() {
14626 		return -yr()*yg()*yb()/((xg()-xb())*yr() + (xb()-xr())*yg() + (xr()-xg())*yb()) ;
14627 	}
Q11color::constant::xyz::transformation::matrix14628 	static scalar_type const Q11() {
14629 		return -detQ() * ((xb()-1)*yg() + (1-xg())*yb())/(yb()* yg());
14630 	}
Q12color::constant::xyz::transformation::matrix14631 	static scalar_type const Q12() {
14632 		return -detQ() * ((yg()-1)*xb() + (1-yb())*xg())/(yb()* yg());
14633 	}
Q13color::constant::xyz::transformation::matrix14634 	static scalar_type const Q13() {
14635 		return -detQ() * (xb()*yg() - xg()*yb()) / (yb()*yg());
14636 	}
14637 
Q21color::constant::xyz::transformation::matrix14638 	static scalar_type const Q21() {
14639 		return detQ() * ((xb()-1)*yr() + (1-xr())*yb())/(yb()* yr());
14640 	}
Q22color::constant::xyz::transformation::matrix14641 	static scalar_type const Q22() {
14642 		return detQ() * ((yr()-1)*xb() + (1-yb())*xr())/(yb()* yr());
14643 	}
Q23color::constant::xyz::transformation::matrix14644 	static scalar_type const Q23() {
14645 		return detQ() * (xb()*yr() - xr()*yb()) / (yb()*yr());
14646 	}
14647 
Q31color::constant::xyz::transformation::matrix14648 	static scalar_type const Q31() {
14649 		return -detQ() * ((xg()-1)*yr() + (1-xr())*yg())/(yg()* yr());
14650 	}
Q32color::constant::xyz::transformation::matrix14651 	static scalar_type const Q32() {
14652 		return -detQ() * ((yr()-1)*xg() + (1-yg())*xr())/(yg()* yr());
14653 	}
Q33color::constant::xyz::transformation::matrix14654 	static scalar_type const Q33() {
14655 		return -detQ() * (xg()*yr() - xr()*yg()) / (yg()*yr());
14656 	}
14657 
14658 public:
Srcolor::constant::xyz::transformation::matrix14659 	static scalar_type const Sr() {
14660 		return Q11() * wp_type::X() + Q12() * wp_type::Y() + Q13() * wp_type::Z();
14661 	}
Sgcolor::constant::xyz::transformation::matrix14662 	static scalar_type const Sg() {
14663 		return Q21() * wp_type::X() + Q22() * wp_type::Y() + Q23() * wp_type::Z();
14664 	}
Sbcolor::constant::xyz::transformation::matrix14665 	static scalar_type const Sb() {
14666 		return Q31() * wp_type::X() + Q32() * wp_type::Y() + Q33() * wp_type::Z();
14667 	}
14668 
Xrcolor::constant::xyz::transformation::matrix14669 	static scalar_type const Xr() {
14670 		return xr()/yr() ;
14671 	}
Yrcolor::constant::xyz::transformation::matrix14672 	static scalar_type const Yr() {
14673 		return scalar_type(1);
14674 	}
Zrcolor::constant::xyz::transformation::matrix14675 	static scalar_type const Zr() {
14676 		return (scalar_type(1)-xr()-yr())/yr();
14677 	}
14678 
Xgcolor::constant::xyz::transformation::matrix14679 	static scalar_type const Xg() {
14680 		return xg()/yg();
14681 	}
Ygcolor::constant::xyz::transformation::matrix14682 	static scalar_type const Yg() {
14683 		return scalar_type(1);
14684 	}
Zgcolor::constant::xyz::transformation::matrix14685 	static scalar_type const Zg() {
14686 		return (scalar_type(1)-xg()-yg())/yg();
14687 	}
14688 
Xbcolor::constant::xyz::transformation::matrix14689 	static scalar_type const Xb() {
14690 		return xb()/yb();
14691 	}
Ybcolor::constant::xyz::transformation::matrix14692 	static scalar_type const Yb() {
14693 		return scalar_type(1);
14694 	}
Zbcolor::constant::xyz::transformation::matrix14695 	static scalar_type const Zb() {
14696 		return (scalar_type(1)-xb()-yb())/yb();
14697 	}
14698 
M11color::constant::xyz::transformation::matrix14699 	static scalar_type const M11() {
14700 		return Sr()*Xr();
14701 	}
M12color::constant::xyz::transformation::matrix14702 	static scalar_type const M12() {
14703 		return Sg()*Xg();
14704 	}
M13color::constant::xyz::transformation::matrix14705 	static scalar_type const M13() {
14706 		return Sb()*Xb();
14707 	}
M21color::constant::xyz::transformation::matrix14708 	static scalar_type const M21() {
14709 		return Sr()*Yr();
14710 	}
M22color::constant::xyz::transformation::matrix14711 	static scalar_type const M22() {
14712 		return Sg()*Yg();
14713 	}
M23color::constant::xyz::transformation::matrix14714 	static scalar_type const M23() {
14715 		return Sb()*Yb();
14716 	}
M31color::constant::xyz::transformation::matrix14717 	static scalar_type const M31() {
14718 		return Sr()*Zr();
14719 	}
M32color::constant::xyz::transformation::matrix14720 	static scalar_type const M32() {
14721 		return Sg()*Zg();
14722 	}
M33color::constant::xyz::transformation::matrix14723 	static scalar_type const M33() {
14724 		return Sb()*Zb();
14725 	}
14726 
detMcolor::constant::xyz::transformation::matrix14727 	static scalar_type const detM() {
14728 		return M11()*(M22()*M33()-M23()*M32())-M12()*(M21()*M33()-M23()*M31())+M13()*(M21()*M32()-M22()*M31());
14729 	}
14730 
i11color::constant::xyz::transformation::matrix14731 	static scalar_type const i11() {
14732 		return (M22()*M33()-M23()*M32()) / detM();
14733 	}
i12color::constant::xyz::transformation::matrix14734 	static scalar_type const i12() {
14735 		return (M13()*M32()-M12()*M33()) / detM();
14736 	}
i13color::constant::xyz::transformation::matrix14737 	static scalar_type const i13() {
14738 		return (M12()*M23()-M13()*M22()) / detM();
14739 	}
i21color::constant::xyz::transformation::matrix14740 	static scalar_type const i21() {
14741 		return (M23()*M31()-M21()*M33()) / detM();
14742 	}
i22color::constant::xyz::transformation::matrix14743 	static scalar_type const i22() {
14744 		return (M11()*M33()-M13()*M31()) / detM();
14745 	}
i23color::constant::xyz::transformation::matrix14746 	static scalar_type const i23() {
14747 		return (M13()*M21()-M11()*M23()) / detM();
14748 	}
i31color::constant::xyz::transformation::matrix14749 	static scalar_type const i31() {
14750 		return (M21()*M32()-M22()*M31()) / detM();
14751 	}
i32color::constant::xyz::transformation::matrix14752 	static scalar_type const i32() {
14753 		return (M12()*M31()-M11()*M32()) / detM();
14754 	}
i33color::constant::xyz::transformation::matrix14755 	static scalar_type const i33() {
14756 		return (M11()*M22()-M12()*M21()) / detM();
14757 	}
14758 };
14759 }
14760 }
14761 }
14762 }
14763 
14764 namespace color {
14765 namespace get {
14766 
14767 namespace constant {
14768 namespace rgb {
14769 namespace gray {
14770 
14771 enum formula_enum {
14772 	average_entity
14773 	, middle_entity
14774 	, yuv709_entity
14775 	, hsl_star_entity
14776 	,lightness_entity
14777 };
14778 
14779 }
14780 }
14781 }
14782 
14783 namespace _internal {
14784 namespace rgb {
14785 namespace gray {
14786 
14787 template
14788 <
14789 	typename category_name
14790 	,enum ::color::get::constant::rgb::gray::formula_enum formula_number
14791 	>
14792 struct usher {
14793 	typedef category_name category_type;
14794 
14795 	typedef ::color::model<category_type> model_type;
14796 	typedef typename ::color::trait::component< category_name >::return_type return_type;
14797 
processcolor::get::_internal::rgb::gray::usher14798 	static return_type process(model_type const& color_parameter) {
14799 		return color_parameter.template get<0>();
14800 	}
14801 };
14802 
14803 template< typename tag_name >
14804 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::gray::average_entity > {
14805 	typedef ::color::category::rgb< tag_name > category_type;
14806 	typedef ::color::model< category_type > model_type;
14807 
14808 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
14809 
14810 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
14811 
14812 	typedef typename ::color::trait::component< akin_type >::return_type return_type;
14813 
14814 	typedef ::color::_internal::diverse< akin_type > diverse_type;
14815 	typedef ::color::_internal::normalize< category_type > normalize_type;
14816 
14817 	typedef ::color::constant::gray::rgb< akin_type > gray_const_type;
14818 
14819 	enum {
14820 		red_p = ::color::place::_internal::red<category_type>::position_enum
14821 		, green_p = ::color::place::_internal::green<category_type>::position_enum
14822 		, blue_p = ::color::place::_internal::blue<category_type>::position_enum
14823 	};
14824 
processcolor::get::_internal::rgb::gray::usher14825 	static return_type process(model_type const& color_parameter) {
14826 		scalar_type value =
14827 			normalize_type::template process<red_p >(color_parameter.template get<red_p >())
14828 		+ normalize_type::template process<green_p >(color_parameter.template get<green_p >())
14829 		+ normalize_type::template process<blue_p >(color_parameter.template get<blue_p >())
14830 		;
14831 		value /= scalar_type(3);
14832 		return diverse_type::template process<0>(value);
14833 	}
14834 };
14835 
14836 template< typename tag_name >
14837 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::gray::middle_entity > {
14838 	typedef ::color::category::rgb< tag_name > category_type;
14839 	typedef ::color::model< category_type > model_type;
14840 
14841 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
14842 
14843 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
14844 
14845 	typedef typename ::color::trait::component< akin_type >::return_type return_type;
14846 
14847 	typedef ::color::_internal::diverse< akin_type > diverse_type;
14848 	typedef ::color::_internal::normalize< category_type > normalize_type;
14849 
14850 	typedef ::color::constant::gray::rgb< akin_type > gray_const_type;
14851 
14852 	enum {
14853 		red_p = ::color::place::_internal::red<category_type>::position_enum
14854 		, green_p = ::color::place::_internal::green<category_type>::position_enum
14855 		, blue_p = ::color::place::_internal::blue<category_type>::position_enum
14856 	};
14857 
processcolor::get::_internal::rgb::gray::usher14858 	static return_type process(model_type const& color_parameter) {
14859 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p >());
14860 		scalar_type g = normalize_type::template process<green_p >(color_parameter.template get<green_p >());
14861 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
14862 		scalar_type value = (std::max<scalar_type>({r,g,b}) + std::min<scalar_type>({r,g,b})) / scalar_type(2);
14863 		return diverse_type::template process<0>(value);
14864 	}
14865 };
14866 
14867 template< typename tag_name >
14868 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::gray::yuv709_entity > {
14869 	typedef ::color::category::rgb< tag_name > category_type;
14870 	typedef ::color::model< category_type > model_type;
14871 
14872 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
14873 
14874 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
14875 
14876 	typedef typename ::color::trait::component< akin_type >::return_type return_type;
14877 
14878 	typedef ::color::_internal::diverse< akin_type > diverse_type;
14879 	typedef ::color::_internal::normalize< category_type > normalize_type;
14880 
14881 	typedef ::color::constant::gray::rgb< akin_type > gray_const_type;
14882 
14883 	enum {
14884 		red_p = ::color::place::_internal::red<category_type>::position_enum
14885 		, green_p = ::color::place::_internal::green<category_type>::position_enum
14886 		, blue_p = ::color::place::_internal::blue<category_type>::position_enum
14887 	};
14888 
processcolor::get::_internal::rgb::gray::usher14889 	static return_type process(model_type const& color_parameter) {
14890 		scalar_type value =
14891 			gray_const_type::Rc() * normalize_type::template process<red_p >(color_parameter.template get<red_p >())
14892 		+ gray_const_type::Gc() * normalize_type::template process<green_p >(color_parameter.template get<green_p >())
14893 		+ gray_const_type::Bc() * normalize_type::template process<blue_p >(color_parameter.template get<blue_p >())
14894 		;
14895 		return diverse_type::template process<0>(value);
14896 	}
14897 };
14898 
14899 template< typename tag_name >
14900 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::gray::hsl_star_entity > {
14901 	typedef ::color::category::rgb< tag_name > category_type;
14902 	typedef ::color::model< category_type > model_type;
14903 
14904 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
14905 
14906 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
14907 
14908 	typedef typename ::color::trait::component< akin_type >::return_type return_type;
14909 
14910 	typedef ::color::_internal::diverse< akin_type > diverse_type;
14911 	typedef ::color::_internal::normalize< category_type > normalize_type;
14912 
14913 	typedef ::color::constant::gray::rgb< akin_type > gray_const_type;
14914 
14915 	enum {
14916 		red_p = ::color::place::_internal::red<category_type>::position_enum
14917 		, green_p = ::color::place::_internal::green<category_type>::position_enum
14918 		, blue_p = ::color::place::_internal::blue<category_type>::position_enum
14919 	};
14920 
processcolor::get::_internal::rgb::gray::usher14921 	static return_type process(model_type const& color_parameter) {
14922 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p >());
14923 		scalar_type g = normalize_type::template process<green_p >(color_parameter.template get<green_p >());
14924 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
14925 		scalar_type delta = std::max<scalar_type>({ r,g,b }) - std::min<scalar_type>({r,g,b});
14926 		scalar_type value = (scalar_type(1) - delta) * (scalar_type(1) - delta);
14927 		return diverse_type::template process<0>(value);
14928 	}
14929 };
14930 
14931 template< typename tag_name >
14932 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::gray::lightness_entity > {
14933 	typedef ::color::category::rgb< tag_name > category_type;
14934 	typedef ::color::model< category_type > model_type;
14935 
14936 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
14937 
14938 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
14939 
14940 	typedef typename ::color::trait::component< akin_type >::return_type return_type;
14941 
14942 	typedef ::color::_internal::diverse< akin_type > diverse_type;
14943 	typedef ::color::_internal::normalize< category_type > normalize_type;
14944 
14945 	typedef ::color::constant::gray::rgb< akin_type > gray_const_type;
14946 
14947 	typedef ::color::constant::xyz::transformation::matrix< scalar_type > xyz_matrix_type;
14948 	typedef ::color::constant::xyz::space::gamma< scalar_type, ::color::constant::xyz::space::sRGB_entity > xyz_gamma_type;
14949 	typedef ::color::constant::xyz::illuminant::point< scalar_type, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > white_point_type;
14950 
14951 	enum {
14952 		red_p = ::color::place::_internal::red<category_type>::position_enum
14953 		,green_p = ::color::place::_internal::green<category_type>::position_enum
14954 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
14955 	};
14956 
fcolor::get::_internal::rgb::gray::usher14957 	static scalar_type f(scalar_type const& t) {
14958 		static const scalar_type epsilon = scalar_type(216)/scalar_type(24389);
14959 		static const scalar_type k = scalar_type(24389)/scalar_type(27);
14960 		if(t > epsilon) {
14961 			return cbrt(t);
14962 		}
14963 		return (k*t + scalar_type(16))/scalar_type(116);
14964 	}
14965 
processcolor::get::_internal::rgb::gray::usher14966 	static return_type process(model_type const& color_parameter) {
14967 		static const scalar_type b21 = xyz_matrix_type::M21(), b22 = xyz_matrix_type::M22(), b23 = xyz_matrix_type::M23();
14968 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p >());
14969 		scalar_type g = normalize_type::template process<green_p >(color_parameter.template get<green_p >());
14970 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
14971 		r = xyz_gamma_type::decode(r);
14972 		g = xyz_gamma_type::decode(g);
14973 		b = xyz_gamma_type::decode(b);
14974 		scalar_type y = b21 * r + b22 * g + b23 * b;
14975 		y /= white_point_type::Y();
14976 		scalar_type fy = f(y);
14977 		scalar_type l = scalar_type(116) * fy - scalar_type(16);
14978 		l /= scalar_type(100);
14979 		return diverse_type::template process<0>(l);
14980 	}
14981 };
14982 
14983 }
14984 }
14985 }
14986 
14987 template
14988 <
14989 	enum ::color::get::constant::rgb::gray::formula_enum formula_number = ::color::get::constant::rgb::gray::yuv709_entity
14990 ,typename tag_name
14991 >
14992 inline
14993 typename ::color::model< ::color::category::rgb< tag_name> >::component_const_type
gray(::color::model<::color::category::rgb<tag_name>> const & color_parameter)14994 gray
14995 (
14996 	::color::model< ::color::category::rgb< tag_name> > const& color_parameter
14997 ) {
14998 	return ::color::get::_internal::rgb::gray::usher< ::color::category::rgb< tag_name >, formula_number >::process(color_parameter);
14999 }
15000 
15001 }
15002 }
15003 
15004 namespace color {
15005 namespace get {
15006 
15007 namespace constant {
15008 namespace rgb {
15009 namespace saturation {
15010 
15011 enum formula_enum {
15012 	hsv_entity
15013 	, hsl_entity
15014 	, hsi_entity
15015 
15016 };
15017 
15018 }
15019 }
15020 }
15021 
15022 namespace _internal {
15023 namespace rgb {
15024 namespace saturation {
15025 
15026 template
15027 <
15028 	typename category_name
15029 	,enum ::color::get::constant::rgb::saturation::formula_enum formula_number
15030 	>
15031 struct usher {
15032 	typedef category_name category_type;
15033 
15034 	typedef ::color::model<category_type> model_type;
15035 	typedef typename ::color::trait::component< category_name >::return_type return_type;
15036 
processcolor::get::_internal::rgb::saturation::usher15037 	static return_type process(model_type const& color_parameter) {
15038 		return color_parameter.template get<0>();
15039 	}
15040 };
15041 
15042 template< typename tag_name >
15043 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::saturation::hsv_entity > {
15044 	typedef ::color::category::rgb< tag_name > category_type;
15045 	typedef ::color::model< category_type > model_type;
15046 
15047 	typedef typename ::color::akin::hsv< category_type >::akin_type akin_type;
15048 	typedef ::color::_internal::diverse< akin_type > diverse_type;
15049 
15050 	typedef ::color::_internal::normalize< category_type > normalize_type;
15051 
15052 	typedef typename ::color::trait::scalar<category_type> scalar_trait_type;
15053 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
15054 	typedef typename ::color::trait::component< category_type >::return_type return_type;
15055 
15056 	enum {
15057 		red_p = ::color::place::_internal::red<category_type>::position_enum
15058 		, green_p = ::color::place::_internal::green<category_type>::position_enum
15059 		, blue_p = ::color::place::_internal::blue<category_type>::position_enum
15060 	};
15061 
processcolor::get::_internal::rgb::saturation::usher15062 	static return_type process(model_type const& c) {
15063 		scalar_type r = normalize_type::template process<red_p >(c.template get<red_p >());
15064 		scalar_type g = normalize_type::template process<green_p>(c.template get<green_p>());
15065 		scalar_type b = normalize_type::template process<blue_p >(c.template get<blue_p >());
15066 		scalar_type lo = std::min<scalar_type>({r,g,b});
15067 		scalar_type hi = std::max<scalar_type>({r,g,b});
15068 		scalar_type delta = hi - lo;
15069 		scalar_type s = 0;
15070 		if(false == scalar_trait_type::is_small(hi)) {
15071 			s = delta / hi;
15072 		}
15073 		return diverse_type::template process<0>(s);
15074 	}
15075 };
15076 
15077 template< typename tag_name >
15078 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::saturation::hsl_entity > {
15079 	typedef ::color::category::rgb< tag_name > category_type;
15080 	typedef ::color::model< category_type > model_type;
15081 
15082 	typedef typename ::color::akin::hsv< category_type >::akin_type akin_type;
15083 	typedef ::color::_internal::diverse< akin_type > diverse_type;
15084 
15085 	typedef ::color::_internal::normalize< category_type > normalize_type;
15086 
15087 	typedef typename ::color::trait::scalar<category_type> scalar_trait_type;
15088 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
15089 
15090 	typedef typename ::color::trait::component< akin_type >::return_type return_type;
15091 
15092 	enum {
15093 		red_p = ::color::place::_internal::red<category_type>::position_enum
15094 		, green_p = ::color::place::_internal::green<category_type>::position_enum
15095 		, blue_p = ::color::place::_internal::blue<category_type>::position_enum
15096 	};
15097 
processcolor::get::_internal::rgb::saturation::usher15098 	static return_type process(model_type const& c) {
15099 		scalar_type r = normalize_type::template process<red_p >(c.template get<red_p >());
15100 		scalar_type g = normalize_type::template process<green_p>(c.template get<green_p>());
15101 		scalar_type b = normalize_type::template process<blue_p >(c.template get<blue_p >());
15102 		const scalar_type hi = std::max<scalar_type>({ r, g, b });
15103 		const scalar_type lo = std::min<scalar_type>({ r, g, b });
15104 		scalar_type delta = hi - lo;
15105 		scalar_type s = 0;
15106 		scalar_type l = (hi + lo) / scalar_type(2);
15107 		if(false == scalar_trait_type::is_small(delta)) {
15108 			s = delta / (scalar_type(1) - fabs(scalar_type(2)*l - scalar_type(1)));
15109 		}
15110 		return diverse_type::template process<0>(s);
15111 	}
15112 };
15113 
15114 template< typename tag_name >
15115 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::saturation::hsi_entity > {
15116 	typedef ::color::category::rgb< tag_name > category_type;
15117 	typedef ::color::model< category_type > model_type;
15118 
15119 	typedef typename ::color::akin::hsv< category_type >::akin_type akin_type;
15120 	typedef ::color::_internal::diverse< akin_type > diverse_type;
15121 
15122 	typedef ::color::_internal::normalize< category_type > normalize_type;
15123 
15124 	typedef typename ::color::trait::scalar<category_type> scalar_trait_type;
15125 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
15126 
15127 	typedef typename ::color::trait::component< akin_type >::return_type return_type;
15128 
15129 	enum {
15130 		red_p = ::color::place::_internal::red<category_type>::position_enum
15131 		, green_p = ::color::place::_internal::green<category_type>::position_enum
15132 		, blue_p = ::color::place::_internal::blue<category_type>::position_enum
15133 	};
15134 
processcolor::get::_internal::rgb::saturation::usher15135 	static return_type process(model_type const& c) {
15136 		scalar_type r = normalize_type::template process<red_p >(c.template get<red_p >());
15137 		scalar_type g = normalize_type::template process<green_p>(c.template get<green_p>());
15138 		scalar_type b = normalize_type::template process<blue_p >(c.template get<blue_p >());
15139 		scalar_type lo = std::min<scalar_type>({r,g,b});
15140 		scalar_type i = (r + g + b) / scalar_type(3);
15141 		scalar_type s = scalar_type(1);
15142 		if(false == scalar_trait_type::is_small(i)) {
15143 			s = scalar_type(1) - lo / i;
15144 		}
15145 		return diverse_type::template process<0>(s);
15146 	}
15147 };
15148 
15149 }
15150 }
15151 }
15152 
15153 template
15154 <
15155 	enum ::color::get::constant::rgb::saturation::formula_enum formula_number = ::color::get::constant::rgb::saturation::hsv_entity
15156 ,typename tag_name
15157 >
15158 inline
15159 typename ::color::model< ::color::category::rgb< tag_name> >::component_const_type
saturation(::color::model<::color::category::rgb<tag_name>> const & color_parameter)15160 saturation
15161 (
15162 	::color::model< ::color::category::rgb< tag_name> > const& color_parameter
15163 ) {
15164 	return ::color::get::_internal::rgb::saturation::usher< ::color::category::rgb< tag_name >, formula_number >::process(color_parameter);
15165 }
15166 
15167 }
15168 }
15169 
15170 namespace color {
15171 namespace get {
15172 
15173 namespace constant {
15174 namespace rgb {
15175 namespace chroma {
15176 
15177 enum formula_enum {
15178 	error_entity
15179 	,max_minus_min_entity
15180 	,distance2gray_entity
15181 };
15182 
15183 }
15184 }
15185 }
15186 
15187 namespace _internal {
15188 namespace rgb {
15189 namespace chroma {
15190 
15191 template
15192 <
15193 	typename category_name
15194 	,enum ::color::get::constant::rgb::chroma::formula_enum formula_number
15195 	>
15196 struct usher {
15197 	typedef category_name category_type;
15198 
15199 	typedef ::color::model<category_type> model_type;
15200 	typedef typename ::color::trait::component< category_name >::return_type component_return_type;
15201 
processcolor::get::_internal::rgb::chroma::usher15202 	static component_return_type process(model_type const& m) {
15203 		return m.template get<0>();
15204 	}
15205 };
15206 
15207 template< typename tag_name >
15208 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::chroma::max_minus_min_entity > {
15209 	typedef ::color::category::rgb< tag_name > category_type;
15210 	typedef ::color::model< category_type > model_type;
15211 
15212 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
15213 	typedef typename ::color::trait::component< category_type >::return_type component_return_type;
15214 
15215 	enum {
15216 		red_p = ::color::place::_internal::red<category_type>::position_enum
15217 		,green_p = ::color::place::_internal::green<category_type>::position_enum
15218 		,blue_p = ::color::place::_internal::blue<category_type>::position_enum
15219 	};
15220 
processcolor::get::_internal::rgb::chroma::usher15221 	static component_return_type process(model_type const& color_parameter) {
15222 		auto r = color_parameter.template get<red_p >();
15223 		auto g = color_parameter.template get<green_p>();
15224 		auto b = color_parameter.template get<blue_p >();
15225 		auto max = std::max<component_return_type>({ r, g, b });
15226 		auto min = std::min<component_return_type>({ r, g, b });
15227 		return max - min;
15228 	}
15229 };
15230 
15231 template< typename tag_name >
15232 struct usher< ::color::category::rgb< tag_name >, ::color::get::constant::rgb::chroma::distance2gray_entity > {
15233 	typedef ::color::category::rgb< tag_name > category_type;
15234 
15235 	typedef ::color::model< category_type > model_type;
15236 
15237 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
15238 	typedef typename ::color::trait::component< category_type >::return_type component_return_type;
15239 
15240 	typedef ::color::_internal::normalize< category_type > normalize_type;
15241 	typedef ::color::_internal::diverse< category_type > diverse_type;
15242 
15243 	enum {
15244 		red_p = ::color::place::_internal::red<category_type>::position_enum
15245 		, green_p = ::color::place::_internal::green<category_type>::position_enum
15246 		, blue_p = ::color::place::_internal::blue<category_type>::position_enum
15247 	};
15248 
squarecolor::get::_internal::rgb::chroma::usher15249 	static scalar_type square(scalar_type const& v) {
15250 		return v*v;
15251 	}
15252 
processcolor::get::_internal::rgb::chroma::usher15253 	static component_return_type process(model_type const& color_parameter) {
15254 		scalar_type r = normalize_type::template process<red_p >(color_parameter.template get<red_p >());
15255 		scalar_type g = normalize_type::template process<green_p >(color_parameter.template get<green_p >());
15256 		scalar_type b = normalize_type::template process<blue_p >(color_parameter.template get<blue_p >());
15257 		scalar_type value = (square(b - g) + square(b - r) + square(g - r))/ sqrt(scalar_type(3));
15258 		value *= sqrt(square(0.5) + square(0.5)+ square(0.5));
15259 		return diverse_type::template process<0>(value);
15260 	}
15261 };
15262 
15263 }
15264 }
15265 }
15266 
15267 template
15268 <
15269 	enum ::color::get::constant::rgb::chroma::formula_enum formula_number = ::color::get::constant::rgb::chroma::max_minus_min_entity
15270 ,typename tag_name
15271 >
15272 inline
15273 typename ::color::model< ::color::category::rgb< tag_name> >::component_const_type
chroma(::color::model<::color::category::rgb<tag_name>> const & color_parameter)15274 chroma
15275 (
15276 	::color::model< ::color::category::rgb< tag_name> > const& color_parameter
15277 ) {
15278 	return ::color::get::_internal::rgb::chroma::usher< ::color::category::rgb< tag_name >, formula_number >::process(color_parameter);
15279 }
15280 
15281 }
15282 }
15283 
15284 namespace color {
15285 namespace set {
15286 template< typename tag_name >
15287 inline
15288 void
red(::color::model<::color::category::rgb<tag_name>> & color_parameter,typename::color::model<::color::category::rgb<tag_name>>::component_input_const_type component_parameter)15289 red
15290 (
15291 	::color::model< ::color::category::rgb<tag_name> > & color_parameter,
15292 	typename ::color::model< ::color::category::rgb<tag_name> >::component_input_const_type component_parameter
15293 ) {
15294 	typedef ::color::category::rgb<tag_name> category_type;
15295 	enum { red_p = ::color::place::_internal::red<category_type>::position_enum };
15296 	color_parameter.template set<red_p>(component_parameter);
15297 }
15298 
15299 }
15300 }
15301 
15302 namespace color {
15303 namespace set {
15304 template< typename tag_name >
15305 inline
15306 void
green(::color::model<::color::category::rgb<tag_name>> & color_parameter,typename::color::model<::color::category::rgb<tag_name>>::component_input_const_type component_parameter)15307 green
15308 (
15309 	::color::model< ::color::category::rgb<tag_name> > & color_parameter,
15310 	typename ::color::model< ::color::category::rgb<tag_name> >::component_input_const_type component_parameter
15311 ) {
15312 	typedef ::color::category::rgb<tag_name> category_type;
15313 	enum { green_p = ::color::place::_internal::green<category_type>::position_enum };
15314 	color_parameter.template set<green_p>(component_parameter);
15315 }
15316 
15317 }
15318 }
15319 
15320 namespace color {
15321 namespace set {
15322 template< typename tag_name >
15323 inline
15324 void
blue(::color::model<::color::category::rgb<tag_name>> & color_parameter,typename::color::model<::color::category::rgb<tag_name>>::component_input_const_type component_parameter)15325 blue
15326 (
15327 	::color::model< ::color::category::rgb<tag_name> > & color_parameter,
15328 	typename ::color::model< ::color::category::rgb<tag_name> >::component_input_const_type component_parameter
15329 ) {
15330 	typedef ::color::category::rgb<tag_name> category_type;
15331 	enum { blue_p = ::color::place::_internal::blue<category_type>::position_enum };
15332 	color_parameter.template set<blue_p>(component_parameter);
15333 }
15334 
15335 }
15336 }
15337 
15338 namespace color {
15339 namespace set {
15340 
15341 template< typename tag_name >
15342 inline
15343 void
gray(::color::model<::color::category::rgb<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::rgb<tag_name>>::akin_type>::model_type component_parameter)15344 gray
15345 (
15346 	::color::model< ::color::category::rgb<tag_name> > & color_parameter
15347 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::rgb<tag_name> >::akin_type >::model_type component_parameter
15348 ) {
15349 	typedef ::color::category::rgb<tag_name> category_type;
15350 	typedef typename ::color::trait::scalar< category_type >::instance_type scalar_type;
15351 	typedef typename ::color::akin::gray<category_type >::akin_type akin_type;
15352 	typedef ::color::_internal::normalize< category_type > normalize_rgb_type;
15353 	typedef ::color::_internal::normalize< akin_type > normalize_akin_type;
15354 	typedef ::color::constant::gray::rgb< akin_type > gray_const_type;
15355 	enum {
15356 		red_p = ::color::place::_internal::red<category_type>::position_enum
15357 		, green_p = ::color::place::_internal::green<category_type>::position_enum
15358 		, blue_p = ::color::place::_internal::blue<category_type>::position_enum
15359 	};
15360 	scalar_type value =
15361 		gray_const_type::Rc() * normalize_rgb_type::template process<red_p >(color_parameter.template get<red_p >())
15362 	+ gray_const_type::Gc() * normalize_rgb_type::template process<green_p>(color_parameter.template get<green_p>())
15363 	+ gray_const_type::Bc() * normalize_rgb_type::template process<blue_p >(color_parameter.template get<blue_p >());
15364 	value = normalize_akin_type::template process<0>(component_parameter) / value;
15365 	::color::operation::scale(color_parameter, value);
15366 }
15367 
15368 }
15369 }
15370 
15371 namespace color {
15372 namespace set {
15373 template< typename value_name, unsigned red_position, unsigned green_position, unsigned blue_position, unsigned alpha_position >
15374 inline
15375 void
alpha(::color::model<::color::category::rgb<::color::category::_internal::rgba_scramble<value_name,red_position,green_position,blue_position,alpha_position>>> & color_parameter,typename::color::model<::color::category::rgb<::color::category::_internal::rgba_scramble<value_name,red_position,green_position,blue_position,alpha_position>>>::component_input_const_type component_parameter)15376 alpha
15377 (
15378 	::color::model< ::color::category::rgb< ::color::category::_internal::rgba_scramble < value_name, red_position, green_position, blue_position, alpha_position > > > & color_parameter
15379 	,typename ::color::model< ::color::category::rgb< ::color::category::_internal::rgba_scramble < value_name, red_position, green_position, blue_position, alpha_position > > >::component_input_const_type component_parameter
15380 ) {
15381 	typedef ::color::category::_internal::rgba_scramble < value_name, red_position, green_position, blue_position, alpha_position > tag_type;
15382 	typedef ::color::category::rgb<tag_type> category_type;
15383 	enum { alpha_p = ::color::place::_internal::alpha<category_type>::position_enum };
15384 	color_parameter.template set<alpha_p>(component_parameter);
15385 }
15386 
15387 }
15388 }
15389 
15390 namespace color {
15391 namespace _internal {
15392 
15393 template< typename rgb_tag_name, typename gray_tag_name >
15394 struct convert
15395 	<
15396 	::color::category::rgb< rgb_tag_name >
15397 	,::color::category::gray<gray_tag_name>
15398 	> {
15399 public:
15400 	typedef ::color::category::rgb< rgb_tag_name > category_left_type;
15401 	typedef ::color::category::gray<gray_tag_name> category_right_type;
15402 
15403 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
15404 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
15405 
15406 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
15407 
15408 	typedef typename container_left_trait_type::input_type container_left_input_type;
15409 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
15410 
processcolor::_internal::convert15411 	static void process
15412 	(
15413 		container_left_input_type left
15414 		,container_right_const_input_type right
15415 	) {
15416 		enum {
15417 			red_p = ::color::place::_internal::red<category_left_type>::position_enum
15418 			,green_p = ::color::place::_internal::green<category_left_type>::position_enum
15419 			,blue_p = ::color::place::_internal::blue<category_left_type>::position_enum
15420 		};
15421 		enum {
15422 			gray_p = 0
15423 		};
15424 		auto const value = container_right_trait_type::template get<gray_p>(right);
15425 		container_left_trait_type::template set<red_p >(left, reformat_type::template process<red_p,gray_p>(value));
15426 		container_left_trait_type::template set<green_p>(left, reformat_type::template process<green_p,gray_p>(value));
15427 		container_left_trait_type::template set<blue_p >(left, reformat_type::template process<blue_p,gray_p>(value));
15428 	}
15429 };
15430 
15431 }
15432 }
15433 
15434 namespace color {
15435 namespace _internal {
15436 
15437 template< typename rgb_tag_name, typename cmy_tag_name >
15438 struct convert
15439 	<
15440 	::color::category::rgb< rgb_tag_name >
15441 	,::color::category::cmy< cmy_tag_name >
15442 	> {
15443 public:
15444 	typedef ::color::category::rgb< rgb_tag_name > category_left_type;
15445 	typedef ::color::category::cmy< cmy_tag_name > category_right_type;
15446 
15447 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
15448 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
15449 
15450 	typedef typename container_left_trait_type::input_type container_left_input_type;
15451 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
15452 
15453 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
15454 	typedef ::color::operation::_internal::invert< category_right_type > invert_type;
15455 
15456 	enum {
15457 		red_p = ::color::place::_internal::red<category_left_type>::position_enum
15458 		,green_p = ::color::place::_internal::green<category_left_type>::position_enum
15459 		,blue_p = ::color::place::_internal::blue<category_left_type>::position_enum
15460 	};
15461 
15462 	enum {
15463 		cyan_p = ::color::place::_internal::cyan<category_right_type>::position_enum
15464 		,magenta_p = ::color::place::_internal::magenta<category_right_type>::position_enum
15465 		, yellow_p = ::color::place::_internal::yellow<category_right_type>::position_enum
15466 	};
15467 
processcolor::_internal::convert15468 	static void process
15469 	(
15470 		container_left_input_type left
15471 		,container_right_const_input_type right
15472 	) {
15473 		container_left_trait_type::template set<red_p >(left, reformat_type::template process<red_p, cyan_p>(invert_type::template component< cyan_p>(container_right_trait_type::template get< cyan_p>(right))));
15474 		container_left_trait_type::template set<green_p>(left, reformat_type::template process<green_p, magenta_p>(invert_type::template component<magenta_p>(container_right_trait_type::template get<magenta_p>(right))));
15475 		container_left_trait_type::template set<blue_p >(left, reformat_type::template process<blue_p, yellow_p>(invert_type::template component< yellow_p>(container_right_trait_type::template get< yellow_p>(right))));
15476 	}
15477 };
15478 
15479 }
15480 }
15481 
15482 namespace color {
15483 namespace _internal {
15484 
15485 template< typename rgb_tag_name, typename cmyk_tag_name >
15486 struct convert
15487 	<
15488 	::color::category::rgb< rgb_tag_name >
15489 	,::color::category::cmyk<cmyk_tag_name>
15490 	> {
15491 public:
15492 	typedef ::color::category::rgb< rgb_tag_name > category_left_type;
15493 	typedef ::color::category::cmyk<cmyk_tag_name> category_right_type;
15494 
15495 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
15496 
15497 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
15498 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
15499 
15500 	typedef typename container_left_trait_type::input_type container_left_input_type;
15501 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
15502 
15503 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
15504 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
15505 
processcolor::_internal::convert15506 	static void process
15507 	(
15508 		container_left_input_type left
15509 		,container_right_const_input_type right
15510 	) {
15511 		enum {
15512 			red_p = ::color::place::_internal::red<category_left_type>::position_enum
15513 			,green_p = ::color::place::_internal::green<category_left_type>::position_enum
15514 			,blue_p = ::color::place::_internal::blue<category_left_type>::position_enum
15515 		};
15516 		enum {
15517 			cyan_p = ::color::place::_internal::cyan<category_right_type>::position_enum
15518 			,yellow_p = ::color::place::_internal::yellow<category_right_type>::position_enum
15519 			,magenta_p = ::color::place::_internal::magenta<category_right_type>::position_enum
15520 			,key_p = ::color::place::_internal::key<category_right_type>::position_enum
15521 		};
15522 		scalar_type c = normalize_type::template process< cyan_p>(container_right_trait_type::template get< cyan_p>(right));
15523 		scalar_type m = normalize_type::template process< magenta_p>(container_right_trait_type::template get< magenta_p>(right));
15524 		scalar_type y = normalize_type::template process< yellow_p>(container_right_trait_type::template get< yellow_p>(right));
15525 		scalar_type k = normalize_type::template process< key_p>(container_right_trait_type::template get< key_p>(right));
15526 		scalar_type r = (1-c) * (1-k);
15527 		scalar_type g = (1-m) * (1-k);
15528 		scalar_type b = (1-y) * (1-k);
15529 		container_left_trait_type::template set<red_p >(left, diverse_type::template process<red_p >(r));
15530 		container_left_trait_type::template set<green_p>(left, diverse_type::template process<green_p>(g));
15531 		container_left_trait_type::template set<blue_p >(left, diverse_type::template process<blue_p >(b));
15532 	}
15533 };
15534 
15535 }
15536 }
15537 
15538 namespace color {
15539 namespace akin {
15540 
15541 template< >struct hsl< ::color::category::gray_uint8 > {
15542 	typedef ::color::category::hsl_uint8 akin_type;
15543 };
15544 template< >struct hsl< ::color::category::gray_uint16 > {
15545 	typedef ::color::category::hsl_uint16 akin_type;
15546 };
15547 template< >struct hsl< ::color::category::gray_uint32 > {
15548 	typedef ::color::category::hsl_uint32 akin_type;
15549 };
15550 template< >struct hsl< ::color::category::gray_uint64 > {
15551 	typedef ::color::category::hsl_uint64 akin_type;
15552 };
15553 template< >struct hsl< ::color::category::gray_float > {
15554 	typedef ::color::category::hsl_float akin_type;
15555 };
15556 template< >struct hsl< ::color::category::gray_double > {
15557 	typedef ::color::category::hsl_double akin_type;
15558 };
15559 template< >struct hsl< ::color::category::gray_ldouble > {
15560 	typedef ::color::category::hsl_ldouble akin_type;
15561 };
15562 
15563 }
15564 }
15565 
15566 namespace color {
15567 namespace akin {
15568 
15569 template< >struct hsl< ::color::category::cmy_uint8 > {
15570 	typedef ::color::category::hsl_uint8 akin_type;
15571 };
15572 template< >struct hsl< ::color::category::cmy_uint16 > {
15573 	typedef ::color::category::hsl_uint16 akin_type;
15574 };
15575 template< >struct hsl< ::color::category::cmy_uint32 > {
15576 	typedef ::color::category::hsl_uint32 akin_type;
15577 };
15578 template< >struct hsl< ::color::category::cmy_uint64 > {
15579 	typedef ::color::category::hsl_uint64 akin_type;
15580 };
15581 template< >struct hsl< ::color::category::cmy_float > {
15582 	typedef ::color::category::hsl_float akin_type;
15583 };
15584 template< >struct hsl< ::color::category::cmy_double > {
15585 	typedef ::color::category::hsl_double akin_type;
15586 };
15587 template< >struct hsl< ::color::category::cmy_ldouble > {
15588 	typedef ::color::category::hsl_ldouble akin_type;
15589 };
15590 
15591 }
15592 }
15593 
15594 namespace color {
15595 namespace akin {
15596 
15597 template< >struct hsl< ::color::category::cmyk_uint8 > {
15598 	typedef ::color::category::hsl_uint8 akin_type;
15599 };
15600 template< >struct hsl< ::color::category::cmyk_uint16 > {
15601 	typedef ::color::category::hsl_uint16 akin_type;
15602 };
15603 template< >struct hsl< ::color::category::cmyk_uint32 > {
15604 	typedef ::color::category::hsl_uint32 akin_type;
15605 };
15606 template< >struct hsl< ::color::category::cmyk_uint64 > {
15607 	typedef ::color::category::hsl_uint64 akin_type;
15608 };
15609 template< >struct hsl< ::color::category::cmyk_float > {
15610 	typedef ::color::category::hsl_float akin_type;
15611 };
15612 template< >struct hsl< ::color::category::cmyk_double > {
15613 	typedef ::color::category::hsl_double akin_type;
15614 };
15615 template< >struct hsl< ::color::category::cmyk_ldouble > {
15616 	typedef ::color::category::hsl_ldouble akin_type;
15617 };
15618 
15619 }
15620 }
15621 
15622 namespace color {
15623 namespace akin {
15624 
15625 template< typename tag_name >
15626 struct hsl< ::color::category::hsl< tag_name > > {
15627 public:
15628 	typedef ::color::category::hsl< tag_name > akin_type;
15629 };
15630 
15631 }
15632 }
15633 
15634 namespace color {
15635 namespace akin {
15636 
15637 template< >struct hsl< ::color::category::hsv_uint8 > {
15638 	typedef ::color::category::hsl_uint8 akin_type;
15639 };
15640 template< >struct hsl< ::color::category::hsv_uint16 > {
15641 	typedef ::color::category::hsl_uint16 akin_type;
15642 };
15643 template< >struct hsl< ::color::category::hsv_uint32 > {
15644 	typedef ::color::category::hsl_uint32 akin_type;
15645 };
15646 template< >struct hsl< ::color::category::hsv_uint64 > {
15647 	typedef ::color::category::hsl_uint64 akin_type;
15648 };
15649 template< >struct hsl< ::color::category::hsv_float > {
15650 	typedef ::color::category::hsl_float akin_type;
15651 };
15652 template< >struct hsl< ::color::category::hsv_double > {
15653 	typedef ::color::category::hsl_double akin_type;
15654 };
15655 template< >struct hsl< ::color::category::hsv_ldouble > {
15656 	typedef ::color::category::hsl_ldouble akin_type;
15657 };
15658 
15659 }
15660 }
15661 
15662 namespace color {
15663 namespace akin {
15664 
15665 template< >struct hsl< ::color::category::hsi_uint8 > {
15666 	typedef ::color::category::hsl_uint8 akin_type;
15667 };
15668 template< >struct hsl< ::color::category::hsi_uint16 > {
15669 	typedef ::color::category::hsl_uint16 akin_type;
15670 };
15671 template< >struct hsl< ::color::category::hsi_uint32 > {
15672 	typedef ::color::category::hsl_uint32 akin_type;
15673 };
15674 template< >struct hsl< ::color::category::hsi_uint64 > {
15675 	typedef ::color::category::hsl_uint64 akin_type;
15676 };
15677 template< >struct hsl< ::color::category::hsi_float > {
15678 	typedef ::color::category::hsl_float akin_type;
15679 };
15680 template< >struct hsl< ::color::category::hsi_double > {
15681 	typedef ::color::category::hsl_double akin_type;
15682 };
15683 template< >struct hsl< ::color::category::hsi_ldouble > {
15684 	typedef ::color::category::hsl_ldouble akin_type;
15685 };
15686 
15687 }
15688 }
15689 
15690 namespace color {
15691 namespace akin {
15692 
15693 template
15694 <
15695 	typename tag_name
15696 
15697 	>
15698 struct hsl< ::color::category::hwb< tag_name > > {
15699 public:
15700 	typedef ::color::category::hsl< tag_name > akin_type;
15701 };
15702 
15703 }
15704 }
15705 
15706 namespace color {
15707 namespace akin {
15708 
15709 template< >struct hsl< ::color::category::rgb_uint8 > {
15710 	typedef ::color::category::hsl_uint8 akin_type;
15711 };
15712 template< >struct hsl< ::color::category::rgb_uint16 > {
15713 	typedef ::color::category::hsl_uint16 akin_type;
15714 };
15715 template< >struct hsl< ::color::category::rgb_uint32 > {
15716 	typedef ::color::category::hsl_uint32 akin_type;
15717 };
15718 template< >struct hsl< ::color::category::rgb_uint64 > {
15719 	typedef ::color::category::hsl_uint64 akin_type;
15720 };
15721 template< >struct hsl< ::color::category::rgb_float > {
15722 	typedef ::color::category::hsl_float akin_type;
15723 };
15724 template< >struct hsl< ::color::category::rgb_double > {
15725 	typedef ::color::category::hsl_double akin_type;
15726 };
15727 template< >struct hsl< ::color::category::rgb_ldouble > {
15728 	typedef ::color::category::hsl_ldouble akin_type;
15729 };
15730 
15731 }
15732 }
15733 
15734 namespace color {
15735 namespace akin {
15736 
15737 template< >struct hsl< ::color::category::yiq_uint8 > {
15738 	typedef ::color::category::hsl_uint8 akin_type;
15739 };
15740 template< >struct hsl< ::color::category::yiq_uint16 > {
15741 	typedef ::color::category::hsl_uint16 akin_type;
15742 };
15743 template< >struct hsl< ::color::category::yiq_uint32 > {
15744 	typedef ::color::category::hsl_uint32 akin_type;
15745 };
15746 template< >struct hsl< ::color::category::yiq_uint64 > {
15747 	typedef ::color::category::hsl_uint64 akin_type;
15748 };
15749 template< >struct hsl< ::color::category::yiq_float > {
15750 	typedef ::color::category::hsl_float akin_type;
15751 };
15752 template< >struct hsl< ::color::category::yiq_double > {
15753 	typedef ::color::category::hsl_double akin_type;
15754 };
15755 template< >struct hsl< ::color::category::yiq_ldouble > {
15756 	typedef ::color::category::hsl_ldouble akin_type;
15757 };
15758 
15759 }
15760 }
15761 
15762 namespace color {
15763 namespace akin {
15764 
15765 template
15766 <
15767 	typename tag_name
15768 	,::color::constant::yuv::reference_enum reference_number
15769 
15770 	>
15771 struct hsl< ::color::category::yuv< tag_name, reference_number > > {
15772 public:
15773 	typedef ::color::category::hsl< tag_name > akin_type;
15774 };
15775 
15776 }
15777 }
15778 
15779 namespace color {
15780 namespace akin {
15781 
15782 template< >struct hsl< ::color::category::YCgCo_uint8 > {
15783 	typedef ::color::category::hsl_uint8 akin_type;
15784 };
15785 template< >struct hsl< ::color::category::YCgCo_uint16 > {
15786 	typedef ::color::category::hsl_uint16 akin_type;
15787 };
15788 template< >struct hsl< ::color::category::YCgCo_uint32 > {
15789 	typedef ::color::category::hsl_uint32 akin_type;
15790 };
15791 template< >struct hsl< ::color::category::YCgCo_uint64 > {
15792 	typedef ::color::category::hsl_uint64 akin_type;
15793 };
15794 template< >struct hsl< ::color::category::YCgCo_float > {
15795 	typedef ::color::category::hsl_float akin_type;
15796 };
15797 template< >struct hsl< ::color::category::YCgCo_double > {
15798 	typedef ::color::category::hsl_double akin_type;
15799 };
15800 template< >struct hsl< ::color::category::YCgCo_ldouble > {
15801 	typedef ::color::category::hsl_ldouble akin_type;
15802 };
15803 
15804 }
15805 }
15806 
15807 namespace color {
15808 namespace akin {
15809 
15810 template< >struct hsl< ::color::category::YDbDr_uint8 > {
15811 	typedef ::color::category::hsl_uint8 akin_type;
15812 };
15813 template< >struct hsl< ::color::category::YDbDr_uint16 > {
15814 	typedef ::color::category::hsl_uint16 akin_type;
15815 };
15816 template< >struct hsl< ::color::category::YDbDr_uint32 > {
15817 	typedef ::color::category::hsl_uint32 akin_type;
15818 };
15819 template< >struct hsl< ::color::category::YDbDr_uint64 > {
15820 	typedef ::color::category::hsl_uint64 akin_type;
15821 };
15822 template< >struct hsl< ::color::category::YDbDr_float > {
15823 	typedef ::color::category::hsl_float akin_type;
15824 };
15825 template< >struct hsl< ::color::category::YDbDr_double > {
15826 	typedef ::color::category::hsl_double akin_type;
15827 };
15828 template< >struct hsl< ::color::category::YDbDr_ldouble > {
15829 	typedef ::color::category::hsl_ldouble akin_type;
15830 };
15831 
15832 }
15833 }
15834 
15835 namespace color {
15836 namespace akin {
15837 
15838 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsl< ::color::category::YPbPr_uint8 <reference_number> > {
15839 	typedef ::color::category::hsl_uint8 akin_type;
15840 };
15841 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsl< ::color::category::YPbPr_uint16 <reference_number> > {
15842 	typedef ::color::category::hsl_uint16 akin_type;
15843 };
15844 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsl< ::color::category::YPbPr_uint32 <reference_number> > {
15845 	typedef ::color::category::hsl_uint32 akin_type;
15846 };
15847 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsl< ::color::category::YPbPr_uint64 <reference_number> > {
15848 	typedef ::color::category::hsl_uint64 akin_type;
15849 };
15850 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsl< ::color::category::YPbPr_float <reference_number> > {
15851 	typedef ::color::category::hsl_float akin_type;
15852 };
15853 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsl< ::color::category::YPbPr_double <reference_number> > {
15854 	typedef ::color::category::hsl_double akin_type;
15855 };
15856 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsl< ::color::category::YPbPr_ldouble<reference_number> > {
15857 	typedef ::color::category::hsl_ldouble akin_type;
15858 };
15859 
15860 }
15861 }
15862 
15863 namespace color {
15864 namespace akin {
15865 
15866 template< >struct hsl< ::color::category::xyz_uint8 > {
15867 	typedef ::color::category::hsl_uint8 akin_type;
15868 };
15869 template< >struct hsl< ::color::category::xyz_uint16 > {
15870 	typedef ::color::category::hsl_uint16 akin_type;
15871 };
15872 template< >struct hsl< ::color::category::xyz_uint32 > {
15873 	typedef ::color::category::hsl_uint32 akin_type;
15874 };
15875 template< >struct hsl< ::color::category::xyz_uint64 > {
15876 	typedef ::color::category::hsl_uint64 akin_type;
15877 };
15878 template< >struct hsl< ::color::category::xyz_float > {
15879 	typedef ::color::category::hsl_float akin_type;
15880 };
15881 template< >struct hsl< ::color::category::xyz_double > {
15882 	typedef ::color::category::hsl_double akin_type;
15883 };
15884 template< >struct hsl< ::color::category::xyz_ldouble > {
15885 	typedef ::color::category::hsl_ldouble akin_type;
15886 };
15887 
15888 }
15889 }
15890 
15891 namespace color {
15892 namespace akin {
15893 
15894 template
15895 <
15896 	typename tag_name, ::color::constant::lab::reference_enum lab_reference_number
15897 	>
15898 struct hsl< ::color::category::lab< tag_name, lab_reference_number > > {
15899 public:
15900 	typedef ::color::category::hsl< tag_name > akin_type;
15901 };
15902 
15903 }
15904 }
15905 
15906 namespace color {
15907 namespace akin {
15908 
15909 template
15910 <
15911 	typename tag_name
15912 
15913 	>
15914 struct hsl< ::color::category::xyy< tag_name > > {
15915 public:
15916 	typedef ::color::category::hsl< tag_name > akin_type;
15917 };
15918 
15919 }
15920 }
15921 
15922 namespace color {
15923 namespace akin {
15924 
15925 template
15926 <
15927 	typename tag_name
15928 	,::color::constant::lms::reference_enum reference_number
15929 
15930 	>
15931 struct hsl< ::color::category::lms< tag_name, reference_number > > {
15932 public:
15933 	typedef ::color::category::hsl< tag_name > akin_type;
15934 };
15935 
15936 }
15937 }
15938 
15939 namespace color {
15940 namespace akin {
15941 
15942 template
15943 <
15944 	typename tag_name
15945 
15946 	>
15947 struct hsl< ::color::category::luv< tag_name > > {
15948 public:
15949 	typedef ::color::category::hsl< tag_name > akin_type;
15950 };
15951 
15952 }
15953 }
15954 
15955 namespace color {
15956 namespace akin {
15957 
15958 template
15959 <
15960 	typename tag_name
15961 	>
15962 struct hsl< ::color::category::LabCH< tag_name > > {
15963 public:
15964 	typedef ::color::category::hsl< tag_name > akin_type;
15965 };
15966 
15967 }
15968 }
15969 
15970 namespace color {
15971 namespace akin {
15972 
15973 template< >struct hsl< ::color::category::LuvCH_uint8 > {
15974 	typedef ::color::category::hsl_uint8 akin_type;
15975 };
15976 template< >struct hsl< ::color::category::LuvCH_uint16 > {
15977 	typedef ::color::category::hsl_uint16 akin_type;
15978 };
15979 template< >struct hsl< ::color::category::LuvCH_uint32 > {
15980 	typedef ::color::category::hsl_uint32 akin_type;
15981 };
15982 template< >struct hsl< ::color::category::LuvCH_uint64 > {
15983 	typedef ::color::category::hsl_uint64 akin_type;
15984 };
15985 template< >struct hsl< ::color::category::LuvCH_float > {
15986 	typedef ::color::category::hsl_float akin_type;
15987 };
15988 template< >struct hsl< ::color::category::LuvCH_double > {
15989 	typedef ::color::category::hsl_double akin_type;
15990 };
15991 template< >struct hsl< ::color::category::LuvCH_ldouble > {
15992 	typedef ::color::category::hsl_ldouble akin_type;
15993 };
15994 
15995 }
15996 }
15997 
15998 namespace color {
15999 namespace trait {
16000 
16001 template <> struct info< ::color::category::hsl_uint8 > {
16002 public:
16003 	enum { implemented_entity = true };
16004 	enum { meaningful_entity = true };
16005 };
16006 template <> struct info< ::color::category::hsl_uint16 > {
16007 public:
16008 	enum { implemented_entity = true };
16009 	enum { meaningful_entity = true };
16010 };
16011 template <> struct info< ::color::category::hsl_uint32 > {
16012 public:
16013 	enum { implemented_entity = true };
16014 	enum { meaningful_entity = true };
16015 };
16016 template <> struct info< ::color::category::hsl_uint64 > {
16017 public:
16018 	enum { implemented_entity = true };
16019 	enum { meaningful_entity = true };
16020 };
16021 template <> struct info< ::color::category::hsl_float > {
16022 public:
16023 	enum { implemented_entity = true };
16024 	enum { meaningful_entity = true };
16025 };
16026 template <> struct info< ::color::category::hsl_double > {
16027 public:
16028 	enum { implemented_entity = true };
16029 	enum { meaningful_entity = true };
16030 };
16031 template <> struct info< ::color::category::hsl_ldouble > {
16032 public:
16033 	enum { implemented_entity = true };
16034 	enum { meaningful_entity = true };
16035 };
16036 
16037 }
16038 }
16039 
16040 namespace color {
16041 namespace _internal {
16042 namespace hsl {
16043 namespace bound {
16044 
16045 template< typename index_name, typename scalar_name >
16046 struct scalar {
16047 public:
16048 	typedef scalar_name scalar_type;
16049 	typedef index_name index_type;
16050 
16051 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
16052 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
16053 
16054 	typedef typename trait_type::instance_type instance_type;
16055 	typedef typename trait_type::return_image_type return_image_type;
16056 
16057 	typedef typename index_trait_type::instance_type index_instance_type;
16058 	typedef typename index_trait_type::model_type index_input_const_type;
16059 
16060 	template< index_instance_type index >
maximumcolor::_internal::hsl::bound::scalar16061 	static return_image_type maximum() {
16062 		static instance_type max_list[] = { 360, 100, 100 };
16063 		return max_list[index];
16064 	}
16065 
maximumcolor::_internal::hsl::bound::scalar16066 	static return_image_type maximum(index_input_const_type index) {
16067 		static instance_type max_list[] = { 360, 100, 100 };
16068 		return max_list[index];
16069 	}
16070 
16071 	template< index_instance_type index >
minimumcolor::_internal::hsl::bound::scalar16072 	static return_image_type minimum() {
16073 		static instance_type min_list[] = { 0, 0, 0 };
16074 		return min_list[index];
16075 	}
16076 
minimumcolor::_internal::hsl::bound::scalar16077 	static return_image_type minimum(index_input_const_type index) {
16078 		static instance_type min_list[] = { 0, 0, 0 };
16079 		return min_list[index];
16080 	}
16081 
16082 	template< index_instance_type index >
rangecolor::_internal::hsl::bound::scalar16083 	static return_image_type range() {
16084 		static instance_type range_list[] = { 360, 100, 100 };
16085 		return range_list[index];
16086 	}
16087 
rangecolor::_internal::hsl::bound::scalar16088 	static return_image_type range(index_input_const_type index) {
16089 		static instance_type range_list[] = { 360, 100, 100 };
16090 		return range_list[index];
16091 	}
16092 };
16093 
16094 }
16095 }
16096 }
16097 }
16098 
16099 namespace color {
16100 namespace trait {
16101 
16102 template< >
16103 struct bound< ::color::category::hsl_float >
16104 	: public ::color::_internal::hsl::bound::scalar< typename ::color::trait::index< ::color::category::hsl_float >::instance_type, float > {
16105 };
16106 
16107 template< >
16108 struct bound< ::color::category::hsl_double >
16109 	: public ::color::_internal::hsl::bound::scalar< typename ::color::trait::index< ::color::category::hsl_double >::instance_type, double > {
16110 };
16111 
16112 template< >
16113 struct bound< ::color::category::hsl_ldouble >
16114 	: public ::color::_internal::hsl::bound::scalar< typename ::color::trait::index< ::color::category::hsl_ldouble >::instance_type, long double > {
16115 };
16116 
16117 }
16118 }
16119 
16120 namespace color {
16121 namespace trait {
16122 
16123 template< >
16124 struct bound< ::color::category::hsl_uint8 >
16125 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::hsl_uint8 >::instance_type > {
16126 };
16127 
16128 template< >
16129 struct bound< ::color::category::hsl_uint16 >
16130 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::hsl_uint16 >::instance_type > {
16131 };
16132 
16133 template< >
16134 struct bound< ::color::category::hsl_uint32 >
16135 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::hsl_uint32 >::instance_type > {
16136 };
16137 
16138 template< >
16139 struct bound< ::color::category::hsl_uint64 >
16140 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::hsl_uint64 >::instance_type > {
16141 };
16142 
16143 }
16144 }
16145 
16146 namespace color {
16147 namespace trait {
16148 
16149 template< >
16150 struct component< ::color::category::hsl_float >
16151 	: public ::color::_internal::utility::component::array< float > {
16152 };
16153 
16154 template< >
16155 struct component< ::color::category::hsl_double >
16156 	: public ::color::_internal::utility::component::array< double > {
16157 };
16158 
16159 template< >
16160 struct component< ::color::category::hsl_ldouble >
16161 	: public ::color::_internal::utility::component::array< long double > {
16162 };
16163 
16164 }
16165 }
16166 
16167 namespace color {
16168 namespace trait {
16169 
16170 template< >
16171 struct component< ::color::category::hsl_uint8 >
16172 	: public ::color::_internal::utility::component::array< std::uint8_t > {
16173 };
16174 
16175 template< >
16176 struct component< ::color::category::hsl_uint16 >
16177 	: public ::color::_internal::utility::component::array< std::uint16_t > {
16178 };
16179 
16180 template< >
16181 struct component< ::color::category::hsl_uint32 >
16182 	: public ::color::_internal::utility::component::array< std::uint32_t > {
16183 };
16184 
16185 template< >
16186 struct component< ::color::category::hsl_uint64 >
16187 	: public ::color::_internal::utility::component::array< std::uint64_t > {
16188 };
16189 
16190 }
16191 }
16192 
16193 namespace color {
16194 namespace trait {
16195 
16196 template< >
16197 struct container< ::color::category::hsl_float >
16198 	: public ::color::_internal::utility::container::array< float, 3 > {
16199 };
16200 
16201 template< >
16202 struct container< ::color::category::hsl_double >
16203 	: public ::color::_internal::utility::container::array< double, 3 > {
16204 };
16205 
16206 template< >
16207 struct container< ::color::category::hsl_ldouble >
16208 	: public ::color::_internal::utility::container::array< long double, 3 > {
16209 };
16210 
16211 }
16212 }
16213 
16214 namespace color {
16215 namespace trait {
16216 
16217 template< >
16218 struct container< ::color::category::hsl_uint8 >
16219 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
16220 };
16221 
16222 template< >
16223 struct container< ::color::category::hsl_uint16 >
16224 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
16225 };
16226 
16227 template< >
16228 struct container< ::color::category::hsl_uint32 >
16229 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
16230 };
16231 
16232 template< >
16233 struct container< ::color::category::hsl_uint64 >
16234 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
16235 };
16236 
16237 }
16238 }
16239 
16240 namespace color {
16241 
16242 template< typename type_name >
16243 using hsl = ::color::model< ::color::category::hsl< type_name > >;
16244 
16245 }
16246 
16247 namespace color {
16248 namespace place {
16249 namespace _internal {
16250 
16251 template< typename tag_name >
16252 struct hue< ::color::category::hsl< tag_name > > {
16253 public:
16254 	typedef ::color::category::hsl< tag_name > category_type;
16255 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
16256 
16257 	enum { position_enum = 0 };
16258 	enum { has_enum = true };
16259 
positioncolor::place::_internal::hue16260 	static index_instance_type position() {
16261 		return position_enum;
16262 	}
16263 };
16264 
16265 }
16266 }
16267 }
16268 
16269 namespace color {
16270 namespace check {
16271 namespace _internal {
16272 
16273 template<>
16274 struct integrity< ::color::category::hsl_float> {
16275 public:
16276 	typedef ::color::category::hsl_float category_type;
16277 
16278 	typedef ::color::model<category_type> model_type;
16279 	typedef ::color::trait::bound< category_type > bound_type;
16280 
16281 	enum {
16282 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
16283 	};
16284 
processcolor::check::_internal::integrity16285 	static bool process(model_type const& m) {
16286 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
16287 			return false;
16288 		}
16289 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
16290 			return false;
16291 		}
16292 		return true;
16293 	}
16294 };
16295 
16296 template<>
16297 struct integrity< ::color::category::hsl_double > {
16298 public:
16299 	typedef ::color::category::hsl_double category_type;
16300 
16301 	typedef ::color::model<category_type> model_type;
16302 	typedef ::color::trait::bound< category_type > bound_type;
16303 
16304 	enum {
16305 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
16306 	};
16307 
processcolor::check::_internal::integrity16308 	static bool process(model_type const& m) {
16309 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
16310 			return false;
16311 		}
16312 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
16313 			return false;
16314 		}
16315 		return true;
16316 	}
16317 };
16318 
16319 template<>
16320 struct integrity< ::color::category::hsl_ldouble > {
16321 public:
16322 	typedef ::color::category::hsl_ldouble category_type;
16323 
16324 	typedef ::color::model<category_type> model_type;
16325 	typedef ::color::trait::bound< category_type > bound_type;
16326 
16327 	enum {
16328 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
16329 	};
16330 
processcolor::check::_internal::integrity16331 	static bool process(model_type const& m) {
16332 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
16333 			return false;
16334 		}
16335 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
16336 			return false;
16337 		}
16338 		return true;
16339 	}
16340 };
16341 
16342 }
16343 }
16344 }
16345 
16346 namespace color {
16347 namespace place {
16348 namespace _internal {
16349 
16350 template< typename tag_name >
16351 struct lightness< ::color::category::hsl< tag_name > > {
16352 public:
16353 	typedef ::color::category::hsl< tag_name > category_type;
16354 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
16355 
16356 	enum { position_enum = 2 };
16357 	enum { has_enum = true };
16358 
positioncolor::place::_internal::lightness16359 	static index_instance_type position() {
16360 		return position_enum;
16361 	}
16362 };
16363 
16364 }
16365 }
16366 }
16367 
16368 namespace color {
16369 namespace place {
16370 namespace _internal {
16371 
16372 template< typename tag_name >
16373 struct saturation< ::color::category::hsl< tag_name > > {
16374 public:
16375 	typedef ::color::category::hsl< tag_name > category_type;
16376 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
16377 
16378 	enum { position_enum = 1 };
16379 	enum { has_enum = true };
16380 
positioncolor::place::_internal::saturation16381 	static index_instance_type position() {
16382 		return position_enum;
16383 	}
16384 };
16385 
16386 }
16387 }
16388 }
16389 
16390 namespace color {
16391 namespace check {
16392 namespace _internal {
16393 
16394 template< typename tag_name >
16395 struct unique< ::color::category::hsl< tag_name> > {
16396 public:
16397 	typedef ::color::category::hsl<tag_name> category_type;
16398 
16399 	typedef ::color::model<category_type> model_type;
16400 	typedef ::color::trait::bound< category_type > bound_type;
16401 
16402 	enum {
16403 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
16404 		,saturation_p = ::color::place::_internal::saturation<category_type>::position_enum
16405 		, lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
16406 	};
16407 
processcolor::check::_internal::unique16408 	static bool process(model_type const& m) {
16409 		if(m.template get<saturation_p>() == bound_type::template minimum<saturation_p>()) {
16410 			return false;
16411 		}
16412 		if(m.template get< lightness_p>() == bound_type::template minimum< lightness_p>()) {
16413 			return false;
16414 		}
16415 		if(m.template get< lightness_p>() == bound_type::template maximum< lightness_p>()) {
16416 			return false;
16417 		}
16418 		return true;
16419 	}
16420 };
16421 
16422 }
16423 }
16424 }
16425 
16426 namespace color {
16427 namespace get {
16428 
16429 template< typename tag_name >
16430 inline
16431 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsl<tag_name> >::akin_type >::return_type
red(::color::model<::color::category::hsl<tag_name>> const & color_parameter)16432 red(::color::model< ::color::category::hsl<tag_name> > const& color_parameter) {
16433 	typedef ::color::category::hsl< tag_name > category_type;
16434 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
16435 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
16436 	return ::color::model< akin_type >(color_parameter).template get<red_p>();
16437 }
16438 
16439 }
16440 }
16441 
16442 namespace color {
16443 namespace get {
16444 
16445 template< typename tag_name >
16446 inline
16447 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsl<tag_name> >::akin_type >::return_type
green(::color::model<::color::category::hsl<tag_name>> const & color_parameter)16448 green(::color::model< ::color::category::hsl<tag_name> > const& color_parameter) {
16449 	typedef ::color::category::hsl<tag_name> category_type;
16450 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
16451 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
16452 	return ::color::model< akin_type >(color_parameter).template get<green_p>();
16453 }
16454 
16455 }
16456 }
16457 
16458 namespace color {
16459 namespace get {
16460 
16461 template< typename tag_name >
16462 inline
16463 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsl<tag_name> >::akin_type >::return_type
blue(::color::model<::color::category::hsl<tag_name>> const & color_parameter)16464 blue(::color::model< ::color::category::hsl<tag_name> > const& color_parameter) {
16465 	typedef ::color::category::hsl<tag_name> category_type;
16466 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
16467 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
16468 	return ::color::model< akin_type >(color_parameter).template get<blue_p>();
16469 }
16470 
16471 }
16472 }
16473 
16474 namespace color {
16475 namespace get {
16476 
16477 template< typename tag_name >
16478 inline
16479 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::hsl<tag_name> >::akin_type >::return_type
gray(::color::model<::color::category::hsl<tag_name>> const & color_parameter)16480 gray(::color::model< ::color::category::hsl<tag_name> > const& color_parameter) {
16481 	typedef ::color::category::hsl< tag_name > category_type;
16482 	typedef typename ::color::trait::scalar< category_type >::instance_type scalar_type;
16483 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
16484 	typedef ::color::_internal::diverse< akin_type > diverse_type;
16485 	typedef ::color::_internal::normalize< category_type > normalize_type;
16486 	enum { lightness_p = ::color::place::_internal::lightness<category_type>::position_enum };
16487 	scalar_type g = normalize_type::template process<lightness_p >(color_parameter.template get<lightness_p >());
16488 	return diverse_type::template process<0>(g);
16489 }
16490 
16491 }
16492 }
16493 
16494 namespace color {
16495 namespace get {
16496 
16497 template< typename tag_name >
16498 inline
16499 typename ::color::model< ::color::category::hsl< tag_name> >::component_const_type
hue(::color::model<::color::category::hsl<tag_name>> const & color_parameter)16500 hue(::color::model< ::color::category::hsl< tag_name> > const& color_parameter) {
16501 	typedef ::color::category::hsl< tag_name> category_type;
16502 	enum { hue_p = ::color::place::_internal::hue<category_type>::position_enum };
16503 	return color_parameter.template get<hue_p>();
16504 }
16505 
16506 }
16507 }
16508 
16509 namespace color {
16510 namespace get {
16511 
16512 template< typename tag_name >
16513 inline
16514 typename ::color::model< ::color::category::hsl< tag_name> >::component_const_type
saturation(::color::model<::color::category::hsl<tag_name>> const & color_parameter)16515 saturation(::color::model< ::color::category::hsl< tag_name> > const& color_parameter) {
16516 	typedef ::color::category::hsl< tag_name> category_type;
16517 	enum { saturation_p = ::color::place::_internal::saturation<category_type>::position_enum };
16518 	return color_parameter.template get<saturation_p>();
16519 }
16520 
16521 }
16522 }
16523 
16524 namespace color {
16525 namespace get {
16526 
16527 template< typename tag_name >
16528 inline
16529 typename ::color::model< ::color::category::hsl< tag_name> >::component_const_type
chroma(::color::model<::color::category::hsl<tag_name>> const & color_parameter)16530 chroma(::color::model< ::color::category::hsl< tag_name> > const& color_parameter) {
16531 	typedef ::color::category::hsl< tag_name > category_type;
16532 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
16533 	typedef ::color::_internal::diverse< category_type > diverse_type;
16534 	typedef ::color::_internal::normalize<category_type> normalize_type;
16535 	enum {
16536 		saturation_p = ::color::place::_internal::saturation<category_type>::position_enum
16537 		,lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
16538 	};
16539 	scalar_type s = normalize_type::template process<saturation_p>(color_parameter.template get<saturation_p>());
16540 	scalar_type l = normalize_type::template process<lightness_p >(color_parameter.template get<lightness_p >());
16541 	return diverse_type::template process<lightness_p>(s * l);
16542 }
16543 
16544 }
16545 }
16546 
16547 namespace color {
16548 namespace set {
16549 
16550 template< typename tag_name >
16551 inline
16552 void
hue(::color::model<::color::category::hsl<tag_name>> & color_parameter,typename::color::model<::color::category::hsl<tag_name>>::component_input_const_type component_parameter)16553 hue
16554 (
16555 	::color::model< ::color::category::hsl<tag_name> > & color_parameter
16556 	,typename ::color::model< ::color::category::hsl<tag_name> >::component_input_const_type component_parameter
16557 ) {
16558 	typedef ::color::category::hsl< tag_name > category_type;
16559 	enum { hue_p = ::color::place::_internal::hue< category_type >::position_enum };
16560 	color_parameter.template set<hue_p>(component_parameter);
16561 }
16562 
16563 }
16564 }
16565 
16566 namespace color {
16567 namespace set {
16568 
16569 template< typename tag_name >
16570 inline
16571 void
saturation(::color::model<::color::category::hsl<tag_name>> & color_parameter,typename::color::model<::color::category::hsl<tag_name>>::component_input_const_type component_parameter)16572 saturation
16573 (
16574 	::color::model< ::color::category::hsl<tag_name> > & color_parameter
16575 	,typename ::color::model< ::color::category::hsl<tag_name> >::component_input_const_type component_parameter
16576 ) {
16577 	typedef ::color::category::hsl< tag_name > category_type;
16578 	enum { saturation_p = ::color::place::_internal::saturation< category_type >::position_enum };
16579 	color_parameter.template set<saturation_p>(component_parameter);
16580 }
16581 
16582 }
16583 }
16584 
16585 namespace color {
16586 namespace set {
16587 
16588 template< typename tag_name >
16589 inline
16590 void
blue(::color::model<::color::category::hsl<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::hsl<tag_name>>::akin_type>::model_type component_parameter)16591 blue
16592 (
16593 	::color::model< ::color::category::hsl< tag_name > > & color_parameter
16594 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsl< tag_name > >::akin_type >::model_type component_parameter
16595 ) {
16596 	typedef ::color::category::hsl< tag_name > category_type;
16597 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
16598 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
16599 	::color::model< akin_type > rgb(color_parameter);
16600 	rgb.template set<blue_p > (component_parameter);
16601 	color_parameter = rgb;
16602 }
16603 
16604 }
16605 }
16606 
16607 namespace color {
16608 namespace set {
16609 
16610 template< typename tag_name >
16611 inline
16612 void
green(::color::model<::color::category::hsl<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::hsl<tag_name>>::akin_type>::model_type component_parameter)16613 green
16614 (
16615 	::color::model< ::color::category::hsl< tag_name > > & color_parameter
16616 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsl< tag_name > >::akin_type >::model_type component_parameter
16617 ) {
16618 	typedef ::color::category::hsl< tag_name > category_type;
16619 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
16620 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
16621 	::color::model< akin_type > rgb(color_parameter);
16622 	rgb.template set< green_p > (component_parameter);
16623 	color_parameter = rgb;
16624 }
16625 
16626 }
16627 }
16628 
16629 namespace color {
16630 namespace set {
16631 
16632 template< typename tag_name >
16633 inline
16634 void
red(::color::model<::color::category::hsl<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::hsl<tag_name>>::akin_type>::model_type component_parameter)16635 red
16636 (
16637 	::color::model< ::color::category::hsl< tag_name > > & color_parameter
16638 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsl< tag_name > >::akin_type >::model_type component_parameter
16639 ) {
16640 	typedef ::color::category::hsl< tag_name > category_type;
16641 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
16642 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
16643 	::color::model< akin_type > rgb(color_parameter);
16644 	rgb.template set<red_p> (component_parameter);
16645 	color_parameter = rgb;
16646 }
16647 
16648 }
16649 }
16650 
16651 namespace color {
16652 namespace set {
16653 
16654 template< typename tag_name >
16655 inline
16656 void
gray(::color::model<::color::category::hsl<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::hsl<tag_name>>::akin_type>::model_type component_parameter)16657 gray
16658 (
16659 	::color::model< ::color::category::hsl<tag_name > > & color_parameter
16660 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::hsl< tag_name > >::akin_type >::model_type component_parameter
16661 ) {
16662 	typedef ::color::category::hsl< tag_name > category_type;
16663 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
16664 	typedef ::color::_internal::reformat< category_type, akin_type > reformat_type;
16665 	enum {
16666 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
16667 	};
16668 	color_parameter.template set<lightness_p>(reformat_type::template process<lightness_p,0>(component_parameter));
16669 }
16670 
16671 }
16672 }
16673 
16674 namespace color {
16675 namespace _internal {
16676 
16677 template< typename hsl_tag_name, typename gray_tag_name >
16678 struct convert
16679 	<
16680 	::color::category::hsl< hsl_tag_name >
16681 	,::color::category::gray< gray_tag_name >
16682 	> {
16683 public:
16684 	typedef ::color::category::hsl< hsl_tag_name > category_left_type;
16685 	typedef ::color::category::gray< gray_tag_name > category_right_type;
16686 
16687 	typedef ::color::trait::bound<category_left_type> bound_left_trait_type;
16688 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
16689 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
16690 
16691 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
16692 
16693 	typedef typename container_left_trait_type::input_type container_left_input_type;
16694 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
16695 
16696 	enum {
16697 		hue_p = ::color::place::_internal::hue<category_left_type>::position_enum
16698 		,saturation_p = ::color::place::_internal::saturation<category_left_type>::position_enum
16699 		, lightness_p = ::color::place::_internal::lightness<category_left_type>::position_enum
16700 	};
16701 
processcolor::_internal::convert16702 	static void process
16703 	(
16704 		container_left_input_type left
16705 		,container_right_const_input_type right
16706 	) {
16707 		container_left_trait_type::template set<hue_p>(left, bound_left_trait_type::template minimum<hue_p>());
16708 		container_left_trait_type::template set<saturation_p>(left, bound_left_trait_type::template minimum<saturation_p>());
16709 		container_left_trait_type::template set<lightness_p>(left, reformat_type::template process<lightness_p,0>(container_right_trait_type::template get<0>(right)));
16710 	}
16711 };
16712 
16713 }
16714 }
16715 
16716 namespace color {
16717 namespace _internal {
16718 
16719 template< typename hsl_tag_name, typename cmy_tag_name >
16720 struct convert
16721 	<
16722 	::color::category::hsl< hsl_tag_name >
16723 	,::color::category::cmy< cmy_tag_name >
16724 	> {
16725 public:
16726 	typedef ::color::category::hsl< hsl_tag_name > category_left_type;
16727 	typedef ::color::category::cmy< cmy_tag_name > category_right_type;
16728 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
16729 
16730 	typedef ::color::trait::scalar<category_left_type> scalar_trait_type;
16731 
16732 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
16733 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
16734 
16735 	typedef typename container_left_trait_type::input_type container_left_input_type;
16736 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
16737 
16738 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
16739 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
16740 
16741 	enum {
16742 		hue_p = ::color::place::_internal::hue<category_left_type>::position_enum
16743 		,saturation_p = ::color::place::_internal::saturation<category_left_type>::position_enum
16744 		, lightness_p = ::color::place::_internal::lightness<category_left_type>::position_enum
16745 	};
16746 
16747 	enum {
16748 		cyan_p = ::color::place::_internal::cyan<category_right_type>::position_enum
16749 		,yellow_p = ::color::place::_internal::yellow<category_right_type>::position_enum
16750 		,magenta_p = ::color::place::_internal::magenta<category_right_type>::position_enum
16751 	};
16752 
processcolor::_internal::convert16753 	static void process
16754 	(
16755 		container_left_input_type left
16756 		,container_right_const_input_type right
16757 	) {
16758 		scalar_type r = scalar_type(1) - normalize_type::template process< cyan_p>(container_right_trait_type::template get< cyan_p>(right));
16759 		scalar_type g = scalar_type(1) - normalize_type::template process< magenta_p>(container_right_trait_type::template get< magenta_p>(right));
16760 		scalar_type b = scalar_type(1) - normalize_type::template process< yellow_p>(container_right_trait_type::template get< yellow_p>(right));
16761 		const scalar_type hi = std::max<scalar_type>({ r, g, b });
16762 		const scalar_type lo = std::min<scalar_type>({ r, g, b });
16763 		scalar_type delta = hi - lo;
16764 		scalar_type h = 0;
16765 		scalar_type s = 0;
16766 		scalar_type l = (hi + lo) / scalar_type(2);
16767 		if(false == scalar_trait_type::is_small(delta)) {
16768 			s = delta / (1 - fabs(2*l - 1));
16769 			if(hi == r) {
16770 				h = (scalar_type(60)/scalar_type(360)) * (g - b) / delta + (g < b ? scalar_type(1) : scalar_type(0));
16771 			}
16772 			if(hi == g) {
16773 				h = (scalar_type(60)/scalar_type(360)) * (b - r) / delta + (scalar_type(120)/scalar_type(360));
16774 			}
16775 			if(hi == b) {
16776 				h = (scalar_type(60)/scalar_type(360)) * (r - g) / delta + (scalar_type(240)/scalar_type(360));
16777 			}
16778 		}
16779 		container_left_trait_type::template set< hue_p>(left, diverse_type::template process< hue_p>(h));
16780 		container_left_trait_type::template set<saturation_p>(left, diverse_type::template process<saturation_p>(s));
16781 		container_left_trait_type::template set< lightness_p>(left, diverse_type::template process< lightness_p>(l));
16782 	}
16783 };
16784 
16785 }
16786 }
16787 
16788 namespace color {
16789 namespace _internal {
16790 
16791 template< typename hsl_tag_name, typename cmyk_tag_name >
16792 struct convert
16793 	<
16794 	::color::category::hsl< hsl_tag_name >
16795 	,::color::category::cmyk< cmyk_tag_name >
16796 	> {
16797 public:
16798 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
16799 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
16800 
16801 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
16802 
16803 	typedef ::color::model< hsl_category_type > hsl_model_type;
16804 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
16805 
16806 	typedef ::color::rgb< scalar_type > rgb_model_type;
16807 
16808 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
16809 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
16810 
16811 	typedef typename container_left_trait_type::input_type container_left_input_type;
16812 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
16813 
processcolor::_internal::convert16814 	static void process
16815 	(
16816 		container_left_input_type left
16817 		,container_right_const_input_type right
16818 	) {
16819 		left = hsl_model_type(rgb_model_type(cmyk_model_type(right))).container();
16820 	}
16821 };
16822 
16823 }
16824 }
16825 
16826 namespace color {
16827 namespace _internal {
16828 
16829 template< typename tag_left_name, typename tag_right_name >
16830 struct convert
16831 	<
16832 	::color::category::hsl< tag_left_name >
16833 	,::color::category::hsl< tag_right_name>
16834 	> {
16835 public:
16836 	typedef ::color::category::hsl< tag_left_name > category_left_type;
16837 	typedef ::color::category::hsl< tag_right_name> category_right_type;
16838 
16839 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
16840 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
16841 
16842 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
16843 
16844 	typedef typename container_left_trait_type::input_type container_left_input_type;
16845 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
16846 
processcolor::_internal::convert16847 	static void process
16848 	(
16849 		container_left_input_type left
16850 		,container_right_const_input_type right
16851 	) {
16852 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
16853 		container_left_trait_type::template set<1>(left, reformat_type::template process<1,1>(container_right_trait_type::template get<1>(right)));
16854 		container_left_trait_type::template set<2>(left, reformat_type::template process<2,2>(container_right_trait_type::template get<2>(right)));
16855 	}
16856 };
16857 }
16858 }
16859 
16860 namespace color {
16861 namespace akin {
16862 
16863 template< >struct hsv< ::color::category::gray_uint8 > {
16864 	typedef ::color::category::hsv_uint8 akin_type;
16865 };
16866 template< >struct hsv< ::color::category::gray_uint16 > {
16867 	typedef ::color::category::hsv_uint16 akin_type;
16868 };
16869 template< >struct hsv< ::color::category::gray_uint32 > {
16870 	typedef ::color::category::hsv_uint32 akin_type;
16871 };
16872 template< >struct hsv< ::color::category::gray_uint64 > {
16873 	typedef ::color::category::hsv_uint64 akin_type;
16874 };
16875 template< >struct hsv< ::color::category::gray_float > {
16876 	typedef ::color::category::hsv_float akin_type;
16877 };
16878 template< >struct hsv< ::color::category::gray_double > {
16879 	typedef ::color::category::hsv_double akin_type;
16880 };
16881 template< >struct hsv< ::color::category::gray_ldouble > {
16882 	typedef ::color::category::hsv_ldouble akin_type;
16883 };
16884 
16885 }
16886 }
16887 
16888 namespace color {
16889 namespace akin {
16890 
16891 template< >struct hsv< ::color::category::cmy_uint8 > {
16892 	typedef ::color::category::hsv_uint8 akin_type;
16893 };
16894 template< >struct hsv< ::color::category::cmy_uint16 > {
16895 	typedef ::color::category::hsv_uint16 akin_type;
16896 };
16897 template< >struct hsv< ::color::category::cmy_uint32 > {
16898 	typedef ::color::category::hsv_uint32 akin_type;
16899 };
16900 template< >struct hsv< ::color::category::cmy_uint64 > {
16901 	typedef ::color::category::hsv_uint64 akin_type;
16902 };
16903 template< >struct hsv< ::color::category::cmy_float > {
16904 	typedef ::color::category::hsv_float akin_type;
16905 };
16906 template< >struct hsv< ::color::category::cmy_double > {
16907 	typedef ::color::category::hsv_double akin_type;
16908 };
16909 template< >struct hsv< ::color::category::cmy_ldouble > {
16910 	typedef ::color::category::hsv_ldouble akin_type;
16911 };
16912 
16913 }
16914 }
16915 
16916 namespace color {
16917 namespace akin {
16918 
16919 template< >struct hsv< ::color::category::cmyk_uint8 > {
16920 	typedef ::color::category::hsv_uint8 akin_type;
16921 };
16922 template< >struct hsv< ::color::category::cmyk_uint16 > {
16923 	typedef ::color::category::hsv_uint16 akin_type;
16924 };
16925 template< >struct hsv< ::color::category::cmyk_uint32 > {
16926 	typedef ::color::category::hsv_uint32 akin_type;
16927 };
16928 template< >struct hsv< ::color::category::cmyk_uint64 > {
16929 	typedef ::color::category::hsv_uint64 akin_type;
16930 };
16931 template< >struct hsv< ::color::category::cmyk_float > {
16932 	typedef ::color::category::hsv_float akin_type;
16933 };
16934 template< >struct hsv< ::color::category::cmyk_double > {
16935 	typedef ::color::category::hsv_double akin_type;
16936 };
16937 template< >struct hsv< ::color::category::cmyk_ldouble > {
16938 	typedef ::color::category::hsv_ldouble akin_type;
16939 };
16940 
16941 }
16942 }
16943 
16944 namespace color {
16945 namespace akin {
16946 
16947 template< >struct hsv< ::color::category::hsl_uint8 > {
16948 	typedef ::color::category::hsv_uint8 akin_type;
16949 };
16950 template< >struct hsv< ::color::category::hsl_uint16 > {
16951 	typedef ::color::category::hsv_uint16 akin_type;
16952 };
16953 template< >struct hsv< ::color::category::hsl_uint32 > {
16954 	typedef ::color::category::hsv_uint32 akin_type;
16955 };
16956 template< >struct hsv< ::color::category::hsl_uint64 > {
16957 	typedef ::color::category::hsv_uint64 akin_type;
16958 };
16959 template< >struct hsv< ::color::category::hsl_float > {
16960 	typedef ::color::category::hsv_float akin_type;
16961 };
16962 template< >struct hsv< ::color::category::hsl_double > {
16963 	typedef ::color::category::hsv_double akin_type;
16964 };
16965 template< >struct hsv< ::color::category::hsl_ldouble > {
16966 	typedef ::color::category::hsv_ldouble akin_type;
16967 };
16968 
16969 }
16970 }
16971 
16972 namespace color {
16973 namespace akin {
16974 
16975 template< typename tag_name >
16976 struct hsv< ::color::category::hsv< tag_name > > {
16977 public:
16978 	typedef ::color::category::hsv< tag_name > akin_type;
16979 };
16980 
16981 }
16982 }
16983 
16984 namespace color {
16985 namespace akin {
16986 
16987 template< >struct hsv< ::color::category::hsi_uint8 > {
16988 	typedef ::color::category::hsv_uint8 akin_type;
16989 };
16990 template< >struct hsv< ::color::category::hsi_uint16 > {
16991 	typedef ::color::category::hsv_uint16 akin_type;
16992 };
16993 template< >struct hsv< ::color::category::hsi_uint32 > {
16994 	typedef ::color::category::hsv_uint32 akin_type;
16995 };
16996 template< >struct hsv< ::color::category::hsi_uint64 > {
16997 	typedef ::color::category::hsv_uint64 akin_type;
16998 };
16999 template< >struct hsv< ::color::category::hsi_float > {
17000 	typedef ::color::category::hsv_float akin_type;
17001 };
17002 template< >struct hsv< ::color::category::hsi_double > {
17003 	typedef ::color::category::hsv_double akin_type;
17004 };
17005 template< >struct hsv< ::color::category::hsi_ldouble > {
17006 	typedef ::color::category::hsv_ldouble akin_type;
17007 };
17008 
17009 }
17010 }
17011 
17012 namespace color {
17013 namespace akin {
17014 
17015 template
17016 <
17017 	typename tag_name
17018 
17019 	>
17020 struct hsv< ::color::category::hwb< tag_name > > {
17021 public:
17022 	typedef ::color::category::hsv< tag_name > akin_type;
17023 };
17024 
17025 }
17026 }
17027 
17028 namespace color {
17029 namespace akin {
17030 
17031 template< >struct hsv< ::color::category::rgb_uint8 > {
17032 	typedef ::color::category::hsv_uint8 akin_type;
17033 };
17034 template< >struct hsv< ::color::category::rgb_uint16 > {
17035 	typedef ::color::category::hsv_uint16 akin_type;
17036 };
17037 template< >struct hsv< ::color::category::rgb_uint32 > {
17038 	typedef ::color::category::hsv_uint32 akin_type;
17039 };
17040 template< >struct hsv< ::color::category::rgb_uint64 > {
17041 	typedef ::color::category::hsv_uint64 akin_type;
17042 };
17043 template< >struct hsv< ::color::category::rgb_float > {
17044 	typedef ::color::category::hsv_float akin_type;
17045 };
17046 template< >struct hsv< ::color::category::rgb_double > {
17047 	typedef ::color::category::hsv_double akin_type;
17048 };
17049 template< >struct hsv< ::color::category::rgb_ldouble > {
17050 	typedef ::color::category::hsv_ldouble akin_type;
17051 };
17052 
17053 }
17054 }
17055 
17056 namespace color {
17057 namespace akin {
17058 
17059 template< >struct hsv< ::color::category::yiq_uint8 > {
17060 	typedef ::color::category::hsv_uint8 akin_type;
17061 };
17062 template< >struct hsv< ::color::category::yiq_uint16 > {
17063 	typedef ::color::category::hsv_uint16 akin_type;
17064 };
17065 template< >struct hsv< ::color::category::yiq_uint32 > {
17066 	typedef ::color::category::hsv_uint32 akin_type;
17067 };
17068 template< >struct hsv< ::color::category::yiq_uint64 > {
17069 	typedef ::color::category::hsv_uint64 akin_type;
17070 };
17071 template< >struct hsv< ::color::category::yiq_float > {
17072 	typedef ::color::category::hsv_float akin_type;
17073 };
17074 template< >struct hsv< ::color::category::yiq_double > {
17075 	typedef ::color::category::hsv_double akin_type;
17076 };
17077 template< >struct hsv< ::color::category::yiq_ldouble > {
17078 	typedef ::color::category::hsv_ldouble akin_type;
17079 };
17080 
17081 }
17082 }
17083 
17084 namespace color {
17085 namespace akin {
17086 
17087 template< ::color::constant::yuv::reference_enum reference_number >struct hsv< ::color::category::yuv_uint8 <reference_number> > {
17088 	typedef ::color::category::hsv_uint8 akin_type;
17089 };
17090 template< ::color::constant::yuv::reference_enum reference_number >struct hsv< ::color::category::yuv_uint16 <reference_number> > {
17091 	typedef ::color::category::hsv_uint16 akin_type;
17092 };
17093 template< ::color::constant::yuv::reference_enum reference_number >struct hsv< ::color::category::yuv_uint32 <reference_number> > {
17094 	typedef ::color::category::hsv_uint32 akin_type;
17095 };
17096 template< ::color::constant::yuv::reference_enum reference_number >struct hsv< ::color::category::yuv_uint64 <reference_number> > {
17097 	typedef ::color::category::hsv_uint64 akin_type;
17098 };
17099 template< ::color::constant::yuv::reference_enum reference_number >struct hsv< ::color::category::yuv_float <reference_number> > {
17100 	typedef ::color::category::hsv_float akin_type;
17101 };
17102 template< ::color::constant::yuv::reference_enum reference_number >struct hsv< ::color::category::yuv_double <reference_number> > {
17103 	typedef ::color::category::hsv_double akin_type;
17104 };
17105 template< ::color::constant::yuv::reference_enum reference_number >struct hsv< ::color::category::yuv_ldouble<reference_number> > {
17106 	typedef ::color::category::hsv_ldouble akin_type;
17107 };
17108 
17109 }
17110 }
17111 
17112 namespace color {
17113 namespace akin {
17114 
17115 template< >struct hsv< ::color::category::YCgCo_uint8 > {
17116 	typedef ::color::category::hsv_uint8 akin_type;
17117 };
17118 template< >struct hsv< ::color::category::YCgCo_uint16 > {
17119 	typedef ::color::category::hsv_uint16 akin_type;
17120 };
17121 template< >struct hsv< ::color::category::YCgCo_uint32 > {
17122 	typedef ::color::category::hsv_uint32 akin_type;
17123 };
17124 template< >struct hsv< ::color::category::YCgCo_uint64 > {
17125 	typedef ::color::category::hsv_uint64 akin_type;
17126 };
17127 template< >struct hsv< ::color::category::YCgCo_float > {
17128 	typedef ::color::category::hsv_float akin_type;
17129 };
17130 template< >struct hsv< ::color::category::YCgCo_double > {
17131 	typedef ::color::category::hsv_double akin_type;
17132 };
17133 template< >struct hsv< ::color::category::YCgCo_ldouble > {
17134 	typedef ::color::category::hsv_ldouble akin_type;
17135 };
17136 
17137 }
17138 }
17139 
17140 namespace color {
17141 namespace akin {
17142 
17143 template< >struct hsv< ::color::category::YDbDr_uint8 > {
17144 	typedef ::color::category::hsv_uint8 akin_type;
17145 };
17146 template< >struct hsv< ::color::category::YDbDr_uint16 > {
17147 	typedef ::color::category::hsv_uint16 akin_type;
17148 };
17149 template< >struct hsv< ::color::category::YDbDr_uint32 > {
17150 	typedef ::color::category::hsv_uint32 akin_type;
17151 };
17152 template< >struct hsv< ::color::category::YDbDr_uint64 > {
17153 	typedef ::color::category::hsv_uint64 akin_type;
17154 };
17155 template< >struct hsv< ::color::category::YDbDr_float > {
17156 	typedef ::color::category::hsv_float akin_type;
17157 };
17158 template< >struct hsv< ::color::category::YDbDr_double > {
17159 	typedef ::color::category::hsv_double akin_type;
17160 };
17161 template< >struct hsv< ::color::category::YDbDr_ldouble > {
17162 	typedef ::color::category::hsv_ldouble akin_type;
17163 };
17164 
17165 }
17166 }
17167 
17168 namespace color {
17169 namespace akin {
17170 
17171 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsv< ::color::category::YPbPr_uint8 <reference_number> > {
17172 	typedef ::color::category::hsv_uint8 akin_type;
17173 };
17174 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsv< ::color::category::YPbPr_uint16 <reference_number> > {
17175 	typedef ::color::category::hsv_uint16 akin_type;
17176 };
17177 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsv< ::color::category::YPbPr_uint32 <reference_number> > {
17178 	typedef ::color::category::hsv_uint32 akin_type;
17179 };
17180 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsv< ::color::category::YPbPr_uint64 <reference_number> > {
17181 	typedef ::color::category::hsv_uint64 akin_type;
17182 };
17183 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsv< ::color::category::YPbPr_float <reference_number> > {
17184 	typedef ::color::category::hsv_float akin_type;
17185 };
17186 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsv< ::color::category::YPbPr_double <reference_number> > {
17187 	typedef ::color::category::hsv_double akin_type;
17188 };
17189 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsv< ::color::category::YPbPr_ldouble<reference_number> > {
17190 	typedef ::color::category::hsv_ldouble akin_type;
17191 };
17192 
17193 }
17194 }
17195 
17196 namespace color {
17197 namespace akin {
17198 
17199 template< >struct hsv< ::color::category::xyz_uint8 > {
17200 	typedef ::color::category::hsv_uint8 akin_type;
17201 };
17202 template< >struct hsv< ::color::category::xyz_uint16 > {
17203 	typedef ::color::category::hsv_uint16 akin_type;
17204 };
17205 template< >struct hsv< ::color::category::xyz_uint32 > {
17206 	typedef ::color::category::hsv_uint32 akin_type;
17207 };
17208 template< >struct hsv< ::color::category::xyz_uint64 > {
17209 	typedef ::color::category::hsv_uint64 akin_type;
17210 };
17211 template< >struct hsv< ::color::category::xyz_float > {
17212 	typedef ::color::category::hsv_float akin_type;
17213 };
17214 template< >struct hsv< ::color::category::xyz_double > {
17215 	typedef ::color::category::hsv_double akin_type;
17216 };
17217 template< >struct hsv< ::color::category::xyz_ldouble > {
17218 	typedef ::color::category::hsv_ldouble akin_type;
17219 };
17220 
17221 }
17222 }
17223 
17224 namespace color {
17225 namespace akin {
17226 
17227 template
17228 <
17229 	typename tag_name, ::color::constant::lab::reference_enum lab_reference_number
17230 	>
17231 struct hsv< ::color::category::lab< tag_name, lab_reference_number > > {
17232 public:
17233 	typedef ::color::category::hsv< tag_name > akin_type;
17234 };
17235 
17236 }
17237 }
17238 
17239 namespace color {
17240 namespace akin {
17241 
17242 template
17243 <
17244 	typename tag_name
17245 
17246 	>
17247 struct hsv< ::color::category::xyy< tag_name > > {
17248 public:
17249 	typedef ::color::category::hsv< tag_name > akin_type;
17250 };
17251 
17252 }
17253 }
17254 
17255 namespace color {
17256 namespace akin {
17257 
17258 template
17259 <
17260 	typename tag_name
17261 	,::color::constant::lms::reference_enum reference_number
17262 
17263 	>
17264 struct hsv< ::color::category::lms< tag_name, reference_number > > {
17265 public:
17266 	typedef ::color::category::hsv< tag_name > akin_type;
17267 };
17268 
17269 }
17270 }
17271 
17272 namespace color {
17273 namespace akin {
17274 
17275 template
17276 <
17277 	typename tag_name
17278 
17279 	>
17280 struct hsv< ::color::category::luv< tag_name > > {
17281 public:
17282 	typedef ::color::category::hsv< tag_name > akin_type;
17283 };
17284 
17285 }
17286 }
17287 
17288 namespace color {
17289 namespace akin {
17290 
17291 template
17292 <
17293 	typename tag_name
17294 	>
17295 struct hsv< ::color::category::LabCH< tag_name > > {
17296 public:
17297 	typedef ::color::category::hsv< tag_name > akin_type;
17298 };
17299 
17300 }
17301 }
17302 
17303 namespace color {
17304 namespace akin {
17305 
17306 template< >struct hsv< ::color::category::LuvCH_uint8 > {
17307 	typedef ::color::category::hsv_uint8 akin_type;
17308 };
17309 template< >struct hsv< ::color::category::LuvCH_uint16 > {
17310 	typedef ::color::category::hsv_uint16 akin_type;
17311 };
17312 template< >struct hsv< ::color::category::LuvCH_uint32 > {
17313 	typedef ::color::category::hsv_uint32 akin_type;
17314 };
17315 template< >struct hsv< ::color::category::LuvCH_uint64 > {
17316 	typedef ::color::category::hsv_uint64 akin_type;
17317 };
17318 template< >struct hsv< ::color::category::LuvCH_float > {
17319 	typedef ::color::category::hsv_float akin_type;
17320 };
17321 template< >struct hsv< ::color::category::LuvCH_double > {
17322 	typedef ::color::category::hsv_double akin_type;
17323 };
17324 template< >struct hsv< ::color::category::LuvCH_ldouble > {
17325 	typedef ::color::category::hsv_ldouble akin_type;
17326 };
17327 
17328 }
17329 }
17330 
17331 namespace color {
17332 namespace trait {
17333 
17334 template <> struct info< ::color::category::hsv_uint8 > {
17335 public:
17336 	enum { implemented_entity = true };
17337 	enum { meaningful_entity = true };
17338 };
17339 template <> struct info< ::color::category::hsv_uint16 > {
17340 public:
17341 	enum { implemented_entity = true };
17342 	enum { meaningful_entity = true };
17343 };
17344 template <> struct info< ::color::category::hsv_uint32 > {
17345 public:
17346 	enum { implemented_entity = true };
17347 	enum { meaningful_entity = true };
17348 };
17349 template <> struct info< ::color::category::hsv_uint64 > {
17350 public:
17351 	enum { implemented_entity = true };
17352 	enum { meaningful_entity = true };
17353 };
17354 template <> struct info< ::color::category::hsv_float > {
17355 public:
17356 	enum { implemented_entity = true };
17357 	enum { meaningful_entity = true };
17358 };
17359 template <> struct info< ::color::category::hsv_double > {
17360 public:
17361 	enum { implemented_entity = true };
17362 	enum { meaningful_entity = true };
17363 };
17364 template <> struct info< ::color::category::hsv_ldouble > {
17365 public:
17366 	enum { implemented_entity = true };
17367 	enum { meaningful_entity = true };
17368 };
17369 
17370 }
17371 }
17372 
17373 namespace color {
17374 namespace _internal {
17375 namespace hsv {
17376 namespace bound {
17377 
17378 template< typename index_name, typename scalar_name >
17379 struct scalar {
17380 public:
17381 	typedef scalar_name scalar_type;
17382 	typedef index_name index_type;
17383 
17384 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
17385 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
17386 
17387 	typedef typename trait_type::instance_type instance_type;
17388 	typedef typename trait_type::return_image_type return_image_type;
17389 
17390 	typedef typename index_trait_type::instance_type index_instance_type;
17391 	typedef typename index_trait_type::model_type index_input_const_type;
17392 
17393 	template< index_instance_type index >
maximumcolor::_internal::hsv::bound::scalar17394 	static return_image_type maximum() {
17395 		static instance_type max_list[] = { 360, 100, 100 };
17396 		return max_list[index];
17397 	}
17398 
maximumcolor::_internal::hsv::bound::scalar17399 	static return_image_type maximum(index_input_const_type index) {
17400 		static instance_type max_list[] = { 360, 100, 100 };
17401 		return max_list[index];
17402 	}
17403 
17404 	template< index_instance_type index >
minimumcolor::_internal::hsv::bound::scalar17405 	static return_image_type minimum() {
17406 		static instance_type min_list[] = { 0, 0, 0 };
17407 		return min_list[index];
17408 	}
17409 
minimumcolor::_internal::hsv::bound::scalar17410 	static return_image_type minimum(index_input_const_type index) {
17411 		static instance_type min_list[] = { 0, 0, 0 };
17412 		return min_list[index];
17413 	}
17414 
17415 	template< index_instance_type index >
rangecolor::_internal::hsv::bound::scalar17416 	static return_image_type range() {
17417 		static instance_type range_list[] = { 360, 100, 100 };
17418 		return range_list[index];
17419 	}
17420 
rangecolor::_internal::hsv::bound::scalar17421 	static return_image_type range(index_input_const_type index) {
17422 		static instance_type range_list[] = { 360, 100, 100 };
17423 		return range_list[index];
17424 	}
17425 };
17426 
17427 }
17428 }
17429 }
17430 }
17431 
17432 namespace color {
17433 namespace trait {
17434 
17435 template< >
17436 struct bound< ::color::category::hsv_float >
17437 	: public ::color::_internal::hsv::bound::scalar< typename ::color::trait::index< ::color::category::hsv_float >::instance_type, float > {
17438 };
17439 
17440 template< >
17441 struct bound< ::color::category::hsv_double >
17442 	: public ::color::_internal::hsv::bound::scalar< typename ::color::trait::index< ::color::category::hsv_double >::instance_type, double > {
17443 };
17444 
17445 template< >
17446 struct bound< ::color::category::hsv_ldouble >
17447 	: public ::color::_internal::hsv::bound::scalar< typename ::color::trait::index< ::color::category::hsv_ldouble >::instance_type, long double > {
17448 };
17449 
17450 }
17451 }
17452 
17453 namespace color {
17454 namespace trait {
17455 
17456 template< >
17457 struct bound< ::color::category::hsv_uint8 >
17458 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::hsv_uint8 >::instance_type > {
17459 };
17460 
17461 template< >
17462 struct bound< ::color::category::hsv_uint16 >
17463 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::hsv_uint16 >::instance_type > {
17464 };
17465 
17466 template< >
17467 struct bound< ::color::category::hsv_uint32 >
17468 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::hsv_uint32 >::instance_type > {
17469 };
17470 
17471 template< >
17472 struct bound< ::color::category::hsv_uint64 >
17473 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::hsv_uint64 >::instance_type > {
17474 };
17475 
17476 }
17477 }
17478 
17479 namespace color {
17480 namespace trait {
17481 
17482 template< >
17483 struct component< ::color::category::hsv_float >
17484 	: public ::color::_internal::utility::component::array< float > {
17485 };
17486 
17487 template< >
17488 struct component< ::color::category::hsv_double >
17489 	: public ::color::_internal::utility::component::array< double > {
17490 };
17491 
17492 template< >
17493 struct component< ::color::category::hsv_ldouble >
17494 	: public ::color::_internal::utility::component::array< long double > {
17495 };
17496 
17497 }
17498 }
17499 
17500 namespace color {
17501 namespace trait {
17502 
17503 template< >
17504 struct component< ::color::category::hsv_uint8 >
17505 	: public ::color::_internal::utility::component::array< std::uint8_t > {
17506 };
17507 
17508 template< >
17509 struct component< ::color::category::hsv_uint16 >
17510 	: public ::color::_internal::utility::component::array< std::uint16_t > {
17511 };
17512 
17513 template< >
17514 struct component< ::color::category::hsv_uint32 >
17515 	: public ::color::_internal::utility::component::array< std::uint32_t > {
17516 };
17517 
17518 template< >
17519 struct component< ::color::category::hsv_uint64 >
17520 	: public ::color::_internal::utility::component::array< std::uint64_t > {
17521 };
17522 
17523 }
17524 }
17525 
17526 namespace color {
17527 namespace trait {
17528 
17529 template< >
17530 struct container< ::color::category::hsv_float >
17531 	: public ::color::_internal::utility::container::array< float, 3 > {
17532 };
17533 
17534 template< >
17535 struct container< ::color::category::hsv_double >
17536 	: public ::color::_internal::utility::container::array< double, 3 > {
17537 };
17538 
17539 template< >
17540 struct container< ::color::category::hsv_ldouble >
17541 	: public ::color::_internal::utility::container::array< long double, 3 > {
17542 };
17543 
17544 }
17545 }
17546 
17547 namespace color {
17548 namespace trait {
17549 
17550 template< >
17551 struct container< ::color::category::hsv_uint8 >
17552 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
17553 };
17554 
17555 template< >
17556 struct container< ::color::category::hsv_uint16 >
17557 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
17558 };
17559 
17560 template< >
17561 struct container< ::color::category::hsv_uint32 >
17562 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
17563 };
17564 
17565 template< >
17566 struct container< ::color::category::hsv_uint64 >
17567 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
17568 };
17569 
17570 }
17571 }
17572 
17573 namespace color {
17574 
17575 template< typename type_name >
17576 using hsv = ::color::model< ::color::category::hsv< type_name > >;
17577 
17578 }
17579 
17580 namespace color {
17581 namespace place {
17582 namespace _internal {
17583 
17584 template< typename tag_name >
17585 struct hue< ::color::category::hsv< tag_name > > {
17586 public:
17587 	typedef ::color::category::hsv< tag_name > category_type;
17588 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
17589 
17590 	enum { position_enum = 0 };
17591 	enum { has_enum = true };
17592 
positioncolor::place::_internal::hue17593 	static index_instance_type position() {
17594 		return position_enum;
17595 	}
17596 };
17597 
17598 }
17599 }
17600 }
17601 
17602 namespace color {
17603 namespace check {
17604 namespace _internal {
17605 
17606 template<>
17607 struct integrity< ::color::category::hsv_float> {
17608 public:
17609 	typedef ::color::category::hsv_float category_type;
17610 
17611 	typedef ::color::model<category_type> model_type;
17612 	typedef ::color::trait::bound< category_type > bound_type;
17613 
17614 	enum {
17615 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
17616 	};
17617 
processcolor::check::_internal::integrity17618 	static bool process(model_type const& m) {
17619 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
17620 			return false;
17621 		}
17622 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
17623 			return false;
17624 		}
17625 		return true;
17626 	}
17627 };
17628 
17629 template<>
17630 struct integrity< ::color::category::hsv_double > {
17631 public:
17632 	typedef ::color::category::hsv_double category_type;
17633 
17634 	typedef ::color::model<category_type> model_type;
17635 	typedef ::color::trait::bound< category_type > bound_type;
17636 
17637 	enum {
17638 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
17639 	};
17640 
processcolor::check::_internal::integrity17641 	static bool process(model_type const& m) {
17642 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
17643 			return false;
17644 		}
17645 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
17646 			return false;
17647 		}
17648 		return true;
17649 	}
17650 };
17651 
17652 template<>
17653 struct integrity< ::color::category::hsv_ldouble > {
17654 public:
17655 	typedef ::color::category::hsv_ldouble category_type;
17656 
17657 	typedef ::color::model<category_type> model_type;
17658 	typedef ::color::trait::bound< category_type > bound_type;
17659 
17660 	enum {
17661 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
17662 	};
17663 
processcolor::check::_internal::integrity17664 	static bool process(model_type const& m) {
17665 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
17666 			return false;
17667 		}
17668 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
17669 			return false;
17670 		}
17671 		return true;
17672 	}
17673 };
17674 
17675 }
17676 }
17677 }
17678 
17679 namespace color {
17680 namespace place {
17681 namespace _internal {
17682 
17683 template< typename tag_name >
17684 struct saturation< ::color::category::hsv< tag_name > > {
17685 public:
17686 	typedef ::color::category::hsv< tag_name > category_type;
17687 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
17688 
17689 	enum { position_enum = 1 };
17690 	enum { has_enum = true };
17691 
positioncolor::place::_internal::saturation17692 	static index_instance_type position() {
17693 		return position_enum;
17694 	}
17695 };
17696 
17697 }
17698 }
17699 }
17700 
17701 namespace color {
17702 namespace place {
17703 namespace _internal {
17704 
17705 template< typename tag_name >
17706 struct value< ::color::category::hsv< tag_name > > {
17707 public:
17708 	typedef ::color::category::hsv< tag_name > category_type;
17709 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
17710 
17711 	enum { position_enum = 2 };
17712 	enum { has_enum = true };
17713 
positioncolor::place::_internal::value17714 	static index_instance_type position() {
17715 		return position_enum;
17716 	}
17717 };
17718 
17719 }
17720 }
17721 }
17722 
17723 namespace color {
17724 namespace check {
17725 namespace _internal {
17726 
17727 template< typename tag_name >
17728 struct unique< ::color::category::hsv< tag_name > > {
17729 public:
17730 	typedef ::color::category::hsv< tag_name > category_type;
17731 
17732 	typedef ::color::model<category_type> model_type;
17733 	typedef ::color::trait::bound< category_type > bound_type;
17734 
17735 	enum {
17736 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
17737 		,saturation_p = ::color::place::_internal::saturation<category_type>::position_enum
17738 		,value_p = ::color::place::_internal::value<category_type>::position_enum
17739 	};
17740 
processcolor::check::_internal::unique17741 	static bool process(model_type const& m) {
17742 		if(m.template get<saturation_p>() == bound_type::template minimum<saturation_p>()) {
17743 			return false;
17744 		}
17745 		if(m.template get<value_p>() == bound_type::template minimum<value_p>()) {
17746 			return false;
17747 		}
17748 		if(m.template get<value_p>() == bound_type::template maximum<value_p>()) {
17749 			if(m.template get<saturation_p>() == bound_type::template minimum<saturation_p>()) {
17750 				return false;
17751 			}
17752 		}
17753 		return true;
17754 	}
17755 };
17756 
17757 }
17758 }
17759 }
17760 
17761 namespace color {
17762 namespace fix {
17763 namespace _internal {
17764 
17765 template< typename tag_name >
17766 struct unique< ::color::category::hsv< tag_name > > {
17767 public:
17768 	typedef ::color::category::hsv< tag_name > category_type;
17769 
17770 	typedef typename ::color::model<category_type> model_type;
17771 	typedef typename ::color::trait::bound<category_type> bound_type;
17772 
17773 	enum {
17774 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
17775 		,saturation_p = ::color::place::_internal::saturation<category_type>::position_enum
17776 		,value_p = ::color::place::_internal::value<category_type>::position_enum
17777 	};
17778 
processcolor::fix::_internal::unique17779 	static void process(model_type &result) {
17780 		if(result.template get<value_p>() == bound_type::template minimum<value_p>()) {
17781 			result.template set<hue_p>(bound_type::template minimum<hue_p>());
17782 			result.template set<saturation_p>(bound_type::template minimum<saturation_p>());
17783 			return;
17784 		}
17785 		if(result.template get<saturation_p>() == bound_type::template minimum<saturation_p>()) {
17786 			result.template set<hue_p>(bound_type::template minimum<hue_p>());
17787 			return;
17788 		}
17789 	}
17790 
processcolor::fix::_internal::unique17791 	static void process(model_type &result, model_type const& right) {
17792 		if(result.template get<value_p>() == bound_type::template minimum<value_p>()) {
17793 			result.template set<hue_p>(bound_type::template minimum<hue_p>());
17794 			result.template set<saturation_p>(bound_type::template minimum<saturation_p>());
17795 			return;
17796 		}
17797 		if(result.template get<saturation_p>() == bound_type::template minimum<saturation_p>()) {
17798 			result.template set<hue_p>(bound_type::template minimum<hue_p>());
17799 			return;
17800 		}
17801 		result = right;
17802 		return;
17803 	}
17804 
17805 };
17806 
17807 }
17808 }
17809 }
17810 
17811 namespace color {
17812 namespace fix {
17813 namespace _internal {
17814 namespace _privateHSV {
17815 
17816 template< typename category_name >
17817 struct integrity {
17818 public:
17819 	typedef category_name category_type;
17820 
17821 	typedef typename ::color::model<category_type> model_type;
17822 	typedef typename ::color::trait::bound<category_type> bound_type;
17823 
17824 	enum {
17825 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
17826 	};
17827 
processcolor::fix::_internal::_privateHSV::integrity17828 	static void process(model_type &result) {
17829 		if(result.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
17830 			result.template set<hue_p>(bound_type::template minimum<hue_p>());
17831 			return;
17832 		}
17833 		if(bound_type::template maximum<hue_p>() < result.template get<hue_p>()) {
17834 			result.template set<hue_p>(bound_type::template maximum<hue_p>());
17835 			return;
17836 		}
17837 	}
17838 
processcolor::fix::_internal::_privateHSV::integrity17839 	static void process(model_type &result, model_type const& right) {
17840 		result = right;
17841 		if(result.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
17842 			result.template set<hue_p>(bound_type::template minimum<hue_p>());
17843 			return;
17844 		}
17845 		if(bound_type::template maximum<hue_p>() < result.template get<hue_p>()) {
17846 			result.template set<hue_p>(bound_type::template maximum<hue_p>());
17847 			return;
17848 		}
17849 	}
17850 
17851 };
17852 
17853 }
17854 
17855 template<> struct integrity< ::color::category::hsv_float > : public ::color::fix::_internal::_privateHSV::integrity< ::color::category::hsv_float > { };
17856 template<> struct integrity< ::color::category::hsv_double > : public ::color::fix::_internal::_privateHSV::integrity< ::color::category::hsv_double > { };
17857 template<> struct integrity< ::color::category::hsv_ldouble > : public ::color::fix::_internal::_privateHSV::integrity< ::color::category::hsv_ldouble> { };
17858 
17859 }
17860 }
17861 }
17862 
17863 namespace color {
17864 namespace get {
17865 
17866 template< typename tag_name >
17867 inline
17868 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsv<tag_name> >::akin_type >::return_type
red(::color::model<::color::category::hsv<tag_name>> const & color_parameter)17869 red(::color::model< ::color::category::hsv<tag_name> > const& color_parameter) {
17870 	typedef ::color::category::hsv<tag_name> category_type;
17871 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
17872 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
17873 	typedef ::color::_internal::diverse< akin_type > diverse_type;
17874 	typedef ::color::_internal::normalize<category_type> normalize_type;
17875 	enum {
17876 		red_p = ::color::place::_internal::red<akin_type>::position_enum
17877 		,green_p = ::color::place::_internal::green<akin_type>::position_enum
17878 		,blue_p = ::color::place::_internal::blue<akin_type>::position_enum
17879 	};
17880 	enum {
17881 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
17882 		,saturation_p = ::color::place::_internal::saturation<category_type>::position_enum
17883 		,value_p = ::color::place::_internal::value<category_type>::position_enum
17884 	};
17885 	scalar_type h = normalize_type::template process<hue_p >(color_parameter.template get<hue_p >());
17886 	scalar_type s = normalize_type::template process<saturation_p>(color_parameter.template get<saturation_p>());
17887 	scalar_type v = normalize_type::template process<value_p >(color_parameter.template get<value_p >());
17888 	int region = int(6 * h);
17889 	scalar_type f = h * 6 - region ;
17890 	scalar_type p = v * (1 - s);
17891 	scalar_type q = v * (1 - f * s);
17892 	scalar_type t = v * (1 - (1 - f) * s);
17893 	scalar_type r;
17894 	switch(region % 6) {
17895 	case 0:
17896 		r = v;
17897 		break;
17898 	case 1:
17899 		r = q;
17900 		break;
17901 	case 2:
17902 		r = p;
17903 		break;
17904 	case 3:
17905 		r = p;
17906 		break;
17907 	case 4:
17908 		r = t;
17909 		break;
17910 	case 5:
17911 		r = v;
17912 		break;
17913 	}
17914 	return diverse_type::template process<red_p>(r);
17915 }
17916 
17917 }
17918 }
17919 
17920 namespace color {
17921 namespace get {
17922 
17923 template< typename tag_name >
17924 inline
17925 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsv<tag_name> >::akin_type >::return_type
green(::color::model<::color::category::hsv<tag_name>> const & color_parameter)17926 green(::color::model< ::color::category::hsv<tag_name> > const& color_parameter) {
17927 	typedef ::color::category::hsv<tag_name> category_type;
17928 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
17929 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
17930 	typedef ::color::_internal::diverse< akin_type > diverse_type;
17931 	typedef ::color::_internal::normalize<category_type> normalize_type;
17932 	enum {
17933 		red_p = ::color::place::_internal::red<akin_type>::position_enum
17934 		,green_p = ::color::place::_internal::green<akin_type>::position_enum
17935 		,blue_p = ::color::place::_internal::blue<akin_type>::position_enum
17936 	};
17937 	enum {
17938 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
17939 		,saturation_p = ::color::place::_internal::saturation<category_type>::position_enum
17940 		,value_p = ::color::place::_internal::value<category_type>::position_enum
17941 	};
17942 	scalar_type h = normalize_type::template process<hue_p >(color_parameter.template get<hue_p >());
17943 	scalar_type s = normalize_type::template process<saturation_p>(color_parameter.template get<saturation_p>());
17944 	scalar_type v = normalize_type::template process<value_p >(color_parameter.template get<value_p >());
17945 	int region = int(6 * h);
17946 	scalar_type f = h * 6 - region ;
17947 	scalar_type p = v * (1 - s);
17948 	scalar_type q = v * (1 - f * s);
17949 	scalar_type t = v * (1 - (1 - f) * s);
17950 	scalar_type g;
17951 	switch(region % 6) {
17952 	case 0:
17953 		g = t;
17954 		break;
17955 	case 1:
17956 		g = v;
17957 		break;
17958 	case 2:
17959 		g = v;
17960 		break;
17961 	case 3:
17962 		g = q;
17963 		break;
17964 	case 4:
17965 		g = p;
17966 		break;
17967 	case 5:
17968 		g = p;
17969 		break;
17970 	}
17971 	return diverse_type::template process<green_p>(g);
17972 }
17973 
17974 }
17975 }
17976 
17977 namespace color {
17978 namespace get {
17979 
17980 template< typename tag_name >
17981 inline
17982 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsv<tag_name> >::akin_type >::return_type
blue(::color::model<::color::category::hsv<tag_name>> const & color_parameter)17983 blue(::color::model< ::color::category::hsv<tag_name> > const& color_parameter) {
17984 	typedef ::color::category::hsv<tag_name> category_type;
17985 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
17986 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
17987 	typedef ::color::_internal::diverse< akin_type > diverse_type;
17988 	typedef ::color::_internal::normalize<category_type> normalize_type;
17989 	enum {
17990 		red_p = ::color::place::_internal::red<akin_type>::position_enum
17991 		,green_p = ::color::place::_internal::green<akin_type>::position_enum
17992 		,blue_p = ::color::place::_internal::blue<akin_type>::position_enum
17993 	};
17994 	enum {
17995 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
17996 		,saturation_p = ::color::place::_internal::saturation<category_type>::position_enum
17997 		,value_p = ::color::place::_internal::value<category_type>::position_enum
17998 	};
17999 	scalar_type h = normalize_type::template process<hue_p >(color_parameter.template get<hue_p >());
18000 	scalar_type s = normalize_type::template process<saturation_p>(color_parameter.template get<saturation_p>());
18001 	scalar_type v = normalize_type::template process<value_p >(color_parameter.template get<value_p >());
18002 	int region = int(6 * h);
18003 	scalar_type f = h * 6 - region ;
18004 	scalar_type p = v * (1 - s);
18005 	scalar_type q = v * (1 - f * s);
18006 	scalar_type t = v * (1 - (1 - f) * s);
18007 	scalar_type b;
18008 	switch(region % 6) {
18009 	case 0:
18010 		b = p;
18011 		break;
18012 	case 1:
18013 		b = p;
18014 		break;
18015 	case 2:
18016 		b = t;
18017 		break;
18018 	case 3:
18019 		b = v;
18020 		break;
18021 	case 4:
18022 		b = v;
18023 		break;
18024 	case 5:
18025 		b = q;
18026 		break;
18027 	}
18028 	return diverse_type::template process<blue_p>(b);
18029 }
18030 
18031 }
18032 }
18033 
18034 namespace color {
18035 namespace get {
18036 
18037 template< typename tag_name >
18038 inline
18039 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::hsv<tag_name> >::akin_type >::return_type
gray(::color::model<::color::category::hsv<tag_name>> const & color_parameter)18040 gray(::color::model< ::color::category::hsv<tag_name> > const& color_parameter) {
18041 	typedef ::color::category::hsv<tag_name> category_type;
18042 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
18043 	typedef typename ::color::akin::gray<category_type>::akin_type akin_type;
18044 	typedef ::color::_internal::diverse< akin_type > diverse_type;
18045 	typedef ::color::_internal::normalize<category_type> normalize_type;
18046 	enum { value_p = ::color::place::_internal::value<category_type>::position_enum };
18047 	scalar_type g = normalize_type::template process<value_p >(color_parameter.template get<value_p >());
18048 	return diverse_type::template process<0>(g);
18049 }
18050 
18051 }
18052 }
18053 
18054 namespace color {
18055 namespace get {
18056 
18057 template< typename tag_name >
18058 inline
18059 typename ::color::model< ::color::category::hsv< tag_name> >::component_const_type
hue(::color::model<::color::category::hsv<tag_name>> const & color_parameter)18060 hue(::color::model< ::color::category::hsv< tag_name> > const& color_parameter) {
18061 	typedef ::color::category::hsv< tag_name> category_type;
18062 	enum { hue_p = ::color::place::_internal::hue<category_type>::position_enum };
18063 	return color_parameter.template get<hue_p>();
18064 }
18065 
18066 }
18067 }
18068 
18069 namespace color {
18070 namespace get {
18071 
18072 template< typename tag_name >
18073 inline
18074 typename ::color::model< ::color::category::hsv< tag_name> >::component_const_type
saturation(::color::model<::color::category::hsv<tag_name>> const & color_parameter)18075 saturation(::color::model< ::color::category::hsv< tag_name> > const& color_parameter) {
18076 	typedef ::color::category::hsv< tag_name> category_type;
18077 	enum { saturation_p = ::color::place::_internal::saturation<category_type>::position_enum };
18078 	return color_parameter.template get<saturation_p>();
18079 }
18080 
18081 }
18082 }
18083 
18084 namespace color {
18085 namespace get {
18086 
18087 template< typename tag_name >
18088 inline
18089 typename ::color::model< ::color::category::hsv< tag_name> >::component_const_type
chroma(::color::model<::color::category::hsv<tag_name>> const & color_parameter)18090 chroma(::color::model< ::color::category::hsv< tag_name> > const& color_parameter) {
18091 	typedef ::color::category::hsv< tag_name > category_type;
18092 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
18093 	typedef ::color::_internal::diverse< category_type > diverse_type;
18094 	typedef ::color::_internal::normalize<category_type> normalize_type;
18095 	enum {
18096 		saturation_p = ::color::place::_internal::saturation<category_type>::position_enum
18097 		,value_p = ::color::place::_internal::value<category_type>::position_enum
18098 	};
18099 	scalar_type s = normalize_type::template process<saturation_p>(color_parameter.template get<saturation_p>());
18100 	scalar_type v = normalize_type::template process<value_p >(color_parameter.template get<value_p >());
18101 	return diverse_type::template process<value_p>(s * v);
18102 }
18103 
18104 }
18105 }
18106 
18107 namespace color {
18108 namespace set {
18109 
18110 template< typename tag_name >
18111 inline
18112 void
hue(::color::model<::color::category::hsv<tag_name>> & color_parameter,typename::color::model<::color::category::hsv<tag_name>>::component_input_const_type component_parameter)18113 hue
18114 (
18115 	::color::model< ::color::category::hsv< tag_name > > & color_parameter
18116 	,typename ::color::model< ::color::category::hsv< tag_name > >::component_input_const_type component_parameter
18117 ) {
18118 	typedef ::color::category::hsv< tag_name > category_type;
18119 	enum { hue_p = ::color::place::_internal::hue< category_type >::position_enum };
18120 	color_parameter.template set<hue_p>(component_parameter);
18121 }
18122 
18123 }
18124 }
18125 
18126 namespace color {
18127 namespace set {
18128 
18129 template< typename tag_name >
18130 inline
18131 void
saturation(::color::model<::color::category::hsv<tag_name>> & color_parameter,typename::color::model<::color::category::hsv<tag_name>>::component_input_const_type component_parameter)18132 saturation
18133 (
18134 	::color::model< ::color::category::hsv< tag_name > > & color_parameter
18135 	,typename ::color::model< ::color::category::hsv< tag_name > >::component_input_const_type component_parameter
18136 ) {
18137 	typedef ::color::category::hsv< tag_name > category_type;
18138 	enum { saturation_p = ::color::place::_internal::saturation< category_type >::position_enum };
18139 	color_parameter.template set<saturation_p>(component_parameter);
18140 }
18141 
18142 }
18143 }
18144 
18145 namespace color {
18146 namespace set {
18147 
18148 template< typename tag_name >
18149 inline
18150 void
blue(::color::model<::color::category::hsv<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::hsv<tag_name>>::akin_type>::model_type component_parameter)18151 blue
18152 (
18153 	::color::model< ::color::category::hsv< tag_name > > & color_parameter
18154 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsv< tag_name > >::akin_type >::model_type component_parameter
18155 ) {
18156 	typedef ::color::category::hsv< tag_name > category_type;
18157 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
18158 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
18159 	::color::model< akin_type > rgb(color_parameter);
18160 	rgb.template set<blue_p > (component_parameter);
18161 	color_parameter = rgb;
18162 }
18163 
18164 }
18165 }
18166 
18167 namespace color {
18168 namespace set {
18169 
18170 template< typename tag_name >
18171 inline
18172 void
green(::color::model<::color::category::hsv<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::hsv<tag_name>>::akin_type>::model_type component_parameter)18173 green
18174 (
18175 	::color::model< ::color::category::hsv< tag_name > > & color_parameter
18176 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsv< tag_name > >::akin_type >::model_type component_parameter
18177 ) {
18178 	typedef ::color::category::hsv< tag_name > category_type;
18179 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
18180 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
18181 	::color::model< akin_type > rgb(color_parameter);
18182 	rgb.template set< green_p > (component_parameter);
18183 	color_parameter = rgb;
18184 }
18185 
18186 }
18187 }
18188 
18189 namespace color {
18190 namespace set {
18191 
18192 template< typename tag_name >
18193 inline
18194 void
red(::color::model<::color::category::hsv<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::hsv<tag_name>>::akin_type>::model_type component_parameter)18195 red
18196 (
18197 	::color::model< ::color::category::hsv< tag_name > > & color_parameter
18198 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsv< tag_name > >::akin_type >::model_type component_parameter
18199 ) {
18200 	typedef ::color::category::hsv< tag_name > category_type;
18201 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
18202 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
18203 	::color::model< akin_type > rgb(color_parameter);
18204 	rgb.template set<red_p> (component_parameter);
18205 	color_parameter = rgb;
18206 }
18207 
18208 }
18209 }
18210 
18211 namespace color {
18212 namespace set {
18213 
18214 template< typename tag_name >
18215 inline
18216 void
gray(::color::model<::color::category::hsv<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::hsv<tag_name>>::akin_type>::model_type component_parameter)18217 gray
18218 (
18219 	::color::model< ::color::category::hsv< tag_name > > & color_parameter
18220 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::hsv< tag_name > >::akin_type >::model_type component_parameter
18221 ) {
18222 	typedef ::color::category::hsv< tag_name > category_type;
18223 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
18224 	typedef ::color::_internal::reformat< category_type, akin_type > reformat_type;
18225 	enum {
18226 		value_p = ::color::place::_internal::value<category_type>::position_enum
18227 	};
18228 	color_parameter.template set<value_p>(reformat_type::template process<value_p,0>(component_parameter));
18229 }
18230 
18231 }
18232 }
18233 
18234 namespace color {
18235 namespace _internal {
18236 
18237 template< typename hsv_tag_name, typename gray_tag_name >
18238 struct convert
18239 	<
18240 	::color::category::hsv< hsv_tag_name >
18241 	,::color::category::gray< gray_tag_name >
18242 	> {
18243 public:
18244 	typedef ::color::category::hsv< hsv_tag_name > category_left_type;
18245 	typedef ::color::category::gray< gray_tag_name > category_right_type;
18246 
18247 	typedef ::color::trait::bound<category_left_type> bound_left_trait_type;
18248 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
18249 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
18250 
18251 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
18252 
18253 	typedef typename container_left_trait_type::input_type container_left_input_type;
18254 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
18255 
18256 	enum {
18257 		gray_p = ::color::place::_internal::gray<category_right_type>::position_enum
18258 	};
18259 
18260 	enum {
18261 		hue_p = ::color::place::_internal::hue<category_left_type>::position_enum
18262 		,saturation_p = ::color::place::_internal::saturation<category_left_type>::position_enum
18263 		,value_p = ::color::place::_internal::value<category_left_type>::position_enum
18264 	};
18265 
processcolor::_internal::convert18266 	static void process
18267 	(
18268 		container_left_input_type left
18269 		,container_right_const_input_type right
18270 	) {
18271 		container_left_trait_type::template set<hue_p>(left, bound_left_trait_type::template minimum<hue_p>());
18272 		container_left_trait_type::template set<saturation_p>(left, bound_left_trait_type::template minimum<saturation_p>());
18273 		container_left_trait_type::template set<value_p>(left, reformat_type::template process<value_p,0>(container_right_trait_type::template get<0>(right)));
18274 	}
18275 };
18276 
18277 }
18278 }
18279 
18280 namespace color {
18281 namespace _internal {
18282 
18283 template< typename hsv_tag_name, typename cmy_tag_name >
18284 struct convert
18285 	<
18286 	::color::category::hsv< hsv_tag_name >
18287 	,::color::category::cmy< cmy_tag_name >
18288 	> {
18289 public:
18290 	typedef ::color::category::hsv< hsv_tag_name > category_left_type;
18291 	typedef ::color::category::cmy< cmy_tag_name > category_right_type;
18292 
18293 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
18294 
18295 	typedef ::color::trait::scalar<category_left_type> scalar_trait_type;
18296 
18297 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
18298 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
18299 
18300 	typedef typename container_left_trait_type::input_type container_left_input_type;
18301 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
18302 
18303 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
18304 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
18305 
18306 	enum {
18307 		hue_p = ::color::place::_internal::hue<category_left_type >::position_enum
18308 		,saturation_p = ::color::place::_internal::saturation<category_left_type>::position_enum
18309 		,value_p = ::color::place::_internal::value<category_left_type>::position_enum
18310 	};
18311 
18312 	enum {
18313 		cyan_p = ::color::place::_internal::cyan<category_right_type>::position_enum
18314 		,magenta_p = ::color::place::_internal::magenta<category_right_type>::position_enum
18315 		,yellow_p = ::color::place::_internal::yellow<category_right_type>::position_enum
18316 	};
18317 
processcolor::_internal::convert18318 	static void process
18319 	(
18320 		container_left_input_type left
18321 		,container_right_const_input_type right
18322 	) {
18323 		scalar_type r = scalar_type(1) - normalize_type::template process<cyan_p >(container_right_trait_type::template get<cyan_p >(right));
18324 		scalar_type g = scalar_type(1) - normalize_type::template process<magenta_p>(container_right_trait_type::template get<magenta_p >(right));
18325 		scalar_type b = scalar_type(1) - normalize_type::template process<yellow_p >(container_right_trait_type::template get<yellow_p>(right));
18326 		scalar_type lo = std::min<scalar_type>({r,g,b});
18327 		scalar_type v = std::max<scalar_type>({r,g,b});
18328 		scalar_type delta = v - lo;
18329 		scalar_type h = 0;
18330 		scalar_type s = 0;
18331 		if((false == scalar_trait_type::is_small(v))
18332 		   && (false == scalar_trait_type::is_small(delta))) {
18333 			s = delta / v;
18334 			if(v == r) {
18335 				h = (scalar_type(60)/scalar_type(360)) * (g - b) / delta + (g < b ? scalar_type(1) : scalar_type(0));
18336 			}
18337 			if(v == g) {
18338 				h = (scalar_type(60)/scalar_type(360)) * (b - r) / delta + (scalar_type(120)/scalar_type(360));
18339 			}
18340 			if(v == b) {
18341 				h = (scalar_type(60)/scalar_type(360)) * (r - g) / delta + (scalar_type(240)/scalar_type(360));
18342 			}
18343 		}
18344 		container_left_trait_type::template set<hue_p >(left, diverse_type::template process<hue_p >(h));
18345 		container_left_trait_type::template set<saturation_p>(left, diverse_type::template process<saturation_p>(s));
18346 		container_left_trait_type::template set<value_p >(left, diverse_type::template process<value_p >(v));
18347 	}
18348 };
18349 
18350 }
18351 }
18352 
18353 namespace color {
18354 namespace _internal {
18355 
18356 template< typename hsv_tag_name, typename cmyk_tag_name >
18357 struct convert
18358 	<
18359 	::color::category::hsv< hsv_tag_name >
18360 	,::color::category::cmyk< cmyk_tag_name >
18361 	> {
18362 public:
18363 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_left_type;
18364 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
18365 
18366 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
18367 
18368 	typedef ::color::model< hsv_category_type > hsv_model_type;
18369 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
18370 
18371 	typedef ::color::rgb< scalar_type > rgb_model_type;
18372 
18373 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
18374 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
18375 
18376 	typedef typename container_left_trait_type::input_type container_left_input_type;
18377 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
18378 
processcolor::_internal::convert18379 	static void process
18380 	(
18381 		container_left_input_type left
18382 		,container_right_const_input_type right
18383 	) {
18384 		left = hsv_model_type(rgb_model_type(cmyk_model_type(right))).container();
18385 	}
18386 };
18387 
18388 }
18389 }
18390 
18391 namespace color {
18392 namespace _internal {
18393 
18394 template< typename hsv_tag_name, typename hsl_tag_name >
18395 struct convert
18396 	<
18397 	::color::category::hsv< hsv_tag_name >
18398 	,::color::category::hsl< hsl_tag_name >
18399 	> {
18400 public:
18401 	typedef ::color::category::hsv< hsv_tag_name > category_left_type;
18402 	typedef ::color::category::hsl< hsl_tag_name > category_right_type;
18403 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
18404 
18405 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
18406 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
18407 
18408 	typedef typename container_left_trait_type::input_type container_left_input_type;
18409 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
18410 
18411 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
18412 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
18413 
18414 	enum {
18415 		hl_p = ::color::place::_internal::hue<category_left_type>::position_enum
18416 		,sl_p = ::color::place::_internal::saturation<category_left_type>::position_enum
18417 		,vl_p = ::color::place::_internal::value<category_left_type>::position_enum
18418 	};
18419 
18420 	enum {
18421 		hr_p = ::color::place::_internal::hue<category_right_type>::position_enum
18422 		,sr_p = ::color::place::_internal::saturation<category_right_type>::position_enum
18423 		,lr_p = ::color::place::_internal::lightness<category_right_type>::position_enum
18424 	};
18425 
processcolor::_internal::convert18426 	static void process
18427 	(
18428 		container_left_input_type left
18429 		,container_right_const_input_type right
18430 	) {
18431 		scalar_type h = normalize_type::template process<hr_p>(container_right_trait_type::template get<hr_p>(right));
18432 		scalar_type ss = normalize_type::template process<sr_p>(container_right_trait_type::template get<sr_p>(right));
18433 		scalar_type l = normalize_type::template process<lr_p>(container_right_trait_type::template get<lr_p>(right));
18434 		scalar_type v = (2 * l + ss*(1 - fabs(2*l-1))) /2;
18435 		scalar_type s = 2*(v - l) / v;
18436 		container_left_trait_type::template set<hl_p>(left, diverse_type::template process<hl_p>(h));
18437 		container_left_trait_type::template set<sl_p>(left, diverse_type::template process<sl_p>(s));
18438 		container_left_trait_type::template set<vl_p>(left, diverse_type::template process<vl_p>(v));
18439 	}
18440 };
18441 
18442 }
18443 }
18444 namespace color {
18445 namespace _internal {
18446 
18447 template< typename tag_left_name, typename tag_right_name >
18448 struct convert
18449 	<
18450 	::color::category::hsv< tag_left_name >
18451 	,::color::category::hsv< tag_right_name>
18452 	> {
18453 public:
18454 	typedef ::color::category::hsv< tag_left_name > category_left_type;
18455 	typedef ::color::category::hsv< tag_right_name> category_right_type;
18456 
18457 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
18458 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
18459 
18460 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
18461 
18462 	typedef typename container_left_trait_type::input_type container_left_input_type;
18463 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
18464 
18465 	enum {
18466 		hl_p = ::color::place::_internal::hue<category_left_type>::position_enum
18467 		,sl_p = ::color::place::_internal::saturation<category_left_type>::position_enum
18468 		,vl_p = ::color::place::_internal::value<category_left_type>::position_enum
18469 	};
18470 
18471 	enum {
18472 		hr_p = ::color::place::_internal::hue<category_right_type>::position_enum
18473 		,sr_p = ::color::place::_internal::saturation<category_right_type>::position_enum
18474 		,vr_p = ::color::place::_internal::value<category_right_type>::position_enum
18475 	};
18476 
processcolor::_internal::convert18477 	static void process
18478 	(
18479 		container_left_input_type left
18480 		,container_right_const_input_type right
18481 	) {
18482 		container_left_trait_type::template set<hl_p>(left, reformat_type::template process<hl_p,hr_p>(container_right_trait_type::template get<hr_p>(right)));
18483 		container_left_trait_type::template set<sl_p>(left, reformat_type::template process<sl_p,sr_p>(container_right_trait_type::template get<sr_p>(right)));
18484 		container_left_trait_type::template set<vl_p>(left, reformat_type::template process<vl_p,vr_p>(container_right_trait_type::template get<vr_p>(right)));
18485 	}
18486 };
18487 
18488 }
18489 }
18490 
18491 namespace color {
18492 namespace akin {
18493 
18494 template< >struct hsi< ::color::category::gray_uint8 > {
18495 	typedef ::color::category::hsi_uint8 akin_type;
18496 };
18497 template< >struct hsi< ::color::category::gray_uint16 > {
18498 	typedef ::color::category::hsi_uint16 akin_type;
18499 };
18500 template< >struct hsi< ::color::category::gray_uint32 > {
18501 	typedef ::color::category::hsi_uint32 akin_type;
18502 };
18503 template< >struct hsi< ::color::category::gray_uint64 > {
18504 	typedef ::color::category::hsi_uint64 akin_type;
18505 };
18506 template< >struct hsi< ::color::category::gray_float > {
18507 	typedef ::color::category::hsi_float akin_type;
18508 };
18509 template< >struct hsi< ::color::category::gray_double > {
18510 	typedef ::color::category::hsi_double akin_type;
18511 };
18512 template< >struct hsi< ::color::category::gray_ldouble > {
18513 	typedef ::color::category::hsi_ldouble akin_type;
18514 };
18515 
18516 }
18517 }
18518 
18519 namespace color {
18520 namespace akin {
18521 
18522 template< >struct hsi< ::color::category::cmy_uint8 > {
18523 	typedef ::color::category::hsi_uint8 akin_type;
18524 };
18525 template< >struct hsi< ::color::category::cmy_uint16 > {
18526 	typedef ::color::category::hsi_uint16 akin_type;
18527 };
18528 template< >struct hsi< ::color::category::cmy_uint32 > {
18529 	typedef ::color::category::hsi_uint32 akin_type;
18530 };
18531 template< >struct hsi< ::color::category::cmy_uint64 > {
18532 	typedef ::color::category::hsi_uint64 akin_type;
18533 };
18534 template< >struct hsi< ::color::category::cmy_float > {
18535 	typedef ::color::category::hsi_float akin_type;
18536 };
18537 template< >struct hsi< ::color::category::cmy_double > {
18538 	typedef ::color::category::hsi_double akin_type;
18539 };
18540 template< >struct hsi< ::color::category::cmy_ldouble > {
18541 	typedef ::color::category::hsi_ldouble akin_type;
18542 };
18543 
18544 }
18545 }
18546 
18547 namespace color {
18548 namespace akin {
18549 
18550 template< >struct hsi< ::color::category::cmyk_uint8 > {
18551 	typedef ::color::category::hsi_uint8 akin_type;
18552 };
18553 template< >struct hsi< ::color::category::cmyk_uint16 > {
18554 	typedef ::color::category::hsi_uint16 akin_type;
18555 };
18556 template< >struct hsi< ::color::category::cmyk_uint32 > {
18557 	typedef ::color::category::hsi_uint32 akin_type;
18558 };
18559 template< >struct hsi< ::color::category::cmyk_uint64 > {
18560 	typedef ::color::category::hsi_uint64 akin_type;
18561 };
18562 template< >struct hsi< ::color::category::cmyk_float > {
18563 	typedef ::color::category::hsi_float akin_type;
18564 };
18565 template< >struct hsi< ::color::category::cmyk_double > {
18566 	typedef ::color::category::hsi_double akin_type;
18567 };
18568 template< >struct hsi< ::color::category::cmyk_ldouble > {
18569 	typedef ::color::category::hsi_ldouble akin_type;
18570 };
18571 
18572 }
18573 }
18574 
18575 namespace color {
18576 namespace akin {
18577 
18578 template< >struct hsi< ::color::category::hsl_uint8 > {
18579 	typedef ::color::category::hsi_uint8 akin_type;
18580 };
18581 template< >struct hsi< ::color::category::hsl_uint16 > {
18582 	typedef ::color::category::hsi_uint16 akin_type;
18583 };
18584 template< >struct hsi< ::color::category::hsl_uint32 > {
18585 	typedef ::color::category::hsi_uint32 akin_type;
18586 };
18587 template< >struct hsi< ::color::category::hsl_uint64 > {
18588 	typedef ::color::category::hsi_uint64 akin_type;
18589 };
18590 template< >struct hsi< ::color::category::hsl_float > {
18591 	typedef ::color::category::hsi_float akin_type;
18592 };
18593 template< >struct hsi< ::color::category::hsl_double > {
18594 	typedef ::color::category::hsi_double akin_type;
18595 };
18596 template< >struct hsi< ::color::category::hsl_ldouble > {
18597 	typedef ::color::category::hsi_ldouble akin_type;
18598 };
18599 
18600 }
18601 }
18602 
18603 namespace color {
18604 namespace akin {
18605 
18606 template< >struct hsi< ::color::category::hsv_uint8 > {
18607 	typedef ::color::category::hsi_uint8 akin_type;
18608 };
18609 template< >struct hsi< ::color::category::hsv_uint16 > {
18610 	typedef ::color::category::hsi_uint16 akin_type;
18611 };
18612 template< >struct hsi< ::color::category::hsv_uint32 > {
18613 	typedef ::color::category::hsi_uint32 akin_type;
18614 };
18615 template< >struct hsi< ::color::category::hsv_uint64 > {
18616 	typedef ::color::category::hsi_uint64 akin_type;
18617 };
18618 template< >struct hsi< ::color::category::hsv_float > {
18619 	typedef ::color::category::hsi_float akin_type;
18620 };
18621 template< >struct hsi< ::color::category::hsv_double > {
18622 	typedef ::color::category::hsi_double akin_type;
18623 };
18624 template< >struct hsi< ::color::category::hsv_ldouble > {
18625 	typedef ::color::category::hsi_ldouble akin_type;
18626 };
18627 
18628 }
18629 }
18630 
18631 namespace color {
18632 namespace akin {
18633 
18634 template< typename tag_name >
18635 struct hsi< ::color::category::hsi< tag_name > > {
18636 public:
18637 	typedef ::color::category::hsi< tag_name > akin_type;
18638 };
18639 
18640 }
18641 }
18642 
18643 namespace color {
18644 namespace akin {
18645 
18646 template
18647 <
18648 	typename tag_name
18649 
18650 	>
18651 struct hsi< ::color::category::hwb< tag_name > > {
18652 public:
18653 	typedef ::color::category::hsi< tag_name > akin_type;
18654 };
18655 
18656 }
18657 }
18658 
18659 namespace color {
18660 namespace akin {
18661 
18662 template< >struct hsi< ::color::category::rgb_uint8 > {
18663 	typedef ::color::category::hsi_uint8 akin_type;
18664 };
18665 template< >struct hsi< ::color::category::rgb_uint16 > {
18666 	typedef ::color::category::hsi_uint16 akin_type;
18667 };
18668 template< >struct hsi< ::color::category::rgb_uint32 > {
18669 	typedef ::color::category::hsi_uint32 akin_type;
18670 };
18671 template< >struct hsi< ::color::category::rgb_uint64 > {
18672 	typedef ::color::category::hsi_uint64 akin_type;
18673 };
18674 template< >struct hsi< ::color::category::rgb_float > {
18675 	typedef ::color::category::hsi_float akin_type;
18676 };
18677 template< >struct hsi< ::color::category::rgb_double > {
18678 	typedef ::color::category::hsi_double akin_type;
18679 };
18680 template< >struct hsi< ::color::category::rgb_ldouble > {
18681 	typedef ::color::category::hsi_ldouble akin_type;
18682 };
18683 
18684 }
18685 }
18686 
18687 namespace color {
18688 namespace akin {
18689 
18690 template< >struct hsi< ::color::category::yiq_uint8 > {
18691 	typedef ::color::category::hsi_uint8 akin_type;
18692 };
18693 template< >struct hsi< ::color::category::yiq_uint16 > {
18694 	typedef ::color::category::hsi_uint16 akin_type;
18695 };
18696 template< >struct hsi< ::color::category::yiq_uint32 > {
18697 	typedef ::color::category::hsi_uint32 akin_type;
18698 };
18699 template< >struct hsi< ::color::category::yiq_uint64 > {
18700 	typedef ::color::category::hsi_uint64 akin_type;
18701 };
18702 template< >struct hsi< ::color::category::yiq_float > {
18703 	typedef ::color::category::hsi_float akin_type;
18704 };
18705 template< >struct hsi< ::color::category::yiq_double > {
18706 	typedef ::color::category::hsi_double akin_type;
18707 };
18708 template< >struct hsi< ::color::category::yiq_ldouble > {
18709 	typedef ::color::category::hsi_ldouble akin_type;
18710 };
18711 
18712 }
18713 }
18714 
18715 namespace color {
18716 namespace akin {
18717 
18718 template< ::color::constant::yuv::reference_enum reference_number >struct hsi< ::color::category::yuv_uint8 <reference_number> > {
18719 	typedef ::color::category::hsi_uint8 akin_type;
18720 };
18721 template< ::color::constant::yuv::reference_enum reference_number >struct hsi< ::color::category::yuv_uint16 <reference_number> > {
18722 	typedef ::color::category::hsi_uint16 akin_type;
18723 };
18724 template< ::color::constant::yuv::reference_enum reference_number >struct hsi< ::color::category::yuv_uint32 <reference_number> > {
18725 	typedef ::color::category::hsi_uint32 akin_type;
18726 };
18727 template< ::color::constant::yuv::reference_enum reference_number >struct hsi< ::color::category::yuv_uint64 <reference_number> > {
18728 	typedef ::color::category::hsi_uint64 akin_type;
18729 };
18730 template< ::color::constant::yuv::reference_enum reference_number >struct hsi< ::color::category::yuv_float <reference_number> > {
18731 	typedef ::color::category::hsi_float akin_type;
18732 };
18733 template< ::color::constant::yuv::reference_enum reference_number >struct hsi< ::color::category::yuv_double <reference_number> > {
18734 	typedef ::color::category::hsi_double akin_type;
18735 };
18736 template< ::color::constant::yuv::reference_enum reference_number >struct hsi< ::color::category::yuv_ldouble<reference_number> > {
18737 	typedef ::color::category::hsi_ldouble akin_type;
18738 };
18739 
18740 }
18741 }
18742 
18743 namespace color {
18744 namespace akin {
18745 
18746 template< >struct hsi< ::color::category::YCgCo_uint8 > {
18747 	typedef ::color::category::hsi_uint8 akin_type;
18748 };
18749 template< >struct hsi< ::color::category::YCgCo_uint16 > {
18750 	typedef ::color::category::hsi_uint16 akin_type;
18751 };
18752 template< >struct hsi< ::color::category::YCgCo_uint32 > {
18753 	typedef ::color::category::hsi_uint32 akin_type;
18754 };
18755 template< >struct hsi< ::color::category::YCgCo_uint64 > {
18756 	typedef ::color::category::hsi_uint64 akin_type;
18757 };
18758 template< >struct hsi< ::color::category::YCgCo_float > {
18759 	typedef ::color::category::hsi_float akin_type;
18760 };
18761 template< >struct hsi< ::color::category::YCgCo_double > {
18762 	typedef ::color::category::hsi_double akin_type;
18763 };
18764 template< >struct hsi< ::color::category::YCgCo_ldouble > {
18765 	typedef ::color::category::hsi_ldouble akin_type;
18766 };
18767 
18768 }
18769 }
18770 
18771 namespace color {
18772 namespace akin {
18773 
18774 template< >struct hsi< ::color::category::YDbDr_uint8 > {
18775 	typedef ::color::category::hsi_uint8 akin_type;
18776 };
18777 template< >struct hsi< ::color::category::YDbDr_uint16 > {
18778 	typedef ::color::category::hsi_uint16 akin_type;
18779 };
18780 template< >struct hsi< ::color::category::YDbDr_uint32 > {
18781 	typedef ::color::category::hsi_uint32 akin_type;
18782 };
18783 template< >struct hsi< ::color::category::YDbDr_uint64 > {
18784 	typedef ::color::category::hsi_uint64 akin_type;
18785 };
18786 template< >struct hsi< ::color::category::YDbDr_float > {
18787 	typedef ::color::category::hsi_float akin_type;
18788 };
18789 template< >struct hsi< ::color::category::YDbDr_double > {
18790 	typedef ::color::category::hsi_double akin_type;
18791 };
18792 template< >struct hsi< ::color::category::YDbDr_ldouble > {
18793 	typedef ::color::category::hsi_ldouble akin_type;
18794 };
18795 
18796 }
18797 }
18798 
18799 namespace color {
18800 namespace akin {
18801 
18802 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsi< ::color::category::YPbPr_uint8 <reference_number> > {
18803 	typedef ::color::category::hsi_uint8 akin_type;
18804 };
18805 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsi< ::color::category::YPbPr_uint16 <reference_number> > {
18806 	typedef ::color::category::hsi_uint16 akin_type;
18807 };
18808 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsi< ::color::category::YPbPr_uint32 <reference_number> > {
18809 	typedef ::color::category::hsi_uint32 akin_type;
18810 };
18811 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsi< ::color::category::YPbPr_uint64 <reference_number> > {
18812 	typedef ::color::category::hsi_uint64 akin_type;
18813 };
18814 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsi< ::color::category::YPbPr_float <reference_number> > {
18815 	typedef ::color::category::hsi_float akin_type;
18816 };
18817 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsi< ::color::category::YPbPr_double <reference_number> > {
18818 	typedef ::color::category::hsi_double akin_type;
18819 };
18820 template< ::color::constant::YPbPr::reference_enum reference_number >struct hsi< ::color::category::YPbPr_ldouble<reference_number> > {
18821 	typedef ::color::category::hsi_ldouble akin_type;
18822 };
18823 
18824 }
18825 }
18826 
18827 namespace color {
18828 namespace akin {
18829 
18830 template< >struct hsi< ::color::category::xyz_uint8 > {
18831 	typedef ::color::category::hsi_uint8 akin_type;
18832 };
18833 template< >struct hsi< ::color::category::xyz_uint16 > {
18834 	typedef ::color::category::hsi_uint16 akin_type;
18835 };
18836 template< >struct hsi< ::color::category::xyz_uint32 > {
18837 	typedef ::color::category::hsi_uint32 akin_type;
18838 };
18839 template< >struct hsi< ::color::category::xyz_uint64 > {
18840 	typedef ::color::category::hsi_uint64 akin_type;
18841 };
18842 template< >struct hsi< ::color::category::xyz_float > {
18843 	typedef ::color::category::hsi_float akin_type;
18844 };
18845 template< >struct hsi< ::color::category::xyz_double > {
18846 	typedef ::color::category::hsi_double akin_type;
18847 };
18848 template< >struct hsi< ::color::category::xyz_ldouble > {
18849 	typedef ::color::category::hsi_ldouble akin_type;
18850 };
18851 
18852 }
18853 }
18854 
18855 namespace color {
18856 namespace akin {
18857 
18858 template
18859 <
18860 	typename tag_name, ::color::constant::lab::reference_enum lab_reference_number
18861 	>
18862 struct hsi< ::color::category::lab< tag_name, lab_reference_number > > {
18863 public:
18864 	typedef ::color::category::hsi< tag_name > akin_type;
18865 };
18866 
18867 }
18868 }
18869 
18870 namespace color {
18871 namespace akin {
18872 
18873 template
18874 <
18875 	typename tag_name
18876 
18877 	>
18878 struct hsi< ::color::category::xyy< tag_name > > {
18879 public:
18880 	typedef ::color::category::hsi< tag_name > akin_type;
18881 };
18882 
18883 }
18884 }
18885 
18886 namespace color {
18887 namespace akin {
18888 
18889 template
18890 <
18891 	typename tag_name
18892 	,::color::constant::lms::reference_enum reference_number
18893 
18894 	>
18895 struct hsi< ::color::category::lms< tag_name, reference_number > > {
18896 public:
18897 	typedef ::color::category::hsi< tag_name > akin_type;
18898 };
18899 
18900 }
18901 }
18902 
18903 namespace color {
18904 namespace akin {
18905 
18906 template
18907 <
18908 	typename tag_name
18909 
18910 	>
18911 struct hsi< ::color::category::luv< tag_name > > {
18912 public:
18913 	typedef ::color::category::hsi< tag_name > akin_type;
18914 };
18915 
18916 }
18917 }
18918 
18919 namespace color {
18920 namespace akin {
18921 
18922 template
18923 <
18924 	typename tag_name
18925 	>
18926 struct hsi< ::color::category::LabCH< tag_name > > {
18927 public:
18928 	typedef ::color::category::hsi< tag_name > akin_type;
18929 };
18930 
18931 }
18932 }
18933 
18934 namespace color {
18935 namespace akin {
18936 
18937 template< >struct hsi< ::color::category::LuvCH_uint8 > {
18938 	typedef ::color::category::hsi_uint8 akin_type;
18939 };
18940 template< >struct hsi< ::color::category::LuvCH_uint16 > {
18941 	typedef ::color::category::hsi_uint16 akin_type;
18942 };
18943 template< >struct hsi< ::color::category::LuvCH_uint32 > {
18944 	typedef ::color::category::hsi_uint32 akin_type;
18945 };
18946 template< >struct hsi< ::color::category::LuvCH_uint64 > {
18947 	typedef ::color::category::hsi_uint64 akin_type;
18948 };
18949 template< >struct hsi< ::color::category::LuvCH_float > {
18950 	typedef ::color::category::hsi_float akin_type;
18951 };
18952 template< >struct hsi< ::color::category::LuvCH_double > {
18953 	typedef ::color::category::hsi_double akin_type;
18954 };
18955 template< >struct hsi< ::color::category::LuvCH_ldouble > {
18956 	typedef ::color::category::hsi_ldouble akin_type;
18957 };
18958 
18959 }
18960 }
18961 
18962 namespace color {
18963 namespace trait {
18964 
18965 template <> struct info< ::color::category::hsi_uint8 > {
18966 public:
18967 	enum { implemented_entity = true };
18968 	enum { meaningful_entity = true };
18969 };
18970 template <> struct info< ::color::category::hsi_uint16 > {
18971 public:
18972 	enum { implemented_entity = true };
18973 	enum { meaningful_entity = true };
18974 };
18975 template <> struct info< ::color::category::hsi_uint32 > {
18976 public:
18977 	enum { implemented_entity = true };
18978 	enum { meaningful_entity = true };
18979 };
18980 template <> struct info< ::color::category::hsi_uint64 > {
18981 public:
18982 	enum { implemented_entity = true };
18983 	enum { meaningful_entity = true };
18984 };
18985 template <> struct info< ::color::category::hsi_float > {
18986 public:
18987 	enum { implemented_entity = true };
18988 	enum { meaningful_entity = true };
18989 };
18990 template <> struct info< ::color::category::hsi_double > {
18991 public:
18992 	enum { implemented_entity = true };
18993 	enum { meaningful_entity = true };
18994 };
18995 template <> struct info< ::color::category::hsi_ldouble > {
18996 public:
18997 	enum { implemented_entity = true };
18998 	enum { meaningful_entity = true };
18999 };
19000 
19001 }
19002 }
19003 
19004 namespace color {
19005 namespace _internal {
19006 namespace hsi {
19007 namespace bound {
19008 
19009 template< typename index_name, typename scalar_name >
19010 struct scalar {
19011 public:
19012 	typedef scalar_name scalar_type;
19013 	typedef index_name index_type;
19014 
19015 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
19016 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
19017 
19018 	typedef typename trait_type::instance_type instance_type;
19019 	typedef typename trait_type::return_image_type return_image_type;
19020 
19021 	typedef typename index_trait_type::instance_type index_instance_type;
19022 	typedef typename index_trait_type::model_type index_input_const_type;
19023 
19024 	template< index_instance_type index >
maximumcolor::_internal::hsi::bound::scalar19025 	static return_image_type maximum() {
19026 		static instance_type max_list[] = { 360, 100, 100 };
19027 		return max_list[index];
19028 	}
19029 
maximumcolor::_internal::hsi::bound::scalar19030 	static return_image_type maximum(index_input_const_type index) {
19031 		static instance_type max_list[] = { 360, 100, 100 };
19032 		return max_list[index];
19033 	}
19034 
19035 	template< index_instance_type index >
minimumcolor::_internal::hsi::bound::scalar19036 	static return_image_type minimum() {
19037 		static instance_type min_list[] = { 0, 0, 0 };
19038 		return min_list[index];
19039 	}
19040 
minimumcolor::_internal::hsi::bound::scalar19041 	static return_image_type minimum(index_input_const_type index) {
19042 		static instance_type min_list[] = { 0, 0, 0 };
19043 		return min_list[index];
19044 	}
19045 
19046 	template< index_instance_type index >
rangecolor::_internal::hsi::bound::scalar19047 	static return_image_type range() {
19048 		static instance_type range_list[] = { 360, 100, 100 };
19049 		return range_list[index];
19050 	}
19051 
rangecolor::_internal::hsi::bound::scalar19052 	static return_image_type range(index_input_const_type index) {
19053 		static instance_type range_list[] = { 360, 100, 100 };
19054 		return range_list[index];
19055 	}
19056 };
19057 
19058 }
19059 }
19060 }
19061 }
19062 
19063 namespace color {
19064 namespace trait {
19065 
19066 template< >
19067 struct bound< ::color::category::hsi_float >
19068 	: public ::color::_internal::hsi::bound::scalar< typename ::color::trait::index< ::color::category::hsi_float >::instance_type, float > {
19069 };
19070 
19071 template< >
19072 struct bound< ::color::category::hsi_double >
19073 	: public ::color::_internal::hsi::bound::scalar< typename ::color::trait::index< ::color::category::hsi_double >::instance_type, double > {
19074 };
19075 
19076 template< >
19077 struct bound< ::color::category::hsi_ldouble >
19078 	: public ::color::_internal::hsi::bound::scalar< typename ::color::trait::index< ::color::category::hsi_ldouble >::instance_type, long double > {
19079 };
19080 
19081 }
19082 }
19083 
19084 namespace color {
19085 namespace trait {
19086 
19087 template< >
19088 struct bound< ::color::category::hsi_uint8 >
19089 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::hsi_uint8 >::instance_type > {
19090 };
19091 
19092 template< >
19093 struct bound< ::color::category::hsi_uint16 >
19094 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::hsi_uint16 >::instance_type > {
19095 };
19096 
19097 template< >
19098 struct bound< ::color::category::hsi_uint32 >
19099 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::hsi_uint32 >::instance_type > {
19100 };
19101 
19102 template< >
19103 struct bound< ::color::category::hsi_uint64 >
19104 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::hsi_uint64 >::instance_type > {
19105 };
19106 
19107 }
19108 }
19109 
19110 namespace color {
19111 namespace trait {
19112 
19113 template< >
19114 struct component< ::color::category::hsi_float >
19115 	: public ::color::_internal::utility::component::array< float > {
19116 };
19117 
19118 template< >
19119 struct component< ::color::category::hsi_double >
19120 	: public ::color::_internal::utility::component::array< double > {
19121 };
19122 
19123 template< >
19124 struct component< ::color::category::hsi_ldouble >
19125 	: public ::color::_internal::utility::component::array< long double > {
19126 };
19127 
19128 }
19129 }
19130 
19131 namespace color {
19132 namespace trait {
19133 
19134 template< >
19135 struct component< ::color::category::hsi_uint8 >
19136 	: public ::color::_internal::utility::component::array< std::uint8_t > {
19137 };
19138 
19139 template< >
19140 struct component< ::color::category::hsi_uint16 >
19141 	: public ::color::_internal::utility::component::array< std::uint16_t > {
19142 };
19143 
19144 template< >
19145 struct component< ::color::category::hsi_uint32 >
19146 	: public ::color::_internal::utility::component::array< std::uint32_t > {
19147 };
19148 
19149 template< >
19150 struct component< ::color::category::hsi_uint64 >
19151 	: public ::color::_internal::utility::component::array< std::uint64_t > {
19152 };
19153 
19154 }
19155 }
19156 
19157 namespace color {
19158 namespace trait {
19159 
19160 template< >
19161 struct container< ::color::category::hsi_float >
19162 	: public ::color::_internal::utility::container::array< float, 3 > {
19163 };
19164 
19165 template< >
19166 struct container< ::color::category::hsi_double >
19167 	: public ::color::_internal::utility::container::array< double, 3 > {
19168 };
19169 
19170 template< >
19171 struct container< ::color::category::hsi_ldouble >
19172 	: public ::color::_internal::utility::container::array< long double, 3 > {
19173 };
19174 
19175 }
19176 }
19177 
19178 namespace color {
19179 namespace trait {
19180 
19181 template< >
19182 struct container< ::color::category::hsi_uint16 >
19183 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
19184 };
19185 
19186 template< >
19187 struct container< ::color::category::hsi_uint32 >
19188 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
19189 };
19190 
19191 template< >
19192 struct container< ::color::category::hsi_uint64 >
19193 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
19194 };
19195 
19196 template< >
19197 struct container< ::color::category::hsi_uint8 >
19198 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
19199 };
19200 
19201 }
19202 }
19203 
19204 namespace color {
19205 
19206 template< typename type_name >
19207 using hsi = ::color::model< ::color::category::hsi< type_name > >;
19208 
19209 }
19210 
19211 namespace color {
19212 namespace place {
19213 namespace _internal {
19214 
19215 template< typename tag_name >
19216 struct hue< ::color::category::hsi< tag_name > > {
19217 public:
19218 	typedef ::color::category::hsi< tag_name > category_type;
19219 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
19220 
19221 	enum { position_enum = 0 };
19222 	enum { has_enum = true };
19223 
positioncolor::place::_internal::hue19224 	static index_instance_type position() {
19225 		return position_enum;
19226 	}
19227 };
19228 
19229 }
19230 }
19231 }
19232 
19233 namespace color {
19234 namespace check {
19235 namespace _internal {
19236 
19237 template<>
19238 struct integrity< ::color::category::hsi_float > {
19239 public:
19240 	typedef ::color::category::hsi_float category_type;
19241 
19242 	typedef ::color::model<category_type> model_type;
19243 	typedef ::color::trait::bound< category_type > bound_type;
19244 
19245 	enum {
19246 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
19247 	};
19248 
processcolor::check::_internal::integrity19249 	static bool process(model_type const& m) {
19250 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
19251 			return false;
19252 		}
19253 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
19254 			return false;
19255 		}
19256 		return true;
19257 	}
19258 };
19259 
19260 template<>
19261 struct integrity< ::color::category::hsi_double > {
19262 public:
19263 	typedef ::color::category::hsi_double category_type;
19264 
19265 	typedef ::color::model<category_type> model_type;
19266 	typedef ::color::trait::bound< category_type > bound_type;
19267 
19268 	enum {
19269 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
19270 	};
19271 
processcolor::check::_internal::integrity19272 	static bool process(model_type const& m) {
19273 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
19274 			return false;
19275 		}
19276 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
19277 			return false;
19278 		}
19279 		return true;
19280 	}
19281 };
19282 
19283 template<>
19284 struct integrity< ::color::category::hsi_ldouble > {
19285 public:
19286 	typedef ::color::category::hsi_ldouble category_type;
19287 
19288 	typedef ::color::model<category_type> model_type;
19289 	typedef ::color::trait::bound< category_type > bound_type;
19290 
19291 	enum {
19292 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
19293 	};
19294 
processcolor::check::_internal::integrity19295 	static bool process(model_type const& m) {
19296 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
19297 			return false;
19298 		}
19299 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
19300 			return false;
19301 		}
19302 		return true;
19303 	}
19304 };
19305 
19306 }
19307 }
19308 }
19309 
19310 namespace color {
19311 namespace place {
19312 namespace _internal {
19313 
19314 template< typename tag_name >
19315 struct saturation< ::color::category::hsi< tag_name > > {
19316 public:
19317 	typedef ::color::category::hsi< tag_name > category_type;
19318 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
19319 
19320 	enum { position_enum = 1 };
19321 	enum { has_enum = true };
19322 
positioncolor::place::_internal::saturation19323 	static index_instance_type position() {
19324 		return position_enum;
19325 	}
19326 };
19327 
19328 }
19329 }
19330 }
19331 
19332 namespace color {
19333 namespace place {
19334 namespace _internal {
19335 
19336 template< typename tag_name >
19337 struct intensity< ::color::category::hsi< tag_name > > {
19338 public:
19339 	typedef ::color::category::hsi< tag_name > category_type;
19340 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
19341 
19342 	enum { position_enum = 2 };
19343 	enum { has_enum = true };
19344 
positioncolor::place::_internal::intensity19345 	static index_instance_type position() {
19346 		return position_enum;
19347 	}
19348 };
19349 
19350 }
19351 }
19352 }
19353 
19354 namespace color {
19355 namespace check {
19356 namespace _internal {
19357 
19358 template< typename tag_name >
19359 struct unique< ::color::category::hsi< tag_name > > {
19360 public:
19361 	typedef ::color::category::hsi< tag_name > category_type;
19362 
19363 	typedef ::color::model<category_type> model_type;
19364 	typedef ::color::trait::bound< category_type > bound_type;
19365 
19366 	enum {
19367 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
19368 		,saturation_p = ::color::place::_internal::saturation<category_type>::position_enum
19369 		,intensity_p = ::color::place::_internal::intensity<category_type>::position_enum
19370 	};
19371 
processcolor::check::_internal::unique19372 	static bool process(model_type const& m) {
19373 		if(m.template get<saturation_p>() == bound_type::template minimum<saturation_p>()) {
19374 			return false;
19375 		}
19376 		if(m.template get<intensity_p>() == bound_type::template minimum<intensity_p>()) {
19377 			return false;
19378 		}
19379 		if(m.template get<intensity_p>() == bound_type::template maximum<intensity_p>()) {
19380 			if(m.template get<saturation_p>() == bound_type::template minimum<saturation_p>()) {
19381 				return false;
19382 			}
19383 		}
19384 		return true;
19385 	}
19386 };
19387 
19388 }
19389 }
19390 }
19391 
19392 namespace color {
19393 namespace fix {
19394 namespace _internal {
19395 namespace _privateHSI {
19396 
19397 template< typename category_name >
19398 struct integrity {
19399 public:
19400 	typedef category_name category_type;
19401 
19402 	typedef typename ::color::model<category_type> model_type;
19403 	typedef typename ::color::trait::bound<category_type> bound_type;
19404 
19405 	enum {
19406 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
19407 	};
19408 
processcolor::fix::_internal::_privateHSI::integrity19409 	static void process(model_type &result) {
19410 		if(result.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
19411 			result.template set<hue_p>(bound_type::template minimum<hue_p>());
19412 			return;
19413 		}
19414 		if(bound_type::template maximum<hue_p>() < result.template get<hue_p>()) {
19415 			result.template set<hue_p>(bound_type::template maximum<hue_p>());
19416 			return;
19417 		}
19418 	}
19419 
processcolor::fix::_internal::_privateHSI::integrity19420 	static void process(model_type &result, model_type const& right) {
19421 		result = right;
19422 		if(result.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
19423 			result.template set<hue_p>(bound_type::template minimum<hue_p>());
19424 			return;
19425 		}
19426 		if(bound_type::template maximum<hue_p>() < result.template get<hue_p>()) {
19427 			result.template set<hue_p>(bound_type::template maximum<hue_p>());
19428 			return;
19429 		}
19430 	}
19431 
19432 };
19433 
19434 }
19435 
19436 template<> struct integrity< ::color::category::hsi_float > : public ::color::fix::_internal::_privateHSI::integrity< ::color::category::hsi_float > { };
19437 template<> struct integrity< ::color::category::hsi_double > : public ::color::fix::_internal::_privateHSI::integrity< ::color::category::hsi_double > { };
19438 template<> struct integrity< ::color::category::hsi_ldouble > : public ::color::fix::_internal::_privateHSI::integrity< ::color::category::hsi_ldouble> { };
19439 
19440 }
19441 }
19442 }
19443 
19444 namespace color {
19445 namespace get {
19446 
19447 template< typename tag_name >
19448 inline
19449 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsi<tag_name> >::akin_type >::return_type
red(::color::model<::color::category::hsi<tag_name>> const & color_parameter)19450 red(::color::model< ::color::category::hsi<tag_name> > const& color_parameter) {
19451 	typedef ::color::category::hsi<tag_name> category_type;
19452 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
19453 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
19454 	typedef ::color::_internal::diverse< akin_type > diverse_type;
19455 	typedef ::color::_internal::normalize<category_type> normalize_type;
19456 	typedef ::color::constant::generic< category_type > constant_type;
19457 	enum {
19458 		red_p = ::color::place::_internal::red<akin_type>::position_enum
19459 		,green_p = ::color::place::_internal::green<akin_type>::position_enum
19460 		,blue_p = ::color::place::_internal::blue<akin_type>::position_enum
19461 	};
19462 	enum {
19463 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
19464 		,saturation_p = ::color::place::_internal::saturation<category_type>::position_enum
19465 		,intensity_p = ::color::place::_internal::intensity<category_type>::position_enum
19466 	};
19467 	scalar_type h = normalize_type::template process<hue_p >(color_parameter.template get<hue_p >());
19468 	scalar_type s = normalize_type::template process<saturation_p>(color_parameter.template get<saturation_p>());
19469 	scalar_type i = normalize_type::template process<intensity_p >(color_parameter.template get<intensity_p >());
19470 	scalar_type min = i * (1 - s);
19471 	int region = int(3 * h);
19472 	h -= region * constant_type::third();
19473 	h *= constant_type::two_pi();
19474 	scalar_type n = i*(1+ s*cos(h) / cos(constant_type::deg60() - h));
19475 	scalar_type r;
19476 	scalar_type g;
19477 	scalar_type b;
19478 	switch(region % 3) {
19479 	case 0:
19480 		r = n;
19481 		break;
19482 	case 1:
19483 		r = min;
19484 		break;
19485 	case 2:
19486 		b = n;
19487 		g = min;
19488 		r = 3*i-(g+b);
19489 		break;
19490 	}
19491 	return diverse_type::template process<red_p>(r);
19492 }
19493 
19494 }
19495 }
19496 
19497 namespace color {
19498 namespace get {
19499 
19500 template< typename tag_name >
19501 inline
19502 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsi<tag_name> >::akin_type >::return_type
green(::color::model<::color::category::hsi<tag_name>> const & color_parameter)19503 green(::color::model< ::color::category::hsi<tag_name> > const& color_parameter) {
19504 	typedef ::color::category::hsi<tag_name> category_type;
19505 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
19506 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
19507 	typedef ::color::_internal::diverse< akin_type > diverse_type;
19508 	typedef ::color::_internal::normalize<category_type> normalize_type;
19509 	typedef ::color::constant::generic< category_type > constant_type;
19510 	enum {
19511 		red_p = ::color::place::_internal::red<akin_type>::position_enum
19512 		,green_p = ::color::place::_internal::green<akin_type>::position_enum
19513 		,blue_p = ::color::place::_internal::blue<akin_type>::position_enum
19514 	};
19515 	enum {
19516 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
19517 		,saturation_p = ::color::place::_internal::saturation<category_type>::position_enum
19518 		,intensity_p = ::color::place::_internal::intensity<category_type>::position_enum
19519 	};
19520 	scalar_type h = normalize_type::template process<hue_p >(color_parameter.template get<hue_p >());
19521 	scalar_type s = normalize_type::template process<saturation_p>(color_parameter.template get<saturation_p>());
19522 	scalar_type i = normalize_type::template process<intensity_p >(color_parameter.template get<intensity_p >());
19523 	scalar_type min = i * (1 - s);
19524 	int region = int(3 * h);
19525 	h -= region * constant_type::third();
19526 	h *= constant_type::two_pi();
19527 	scalar_type n = i*(1+ s*cos(h) / cos(constant_type::deg60() - h));
19528 	scalar_type r;
19529 	scalar_type g;
19530 	scalar_type b;
19531 	switch(region % 3) {
19532 	case 0:
19533 		r = n;
19534 		b = min;
19535 		g = 3*i-(r+b);
19536 		break;
19537 	case 1:
19538 		g = n;
19539 		break;
19540 	case 2:
19541 		g = min;
19542 		break;
19543 	}
19544 	return diverse_type::template process<green_p>(g);
19545 }
19546 
19547 }
19548 }
19549 
19550 namespace color {
19551 namespace get {
19552 
19553 template< typename tag_name >
19554 inline
19555 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsi<tag_name> >::akin_type >::return_type
blue(::color::model<::color::category::hsi<tag_name>> const & color_parameter)19556 blue(::color::model< ::color::category::hsi<tag_name> > const& color_parameter) {
19557 	typedef ::color::category::hsi<tag_name> category_type;
19558 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
19559 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
19560 	typedef ::color::_internal::diverse< akin_type > diverse_type;
19561 	typedef ::color::_internal::normalize<category_type> normalize_type;
19562 	typedef ::color::constant::generic< category_type > constant_type;
19563 	enum {
19564 		red_p = ::color::place::_internal::red<akin_type>::position_enum
19565 		,green_p = ::color::place::_internal::green<akin_type>::position_enum
19566 		,blue_p = ::color::place::_internal::blue<akin_type>::position_enum
19567 	};
19568 	enum {
19569 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
19570 		,saturation_p = ::color::place::_internal::saturation<category_type>::position_enum
19571 		,intensity_p = ::color::place::_internal::intensity<category_type>::position_enum
19572 	};
19573 	scalar_type h = normalize_type::template process<hue_p >(color_parameter.template get<hue_p >());
19574 	scalar_type s = normalize_type::template process<saturation_p>(color_parameter.template get<saturation_p>());
19575 	scalar_type i = normalize_type::template process<intensity_p >(color_parameter.template get<intensity_p >());
19576 	scalar_type min = i * (1 - s);
19577 	int region = int(3 * h);
19578 	h -= region * constant_type::third();
19579 	h *= constant_type::two_pi();
19580 	scalar_type n = i*(1+ s*cos(h) / cos(constant_type::deg60() - h));
19581 	scalar_type r;
19582 	scalar_type g;
19583 	scalar_type b;
19584 	switch(region % 3) {
19585 	case 0:
19586 		b = min;
19587 		break;
19588 	case 1:
19589 		g = n;
19590 		r = min;
19591 		b = 3*i-(r+g);
19592 		break;
19593 	case 2:
19594 		b = n; ;
19595 		break;
19596 	}
19597 	return diverse_type::template process<blue_p>(b);
19598 }
19599 
19600 }
19601 }
19602 
19603 namespace color {
19604 namespace get {
19605 
19606 template< typename tag_name >
19607 inline
19608 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::hsi<tag_name> >::akin_type >::return_type
gray(::color::model<::color::category::hsi<tag_name>> const & color_parameter)19609 gray(::color::model< ::color::category::hsi<tag_name> > const& color_parameter) {
19610 	typedef ::color::category::hsi<tag_name> category_type;
19611 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
19612 	typedef typename ::color::akin::gray<category_type>::akin_type akin_type;
19613 	typedef ::color::_internal::diverse< akin_type > diverse_type;
19614 	typedef ::color::_internal::normalize<category_type> normalize_type;
19615 	enum { intensity_p = ::color::place::_internal::intensity<category_type>::position_enum };
19616 	scalar_type g = normalize_type::template process<intensity_p >(color_parameter.template get<intensity_p >());
19617 	return diverse_type::template process<0>(g);
19618 }
19619 
19620 }
19621 }
19622 
19623 namespace color {
19624 namespace get {
19625 
19626 template< typename tag_name >
19627 inline
19628 typename ::color::model< ::color::category::hsi< tag_name> >::component_const_type
hue(::color::model<::color::category::hsi<tag_name>> const & color_parameter)19629 hue(::color::model< ::color::category::hsi< tag_name> > const& color_parameter) {
19630 	typedef ::color::category::hsi< tag_name> category_type;
19631 	enum { hue_p = ::color::place::_internal::hue<category_type>::position_enum };
19632 	return color_parameter.template get<hue_p>();
19633 }
19634 
19635 }
19636 }
19637 
19638 namespace color {
19639 namespace get {
19640 
19641 template< typename tag_name >
19642 inline
19643 typename ::color::model< ::color::category::hsi< tag_name> >::component_const_type
saturation(::color::model<::color::category::hsi<tag_name>> const & color_parameter)19644 saturation(::color::model< ::color::category::hsi< tag_name> > const& color_parameter) {
19645 	typedef ::color::category::hsi< tag_name> category_type;
19646 	enum { saturation_p = ::color::place::_internal::saturation<category_type>::position_enum };
19647 	return color_parameter.template get<saturation_p>();
19648 }
19649 
19650 }
19651 }
19652 
19653 namespace color {
19654 namespace get {
19655 
19656 template< typename tag_name >
19657 inline
19658 typename ::color::model< ::color::category::hsi< tag_name> >::component_const_type
chroma(::color::model<::color::category::hsi<tag_name>> const & color_parameter)19659 chroma(::color::model< ::color::category::hsi< tag_name> > const& color_parameter) {
19660 	typedef ::color::category::hsi< tag_name > category_type;
19661 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
19662 	typedef ::color::_internal::diverse< category_type > diverse_type;
19663 	typedef ::color::_internal::normalize<category_type> normalize_type;
19664 	enum {
19665 		saturation_p = ::color::place::_internal::saturation<category_type>::position_enum
19666 		,intensity_p = ::color::place::_internal::intensity<category_type>::position_enum
19667 	};
19668 	scalar_type s = normalize_type::template process<saturation_p>(color_parameter.template get<saturation_p>());
19669 	scalar_type i = normalize_type::template process<intensity_p >(color_parameter.template get<intensity_p >());
19670 	return diverse_type::template process<intensity_p>(s * i);
19671 }
19672 
19673 }
19674 }
19675 
19676 namespace color {
19677 namespace set {
19678 
19679 template< typename tag_name >
19680 inline
19681 void
hue(::color::model<::color::category::hsi<tag_name>> & color_parameter,typename::color::model<::color::category::hsi<tag_name>>::component_input_const_type component_parameter)19682 hue
19683 (
19684 	::color::model< ::color::category::hsi< tag_name > > & color_parameter
19685 	,typename ::color::model< ::color::category::hsi< tag_name > >::component_input_const_type component_parameter
19686 ) {
19687 	typedef ::color::category::hsi< tag_name > category_type;
19688 	enum { hue_p = ::color::place::_internal::hue< category_type >::position_enum };
19689 	color_parameter.template set<hue_p>(component_parameter);
19690 }
19691 
19692 }
19693 }
19694 
19695 namespace color {
19696 namespace set {
19697 
19698 template< typename tag_name >
19699 inline
19700 void
saturation(::color::model<::color::category::hsi<tag_name>> & color_parameter,typename::color::model<::color::category::hsi<tag_name>>::component_input_const_type component_parameter)19701 saturation
19702 (
19703 	::color::model< ::color::category::hsi< tag_name > > & color_parameter
19704 	,typename ::color::model< ::color::category::hsi< tag_name > >::component_input_const_type component_parameter
19705 ) {
19706 	typedef ::color::category::hsi< tag_name > category_type;
19707 	enum { saturation_p = ::color::place::_internal::saturation< category_type >::position_enum };
19708 	color_parameter.template set<saturation_p>(component_parameter);
19709 }
19710 
19711 }
19712 }
19713 
19714 namespace color {
19715 namespace set {
19716 
19717 template< typename tag_name >
19718 inline
19719 void
blue(::color::model<::color::category::hsi<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::hsi<tag_name>>::akin_type>::model_type component_parameter)19720 blue
19721 (
19722 	::color::model< ::color::category::hsi< tag_name > > & color_parameter
19723 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsi< tag_name > >::akin_type >::model_type component_parameter
19724 ) {
19725 	typedef ::color::category::hsi< tag_name > category_type;
19726 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
19727 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
19728 	::color::model< akin_type > rgb(color_parameter);
19729 	rgb.template set<blue_p > (component_parameter);
19730 	color_parameter = rgb;
19731 }
19732 
19733 }
19734 }
19735 
19736 namespace color {
19737 namespace set {
19738 
19739 template< typename tag_name >
19740 inline
19741 void
green(::color::model<::color::category::hsi<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::hsi<tag_name>>::akin_type>::model_type component_parameter)19742 green
19743 (
19744 	::color::model< ::color::category::hsi< tag_name > > & color_parameter
19745 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsi< tag_name > >::akin_type >::model_type component_parameter
19746 ) {
19747 	typedef ::color::category::hsi< tag_name > category_type;
19748 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
19749 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
19750 	::color::model< akin_type > rgb(color_parameter);
19751 	rgb.template set< green_p > (component_parameter);
19752 	color_parameter = rgb;
19753 }
19754 
19755 }
19756 }
19757 
19758 namespace color {
19759 namespace set {
19760 
19761 template< typename tag_name >
19762 inline
19763 void
red(::color::model<::color::category::hsi<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::hsi<tag_name>>::akin_type>::model_type component_parameter)19764 red
19765 (
19766 	::color::model< ::color::category::hsi< tag_name > > & color_parameter
19767 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hsi< tag_name > >::akin_type >::model_type component_parameter
19768 ) {
19769 	typedef ::color::category::hsi< tag_name > category_type;
19770 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
19771 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
19772 	::color::model< akin_type > rgb(color_parameter);
19773 	rgb.template set<red_p> (component_parameter);
19774 	color_parameter = rgb;
19775 }
19776 
19777 }
19778 }
19779 
19780 namespace color {
19781 namespace set {
19782 
19783 template< typename tag_name >
19784 inline
19785 void
gray(::color::model<::color::category::hsi<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::hsi<tag_name>>::akin_type>::model_type component_parameter)19786 gray
19787 (
19788 	::color::model< ::color::category::hsi< tag_name > > & color_parameter
19789 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::hsi< tag_name > >::akin_type >::model_type component_parameter
19790 ) {
19791 	typedef ::color::category::hsi< tag_name > category_type;
19792 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
19793 	typedef ::color::_internal::reformat< category_type, akin_type > reformat_type;
19794 	enum {
19795 		intensity_p = ::color::place::_internal::intensity<category_type>::position_enum
19796 	};
19797 	color_parameter.template set<intensity_p>(reformat_type::template process<intensity_p,0>(component_parameter));
19798 }
19799 
19800 }
19801 }
19802 
19803 namespace color {
19804 namespace _internal {
19805 
19806 template< typename hsi_tag_name, typename gray_tag_name >
19807 struct convert
19808 	<
19809 	::color::category::hsi< hsi_tag_name >
19810 	,::color::category::gray< gray_tag_name >
19811 	> {
19812 public:
19813 	typedef ::color::category::hsi< hsi_tag_name > category_left_type;
19814 	typedef ::color::category::gray< gray_tag_name > category_right_type;
19815 
19816 	typedef ::color::trait::bound<category_left_type> bound_left_trait_type;
19817 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
19818 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
19819 
19820 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
19821 
19822 	typedef typename container_left_trait_type::input_type container_left_input_type;
19823 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
19824 
19825 	enum {
19826 		gray_p = ::color::place::_internal::gray<category_right_type>::position_enum
19827 	};
19828 
19829 	enum {
19830 		hue_p = ::color::place::_internal::hue<category_left_type>::position_enum
19831 		,saturation_p = ::color::place::_internal::saturation<category_left_type>::position_enum
19832 		,intensity_p = ::color::place::_internal::intensity<category_left_type>::position_enum
19833 	};
19834 
processcolor::_internal::convert19835 	static void process
19836 	(
19837 		container_left_input_type left
19838 		,container_right_const_input_type right
19839 	) {
19840 		container_left_trait_type::template set<hue_p>(left, bound_left_trait_type::template minimum<hue_p>());
19841 		container_left_trait_type::template set<saturation_p>(left, bound_left_trait_type::template minimum<saturation_p>());
19842 		container_left_trait_type::template set<intensity_p>(left, reformat_type::template process<intensity_p,0>(container_right_trait_type::template get<0>(right)));
19843 	}
19844 };
19845 
19846 }
19847 }
19848 
19849 namespace color {
19850 namespace _internal {
19851 
19852 template< typename hsi_tag_name, typename cmy_tag_name >
19853 struct convert
19854 	<
19855 	::color::category::hsi< hsi_tag_name >
19856 	,::color::category::cmy< cmy_tag_name >
19857 	> {
19858 public:
19859 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
19860 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_right_type;
19861 
19862 	typedef typename ::color::akin::rgb< cmy_category_type >::akin_type rgb_category_type;
19863 
19864 	typedef ::color::model< hsi_category_type > hsi_model_type;
19865 	typedef ::color::model< cmy_category_type > cmy_model_type;
19866 
19867 	typedef ::color::model< rgb_category_type > rgb_model_type;
19868 
19869 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
19870 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
19871 
19872 	typedef typename container_left_trait_type::input_type container_left_input_type;
19873 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
19874 
processcolor::_internal::convert19875 	static void process
19876 	(
19877 		container_left_input_type left
19878 		,container_right_const_input_type right
19879 	) {
19880 		left = hsi_model_type(rgb_model_type(cmy_model_type(right))).container();
19881 	}
19882 };
19883 
19884 }
19885 }
19886 
19887 namespace color {
19888 namespace _internal {
19889 
19890 template< typename hsi_tag_name, typename cmyk_tag_name >
19891 struct convert
19892 	<
19893 	::color::category::hsi< hsi_tag_name >
19894 	,::color::category::cmyk< cmyk_tag_name >
19895 	> {
19896 public:
19897 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
19898 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
19899 
19900 	typedef typename ::color::akin::rgb< cmyk_category_type >::akin_type rgb_category_type;
19901 
19902 	typedef ::color::model< hsi_category_type > hsi_model_type;
19903 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
19904 
19905 	typedef ::color::model< rgb_category_type > rgb_model_type;
19906 
19907 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
19908 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
19909 
19910 	typedef typename container_left_trait_type::input_type container_left_input_type;
19911 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
19912 
processcolor::_internal::convert19913 	static void process
19914 	(
19915 		container_left_input_type left
19916 		,container_right_const_input_type right
19917 	) {
19918 		left = hsi_model_type(rgb_model_type(cmyk_model_type(right))).container();
19919 	}
19920 };
19921 
19922 }
19923 }
19924 
19925 namespace color {
19926 namespace _internal {
19927 
19928 template< typename hsi_tag_name, typename hsl_tag_name >
19929 struct convert
19930 	<
19931 	::color::category::hsi< hsi_tag_name >
19932 	,::color::category::hsl< hsl_tag_name >
19933 	> {
19934 public:
19935 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
19936 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
19937 
19938 	typedef typename ::color::akin::rgb< hsl_category_type >::akin_type rgb_category_type;
19939 
19940 	typedef ::color::model< hsi_category_type > hsi_model_type;
19941 	typedef ::color::model< hsl_category_type > hsl_model_type;
19942 
19943 	typedef ::color::model< rgb_category_type > rgb_model_type;
19944 
19945 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
19946 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
19947 
19948 	typedef typename container_left_trait_type::input_type container_left_input_type;
19949 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
19950 
processcolor::_internal::convert19951 	static void process
19952 	(
19953 		container_left_input_type left
19954 		,container_right_const_input_type right
19955 	) {
19956 		left = hsi_model_type(rgb_model_type(hsl_model_type(right))).container();
19957 	}
19958 };
19959 
19960 }
19961 }
19962 
19963 namespace color {
19964 namespace _internal {
19965 
19966 template< typename hsi_tag_name, typename hsv_tag_name >
19967 struct convert
19968 	<
19969 	::color::category::hsi< hsi_tag_name >
19970 	,::color::category::hsv< hsv_tag_name >
19971 	> {
19972 public:
19973 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
19974 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
19975 
19976 	typedef typename ::color::akin::rgb< hsv_category_type >::akin_type rgb_category_type;
19977 
19978 	typedef ::color::model< hsi_category_type > hsi_model_type;
19979 	typedef ::color::model< hsv_category_type > hsv_model_type;
19980 
19981 	typedef ::color::model< rgb_category_type > rgb_model_type;
19982 
19983 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
19984 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
19985 
19986 	typedef typename container_left_trait_type::input_type container_left_input_type;
19987 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
19988 
processcolor::_internal::convert19989 	static void process
19990 	(
19991 		container_left_input_type left
19992 		,container_right_const_input_type right
19993 	) {
19994 		left = hsi_model_type(rgb_model_type(hsv_model_type(right))).container();
19995 	}
19996 };
19997 
19998 }
19999 }
20000 namespace color {
20001 namespace _internal {
20002 
20003 template< typename tag_left_name, typename tag_right_name >
20004 struct convert
20005 	<
20006 	::color::category::hsi< tag_left_name >
20007 	,::color::category::hsi< tag_right_name>
20008 	> {
20009 public:
20010 	typedef ::color::category::hsi< tag_left_name > category_left_type;
20011 	typedef ::color::category::hsi< tag_right_name> category_right_type;
20012 
20013 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
20014 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
20015 
20016 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
20017 
20018 	typedef typename container_left_trait_type::input_type container_left_input_type;
20019 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
20020 
20021 	enum {
20022 		hr_p = ::color::place::_internal::hue<category_left_type>::position_enum
20023 		,sr_p = ::color::place::_internal::saturation<category_left_type>::position_enum
20024 		,ir_p = ::color::place::_internal::intensity<category_left_type>::position_enum
20025 	};
20026 
20027 	enum {
20028 		hl_p = ::color::place::_internal::hue<category_right_type>::position_enum
20029 		,sl_p = ::color::place::_internal::saturation<category_right_type>::position_enum
20030 		,il_p = ::color::place::_internal::intensity<category_right_type>::position_enum
20031 	};
20032 
processcolor::_internal::convert20033 	static void process
20034 	(
20035 		container_left_input_type left
20036 		,container_right_const_input_type right
20037 	) {
20038 		container_left_trait_type::template set<hl_p>(left, reformat_type::template process<hl_p,hr_p>(container_right_trait_type::template get<hr_p>(right)));
20039 		container_left_trait_type::template set<sl_p>(left, reformat_type::template process<sl_p,sr_p>(container_right_trait_type::template get<sr_p>(right)));
20040 		container_left_trait_type::template set<il_p>(left, reformat_type::template process<il_p,ir_p>(container_right_trait_type::template get<ir_p>(right)));
20041 	}
20042 };
20043 }
20044 }
20045 
20046 namespace color {
20047 namespace akin {
20048 
20049 template< >struct hwb< ::color::category::gray_uint8 > {
20050 	typedef ::color::category::hwb_uint8 akin_type;
20051 };
20052 template< >struct hwb< ::color::category::gray_uint16 > {
20053 	typedef ::color::category::hwb_uint16 akin_type;
20054 };
20055 template< >struct hwb< ::color::category::gray_uint32 > {
20056 	typedef ::color::category::hwb_uint32 akin_type;
20057 };
20058 template< >struct hwb< ::color::category::gray_uint64 > {
20059 	typedef ::color::category::hwb_uint64 akin_type;
20060 };
20061 template< >struct hwb< ::color::category::gray_float > {
20062 	typedef ::color::category::hwb_float akin_type;
20063 };
20064 template< >struct hwb< ::color::category::gray_double > {
20065 	typedef ::color::category::hwb_double akin_type;
20066 };
20067 template< >struct hwb< ::color::category::gray_ldouble > {
20068 	typedef ::color::category::hwb_ldouble akin_type;
20069 };
20070 
20071 }
20072 }
20073 
20074 namespace color {
20075 namespace akin {
20076 
20077 template< typename tag_name >
20078 struct hwb< ::color::category::cmy< tag_name > > {
20079 public:
20080 	typedef ::color::category::hwb< tag_name > akin_type;
20081 };
20082 
20083 }
20084 }
20085 
20086 namespace color {
20087 namespace akin {
20088 
20089 template< >struct hwb< ::color::category::cmyk_uint8 > {
20090 	typedef ::color::category::hwb_uint8 akin_type;
20091 };
20092 template< >struct hwb< ::color::category::cmyk_uint16 > {
20093 	typedef ::color::category::hwb_uint16 akin_type;
20094 };
20095 template< >struct hwb< ::color::category::cmyk_uint32 > {
20096 	typedef ::color::category::hwb_uint32 akin_type;
20097 };
20098 template< >struct hwb< ::color::category::cmyk_uint64 > {
20099 	typedef ::color::category::hwb_uint64 akin_type;
20100 };
20101 template< >struct hwb< ::color::category::cmyk_float > {
20102 	typedef ::color::category::hwb_float akin_type;
20103 };
20104 template< >struct hwb< ::color::category::cmyk_double > {
20105 	typedef ::color::category::hwb_double akin_type;
20106 };
20107 template< >struct hwb< ::color::category::cmyk_ldouble > {
20108 	typedef ::color::category::hwb_ldouble akin_type;
20109 };
20110 
20111 }
20112 }
20113 
20114 namespace color {
20115 namespace akin {
20116 
20117 template< >struct hwb< ::color::category::hsl_uint8 > {
20118 	typedef ::color::category::hwb_uint8 akin_type;
20119 };
20120 template< >struct hwb< ::color::category::hsl_uint16 > {
20121 	typedef ::color::category::hwb_uint16 akin_type;
20122 };
20123 template< >struct hwb< ::color::category::hsl_uint32 > {
20124 	typedef ::color::category::hwb_uint32 akin_type;
20125 };
20126 template< >struct hwb< ::color::category::hsl_uint64 > {
20127 	typedef ::color::category::hwb_uint64 akin_type;
20128 };
20129 template< >struct hwb< ::color::category::hsl_float > {
20130 	typedef ::color::category::hwb_float akin_type;
20131 };
20132 template< >struct hwb< ::color::category::hsl_double > {
20133 	typedef ::color::category::hwb_double akin_type;
20134 };
20135 template< >struct hwb< ::color::category::hsl_ldouble > {
20136 	typedef ::color::category::hwb_ldouble akin_type;
20137 };
20138 
20139 }
20140 }
20141 
20142 namespace color {
20143 namespace akin {
20144 
20145 template< >struct hwb< ::color::category::hsv_uint8 > {
20146 	typedef ::color::category::hwb_uint8 akin_type;
20147 };
20148 template< >struct hwb< ::color::category::hsv_uint16 > {
20149 	typedef ::color::category::hwb_uint16 akin_type;
20150 };
20151 template< >struct hwb< ::color::category::hsv_uint32 > {
20152 	typedef ::color::category::hwb_uint32 akin_type;
20153 };
20154 template< >struct hwb< ::color::category::hsv_uint64 > {
20155 	typedef ::color::category::hwb_uint64 akin_type;
20156 };
20157 template< >struct hwb< ::color::category::hsv_float > {
20158 	typedef ::color::category::hwb_float akin_type;
20159 };
20160 template< >struct hwb< ::color::category::hsv_double > {
20161 	typedef ::color::category::hwb_double akin_type;
20162 };
20163 template< >struct hwb< ::color::category::hsv_ldouble > {
20164 	typedef ::color::category::hwb_ldouble akin_type;
20165 };
20166 
20167 }
20168 }
20169 
20170 namespace color {
20171 namespace akin {
20172 
20173 template< >struct hwb< ::color::category::hsi_uint8 > {
20174 	typedef ::color::category::hwb_uint8 akin_type;
20175 };
20176 template< >struct hwb< ::color::category::hsi_uint16 > {
20177 	typedef ::color::category::hwb_uint16 akin_type;
20178 };
20179 template< >struct hwb< ::color::category::hsi_uint32 > {
20180 	typedef ::color::category::hwb_uint32 akin_type;
20181 };
20182 template< >struct hwb< ::color::category::hsi_uint64 > {
20183 	typedef ::color::category::hwb_uint64 akin_type;
20184 };
20185 template< >struct hwb< ::color::category::hsi_float > {
20186 	typedef ::color::category::hwb_float akin_type;
20187 };
20188 template< >struct hwb< ::color::category::hsi_double > {
20189 	typedef ::color::category::hwb_double akin_type;
20190 };
20191 template< >struct hwb< ::color::category::hsi_ldouble > {
20192 	typedef ::color::category::hwb_ldouble akin_type;
20193 };
20194 
20195 }
20196 }
20197 
20198 namespace color {
20199 namespace akin {
20200 
20201 template
20202 <
20203 	typename tag_name
20204 
20205 	>
20206 struct hwb< ::color::category::hwb< tag_name > > {
20207 public:
20208 	typedef ::color::category::hwb< tag_name > akin_type;
20209 };
20210 
20211 }
20212 }
20213 
20214 namespace color {
20215 namespace akin {
20216 
20217 template< >struct hwb< ::color::category::rgb_uint8 > {
20218 	typedef ::color::category::hwb_uint8 akin_type;
20219 };
20220 template< >struct hwb< ::color::category::rgb_uint16 > {
20221 	typedef ::color::category::hwb_uint16 akin_type;
20222 };
20223 template< >struct hwb< ::color::category::rgb_uint32 > {
20224 	typedef ::color::category::hwb_uint32 akin_type;
20225 };
20226 template< >struct hwb< ::color::category::rgb_uint64 > {
20227 	typedef ::color::category::hwb_uint64 akin_type;
20228 };
20229 template< >struct hwb< ::color::category::rgb_float > {
20230 	typedef ::color::category::hwb_float akin_type;
20231 };
20232 template< >struct hwb< ::color::category::rgb_double > {
20233 	typedef ::color::category::hwb_double akin_type;
20234 };
20235 template< >struct hwb< ::color::category::rgb_ldouble > {
20236 	typedef ::color::category::hwb_ldouble akin_type;
20237 };
20238 
20239 }
20240 }
20241 
20242 namespace color {
20243 namespace akin {
20244 
20245 template< >struct hwb< ::color::category::yiq_uint8 > {
20246 	typedef ::color::category::hwb_uint8 akin_type;
20247 };
20248 template< >struct hwb< ::color::category::yiq_uint16 > {
20249 	typedef ::color::category::hwb_uint16 akin_type;
20250 };
20251 template< >struct hwb< ::color::category::yiq_uint32 > {
20252 	typedef ::color::category::hwb_uint32 akin_type;
20253 };
20254 template< >struct hwb< ::color::category::yiq_uint64 > {
20255 	typedef ::color::category::hwb_uint64 akin_type;
20256 };
20257 template< >struct hwb< ::color::category::yiq_float > {
20258 	typedef ::color::category::hwb_float akin_type;
20259 };
20260 template< >struct hwb< ::color::category::yiq_double > {
20261 	typedef ::color::category::hwb_double akin_type;
20262 };
20263 template< >struct hwb< ::color::category::yiq_ldouble > {
20264 	typedef ::color::category::hwb_ldouble akin_type;
20265 };
20266 
20267 }
20268 }
20269 
20270 namespace color {
20271 namespace akin {
20272 
20273 template< ::color::constant::yuv::reference_enum reference_number >struct hwb< ::color::category::yuv_uint8 <reference_number> > {
20274 	typedef ::color::category::hwb_uint8 akin_type;
20275 };
20276 template< ::color::constant::yuv::reference_enum reference_number >struct hwb< ::color::category::yuv_uint16 <reference_number> > {
20277 	typedef ::color::category::hwb_uint16 akin_type;
20278 };
20279 template< ::color::constant::yuv::reference_enum reference_number >struct hwb< ::color::category::yuv_uint32 <reference_number> > {
20280 	typedef ::color::category::hwb_uint32 akin_type;
20281 };
20282 template< ::color::constant::yuv::reference_enum reference_number >struct hwb< ::color::category::yuv_uint64 <reference_number> > {
20283 	typedef ::color::category::hwb_uint64 akin_type;
20284 };
20285 template< ::color::constant::yuv::reference_enum reference_number >struct hwb< ::color::category::yuv_float <reference_number> > {
20286 	typedef ::color::category::hwb_float akin_type;
20287 };
20288 template< ::color::constant::yuv::reference_enum reference_number >struct hwb< ::color::category::yuv_double <reference_number> > {
20289 	typedef ::color::category::hwb_double akin_type;
20290 };
20291 template< ::color::constant::yuv::reference_enum reference_number >struct hwb< ::color::category::yuv_ldouble<reference_number> > {
20292 	typedef ::color::category::hwb_ldouble akin_type;
20293 };
20294 
20295 }
20296 }
20297 
20298 namespace color {
20299 namespace akin {
20300 
20301 template< >struct hwb< ::color::category::YCgCo_uint8 > {
20302 	typedef ::color::category::hwb_uint8 akin_type;
20303 };
20304 template< >struct hwb< ::color::category::YCgCo_uint16 > {
20305 	typedef ::color::category::hwb_uint16 akin_type;
20306 };
20307 template< >struct hwb< ::color::category::YCgCo_uint32 > {
20308 	typedef ::color::category::hwb_uint32 akin_type;
20309 };
20310 template< >struct hwb< ::color::category::YCgCo_uint64 > {
20311 	typedef ::color::category::hwb_uint64 akin_type;
20312 };
20313 template< >struct hwb< ::color::category::YCgCo_float > {
20314 	typedef ::color::category::hwb_float akin_type;
20315 };
20316 template< >struct hwb< ::color::category::YCgCo_double > {
20317 	typedef ::color::category::hwb_double akin_type;
20318 };
20319 template< >struct hwb< ::color::category::YCgCo_ldouble > {
20320 	typedef ::color::category::hwb_ldouble akin_type;
20321 };
20322 
20323 }
20324 }
20325 
20326 namespace color {
20327 namespace akin {
20328 
20329 template< >struct hwb< ::color::category::YDbDr_uint8 > {
20330 	typedef ::color::category::hwb_uint8 akin_type;
20331 };
20332 template< >struct hwb< ::color::category::YDbDr_uint16 > {
20333 	typedef ::color::category::hwb_uint16 akin_type;
20334 };
20335 template< >struct hwb< ::color::category::YDbDr_uint32 > {
20336 	typedef ::color::category::hwb_uint32 akin_type;
20337 };
20338 template< >struct hwb< ::color::category::YDbDr_uint64 > {
20339 	typedef ::color::category::hwb_uint64 akin_type;
20340 };
20341 template< >struct hwb< ::color::category::YDbDr_float > {
20342 	typedef ::color::category::hwb_float akin_type;
20343 };
20344 template< >struct hwb< ::color::category::YDbDr_double > {
20345 	typedef ::color::category::hwb_double akin_type;
20346 };
20347 template< >struct hwb< ::color::category::YDbDr_ldouble > {
20348 	typedef ::color::category::hwb_ldouble akin_type;
20349 };
20350 
20351 }
20352 }
20353 
20354 namespace color {
20355 namespace akin {
20356 
20357 template< ::color::constant::YPbPr::reference_enum reference_number >struct hwb< ::color::category::YPbPr_uint8 <reference_number> > {
20358 	typedef ::color::category::hwb_uint8 akin_type;
20359 };
20360 template< ::color::constant::YPbPr::reference_enum reference_number >struct hwb< ::color::category::YPbPr_uint16 <reference_number> > {
20361 	typedef ::color::category::hwb_uint16 akin_type;
20362 };
20363 template< ::color::constant::YPbPr::reference_enum reference_number >struct hwb< ::color::category::YPbPr_uint32 <reference_number> > {
20364 	typedef ::color::category::hwb_uint32 akin_type;
20365 };
20366 template< ::color::constant::YPbPr::reference_enum reference_number >struct hwb< ::color::category::YPbPr_uint64 <reference_number> > {
20367 	typedef ::color::category::hwb_uint64 akin_type;
20368 };
20369 template< ::color::constant::YPbPr::reference_enum reference_number >struct hwb< ::color::category::YPbPr_float <reference_number> > {
20370 	typedef ::color::category::hwb_float akin_type;
20371 };
20372 template< ::color::constant::YPbPr::reference_enum reference_number >struct hwb< ::color::category::YPbPr_double <reference_number> > {
20373 	typedef ::color::category::hwb_double akin_type;
20374 };
20375 template< ::color::constant::YPbPr::reference_enum reference_number >struct hwb< ::color::category::YPbPr_ldouble<reference_number> > {
20376 	typedef ::color::category::hwb_ldouble akin_type;
20377 };
20378 
20379 }
20380 }
20381 
20382 namespace color {
20383 namespace akin {
20384 
20385 template< >struct hwb< ::color::category::xyz_uint8 > {
20386 	typedef ::color::category::hwb_uint8 akin_type;
20387 };
20388 template< >struct hwb< ::color::category::xyz_uint16 > {
20389 	typedef ::color::category::hwb_uint16 akin_type;
20390 };
20391 template< >struct hwb< ::color::category::xyz_uint32 > {
20392 	typedef ::color::category::hwb_uint32 akin_type;
20393 };
20394 template< >struct hwb< ::color::category::xyz_uint64 > {
20395 	typedef ::color::category::hwb_uint64 akin_type;
20396 };
20397 template< >struct hwb< ::color::category::xyz_float > {
20398 	typedef ::color::category::hwb_float akin_type;
20399 };
20400 template< >struct hwb< ::color::category::xyz_double > {
20401 	typedef ::color::category::hwb_double akin_type;
20402 };
20403 template< >struct hwb< ::color::category::xyz_ldouble > {
20404 	typedef ::color::category::hwb_ldouble akin_type;
20405 };
20406 
20407 }
20408 }
20409 
20410 namespace color {
20411 namespace akin {
20412 
20413 template
20414 <
20415 	typename tag_name
20416 
20417 	, ::color::constant::lab::reference_enum reference_number
20418 	>
20419 struct hwb< ::color::category::lab< tag_name, reference_number > > {
20420 public:
20421 	typedef ::color::category::hwb< tag_name > akin_type;
20422 };
20423 
20424 }
20425 }
20426 
20427 namespace color {
20428 namespace akin {
20429 
20430 template< typename tag_name >
20431 struct hwb< ::color::category::xyy< tag_name > > {
20432 public:
20433 	typedef ::color::category::hwb< tag_name > akin_type;
20434 };
20435 
20436 }
20437 }
20438 
20439 namespace color {
20440 namespace akin {
20441 
20442 template
20443 <
20444 	typename tag_name
20445 	,::color::constant::lms::reference_enum reference_number
20446 
20447 	>
20448 struct hwb< ::color::category::lms< tag_name, reference_number > > {
20449 public:
20450 	typedef ::color::category::hwb< tag_name > akin_type;
20451 };
20452 
20453 }
20454 }
20455 
20456 namespace color {
20457 namespace akin {
20458 
20459 template< typename tag_name >
20460 struct hwb< ::color::category::luv< tag_name > > {
20461 public:
20462 	typedef ::color::category::hwb< tag_name > akin_type;
20463 };
20464 
20465 }
20466 }
20467 
20468 namespace color {
20469 namespace akin {
20470 
20471 template< typename tag_name >
20472 struct hwb< ::color::category::LabCH< tag_name > > {
20473 public:
20474 	typedef ::color::category::hwb< tag_name > akin_type;
20475 };
20476 
20477 }
20478 }
20479 
20480 namespace color {
20481 namespace akin {
20482 
20483 template< typename tag_name >
20484 struct hwb< ::color::category::LuvCH< tag_name > > {
20485 public:
20486 	typedef ::color::category::hwb< tag_name > akin_type;
20487 };
20488 
20489 }
20490 }
20491 
20492 namespace color {
20493 namespace trait {
20494 
20495 template <> struct info< ::color::category::hwb_uint8 > {
20496 public:
20497 	enum { implemented_entity = true };
20498 	enum { meaningful_entity = true };
20499 };
20500 template <> struct info< ::color::category::hwb_uint16 > {
20501 public:
20502 	enum { implemented_entity = true };
20503 	enum { meaningful_entity = true };
20504 };
20505 template <> struct info< ::color::category::hwb_uint32 > {
20506 public:
20507 	enum { implemented_entity = true };
20508 	enum { meaningful_entity = true };
20509 };
20510 template <> struct info< ::color::category::hwb_uint64 > {
20511 public:
20512 	enum { implemented_entity = true };
20513 	enum { meaningful_entity = true };
20514 };
20515 template <> struct info< ::color::category::hwb_float > {
20516 public:
20517 	enum { implemented_entity = true };
20518 	enum { meaningful_entity = true };
20519 };
20520 template <> struct info< ::color::category::hwb_double > {
20521 public:
20522 	enum { implemented_entity = true };
20523 	enum { meaningful_entity = true };
20524 };
20525 template <> struct info< ::color::category::hwb_ldouble > {
20526 public:
20527 	enum { implemented_entity = true };
20528 	enum { meaningful_entity = true };
20529 };
20530 
20531 }
20532 }
20533 
20534 namespace color {
20535 namespace trait {
20536 
20537 template< >
20538 struct bound< ::color::category::hwb_uint8 >
20539 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::hwb_uint8 >::instance_type > {
20540 };
20541 
20542 template< >
20543 struct bound< ::color::category::hwb_uint16 >
20544 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::hwb_uint16 >::instance_type > {
20545 };
20546 
20547 template< >
20548 struct bound< ::color::category::hwb_uint32 >
20549 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::hwb_uint32 >::instance_type > {
20550 };
20551 
20552 template< >
20553 struct bound< ::color::category::hwb_uint64 >
20554 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::hwb_uint64 >::instance_type > {
20555 };
20556 
20557 }
20558 }
20559 
20560 namespace color {
20561 namespace _internal {
20562 namespace hwb {
20563 namespace bound {
20564 
20565 template< typename index_name, typename scalar_name >
20566 struct scalar {
20567 public:
20568 	typedef scalar_name scalar_type;
20569 	typedef index_name index_type;
20570 
20571 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
20572 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
20573 
20574 	typedef typename trait_type::instance_type instance_type;
20575 	typedef typename trait_type::return_image_type return_image_type;
20576 
20577 	typedef typename index_trait_type::instance_type index_instance_type;
20578 	typedef typename index_trait_type::model_type index_input_const_type;
20579 
20580 	template< index_instance_type index >
maximumcolor::_internal::hwb::bound::scalar20581 	static return_image_type maximum() {
20582 		static instance_type max_list[] = { 360, 100, 100 };
20583 		return max_list[index];
20584 	}
20585 
maximumcolor::_internal::hwb::bound::scalar20586 	static return_image_type maximum(index_input_const_type index) {
20587 		static instance_type max_list[] = { 360, 100, 100 };
20588 		return max_list[index];
20589 	}
20590 
20591 	template< index_instance_type index >
minimumcolor::_internal::hwb::bound::scalar20592 	static return_image_type minimum() {
20593 		static instance_type min_list[] = { 0, 0, 0 };
20594 		return min_list[index];
20595 	}
20596 
minimumcolor::_internal::hwb::bound::scalar20597 	static return_image_type minimum(index_input_const_type index) {
20598 		static instance_type min_list[] = { 0, 0, 0 };
20599 		return min_list[index];
20600 	}
20601 
20602 	template< index_instance_type index >
rangecolor::_internal::hwb::bound::scalar20603 	static return_image_type range() {
20604 		static instance_type range_list[] = { 360, 100, 100 };
20605 		return range_list[index];
20606 	}
20607 
rangecolor::_internal::hwb::bound::scalar20608 	static return_image_type range(index_input_const_type index) {
20609 		static instance_type range_list[] = { 360, 100, 100 };
20610 		return range_list[index];
20611 	}
20612 };
20613 
20614 }
20615 }
20616 }
20617 }
20618 
20619 namespace color {
20620 namespace trait {
20621 
20622 template< >
20623 struct bound< ::color::category::hwb_float >
20624 	: public ::color::_internal::hwb::bound::scalar< typename ::color::trait::index< ::color::category::hwb_float >::instance_type, float > {
20625 };
20626 
20627 template< >
20628 struct bound< ::color::category::hwb_double >
20629 	: public ::color::_internal::hwb::bound::scalar< typename ::color::trait::index< ::color::category::hwb_double >::instance_type, double > {
20630 };
20631 
20632 template< >
20633 struct bound< ::color::category::hwb_ldouble >
20634 	: public ::color::_internal::hwb::bound::scalar< typename ::color::trait::index< ::color::category::hwb_ldouble >::instance_type, long double > {
20635 };
20636 
20637 }
20638 }
20639 
20640 namespace color {
20641 namespace trait {
20642 
20643 template< >
20644 struct component< ::color::category::hwb_float >
20645 	: public ::color::_internal::utility::component::array< float > {
20646 };
20647 
20648 template< >
20649 struct component< ::color::category::hwb_double >
20650 	: public ::color::_internal::utility::component::array< double > {
20651 };
20652 
20653 template< >
20654 struct component< ::color::category::hwb_ldouble >
20655 	: public ::color::_internal::utility::component::array< long double > {
20656 };
20657 
20658 }
20659 }
20660 
20661 namespace color {
20662 namespace trait {
20663 
20664 template< >
20665 struct component< ::color::category::hwb_uint8 >
20666 	: public ::color::_internal::utility::component::array< std::uint8_t > {
20667 };
20668 
20669 template< >
20670 struct component< ::color::category::hwb_uint16 >
20671 	: public ::color::_internal::utility::component::array< std::uint16_t > {
20672 };
20673 
20674 template< >
20675 struct component< ::color::category::hwb_uint32 >
20676 	: public ::color::_internal::utility::component::array< std::uint32_t > {
20677 };
20678 
20679 template< >
20680 struct component< ::color::category::hwb_uint64 >
20681 	: public ::color::_internal::utility::component::array< std::uint64_t > {
20682 };
20683 
20684 }
20685 }
20686 
20687 namespace color {
20688 namespace trait {
20689 
20690 template< >
20691 struct container< ::color::category::hwb_float >
20692 	: public ::color::_internal::utility::container::array< float, 3 > {
20693 };
20694 
20695 template< >
20696 struct container< ::color::category::hwb_double >
20697 	: public ::color::_internal::utility::container::array< double, 3 > {
20698 };
20699 
20700 template< >
20701 struct container< ::color::category::hwb_ldouble >
20702 	: public ::color::_internal::utility::container::array< long double, 3 > {
20703 };
20704 
20705 }
20706 }
20707 
20708 namespace color {
20709 namespace trait {
20710 
20711 template< >
20712 struct container< ::color::category::hwb_uint8 >
20713 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
20714 };
20715 
20716 template< >
20717 struct container< ::color::category::hwb_uint16 >
20718 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
20719 };
20720 
20721 template< >
20722 struct container< ::color::category::hwb_uint32 >
20723 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
20724 };
20725 
20726 template< >
20727 struct container< ::color::category::hwb_uint64 >
20728 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
20729 };
20730 
20731 }
20732 }
20733 
20734 namespace color {
20735 
20736 template< typename type_name >
20737 using hwb = ::color::model< typename ::color::category::hwb< type_name > >;
20738 
20739 }
20740 
20741 namespace color {
20742 namespace place {
20743 namespace _internal {
20744 
20745 template< typename tag_name >
20746 struct hue< ::color::category::hwb< tag_name > > {
20747 public:
20748 	typedef ::color::category::hwb< tag_name > category_type;
20749 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
20750 
20751 	enum { position_enum = 0 };
20752 	enum { has_enum = true };
20753 
positioncolor::place::_internal::hue20754 	static index_instance_type position() {
20755 		return position_enum;
20756 	}
20757 };
20758 
20759 }
20760 }
20761 }
20762 
20763 namespace color {
20764 namespace check {
20765 namespace _internal {
20766 
20767 template<>
20768 struct integrity< ::color::category::hwb_float> {
20769 public:
20770 	typedef ::color::category::hwb_float category_type;
20771 
20772 	typedef ::color::model<category_type> model_type;
20773 	typedef ::color::trait::bound< category_type > bound_type;
20774 
20775 	enum {
20776 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
20777 	};
20778 
processcolor::check::_internal::integrity20779 	static bool process(model_type const& m) {
20780 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
20781 			return false;
20782 		}
20783 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
20784 			return false;
20785 		}
20786 		return true;
20787 	}
20788 };
20789 
20790 template<>
20791 struct integrity< ::color::category::hwb_double > {
20792 public:
20793 	typedef ::color::category::hwb_double category_type;
20794 
20795 	typedef ::color::model<category_type> model_type;
20796 	typedef ::color::trait::bound< category_type > bound_type;
20797 
20798 	enum {
20799 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
20800 	};
20801 
processcolor::check::_internal::integrity20802 	static bool process(model_type const& m) {
20803 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
20804 			return false;
20805 		}
20806 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
20807 			return false;
20808 		}
20809 		return true;
20810 	}
20811 };
20812 
20813 template<>
20814 struct integrity< ::color::category::hwb_ldouble > {
20815 public:
20816 	typedef ::color::category::hwb_ldouble category_type;
20817 
20818 	typedef ::color::model<category_type> model_type;
20819 	typedef ::color::trait::bound< category_type > bound_type;
20820 
20821 	enum {
20822 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
20823 	};
20824 
processcolor::check::_internal::integrity20825 	static bool process(model_type const& m) {
20826 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
20827 			return false;
20828 		}
20829 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
20830 			return false;
20831 		}
20832 		return true;
20833 	}
20834 };
20835 
20836 }
20837 }
20838 }
20839 
20840 namespace color {
20841 namespace place {
20842 namespace _internal {
20843 
20844 template< typename tag_name >
20845 struct black< ::color::category::hwb< tag_name > > {
20846 public:
20847 	typedef ::color::category::hwb< tag_name > category_type;
20848 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
20849 
20850 	enum { position_entity = 2 };
20851 	enum { has_entity = true };
20852 
positioncolor::place::_internal::black20853 	static index_instance_type position() {
20854 		return position_entity;
20855 	}
20856 };
20857 
20858 }
20859 }
20860 }
20861 
20862 namespace color {
20863 namespace place {
20864 namespace _internal {
20865 
20866 template< typename tag_name >
20867 struct white< ::color::category::hwb< tag_name > > {
20868 public:
20869 	typedef ::color::category::hwb< tag_name > category_type;
20870 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
20871 
20872 	enum { position_entity = 1 };
20873 	enum { has_entity = true };
20874 
positioncolor::place::_internal::white20875 	static index_instance_type position() {
20876 		return position_entity;
20877 	}
20878 };
20879 
20880 }
20881 }
20882 }
20883 
20884 namespace color {
20885 namespace check {
20886 namespace _internal {
20887 
20888 template< typename tag_name >
20889 struct unique< ::color::category::hwb< tag_name > > {
20890 public:
20891 	typedef ::color::category::hwb< tag_name > category_type;
20892 
20893 	typedef ::color::model<category_type> model_type;
20894 	typedef ::color::trait::bound< category_type > bound_type;
20895 
20896 	enum {
20897 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
20898 		,white_p = ::color::place::_internal::white<category_type>::position_entity
20899 		,black_p = ::color::place::_internal::black<category_type>::position_entity
20900 	};
20901 
processcolor::check::_internal::unique20902 	static bool process(model_type const& m) {
20903 		if(m.template get<white_p>() == bound_type::template minimum <white_p>()) {
20904 			if(m.template get<black_p>() == bound_type::template maximum<black_p>()) {
20905 				return false;
20906 			}
20907 		}
20908 		if(m.template get<white_p>() == bound_type::template maximum<white_p>()) {
20909 			if(m.template get<black_p>() == bound_type::template minimum<black_p>()) {
20910 				return false;
20911 			}
20912 		}
20913 		return true;
20914 	}
20915 };
20916 
20917 }
20918 }
20919 }
20920 
20921 namespace color {
20922 namespace fix {
20923 namespace _internal {
20924 namespace _privatehwb {
20925 
20926 template< typename category_name >
20927 struct integrity {
20928 public:
20929 	typedef category_name category_type;
20930 
20931 	typedef typename ::color::model<category_type> model_type;
20932 	typedef typename ::color::trait::bound<category_type> bound_type;
20933 
20934 	enum {
20935 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
20936 	};
20937 
processcolor::fix::_internal::_privatehwb::integrity20938 	static void process(model_type &result) {
20939 		if(result.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
20940 			result.template set<hue_p>(bound_type::template minimum<hue_p>());
20941 			return;
20942 		}
20943 		if(bound_type::template maximum<hue_p>() < result.template get<hue_p>()) {
20944 			result.template set<hue_p>(bound_type::template maximum<hue_p>());
20945 			return;
20946 		}
20947 	}
20948 
processcolor::fix::_internal::_privatehwb::integrity20949 	static void process(model_type &result, model_type const& right) {
20950 		result = right;
20951 		if(result.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
20952 			result.template set<hue_p>(bound_type::template minimum<hue_p>());
20953 			return;
20954 		}
20955 		if(bound_type::template maximum<hue_p>() < result.template get<hue_p>()) {
20956 			result.template set<hue_p>(bound_type::template maximum<hue_p>());
20957 			return;
20958 		}
20959 	}
20960 
20961 };
20962 
20963 }
20964 
20965 template<> struct integrity< ::color::category::hwb_float > : public ::color::fix::_internal::_privatehwb::integrity< ::color::category::hwb_float > { };
20966 template<> struct integrity< ::color::category::hwb_double > : public ::color::fix::_internal::_privatehwb::integrity< ::color::category::hwb_double > { };
20967 template<> struct integrity< ::color::category::hwb_ldouble > : public ::color::fix::_internal::_privatehwb::integrity< ::color::category::hwb_ldouble> { };
20968 
20969 }
20970 }
20971 }
20972 
20973 namespace color {
20974 namespace get {
20975 
20976 template< typename tag_name >
20977 inline
20978 typename ::color::trait::component< ::color::category::hwb<tag_name> >::return_type
black(::color::model<::color::category::hwb<tag_name>> const & color_parameter)20979 black(::color::model< ::color::category::hwb<tag_name> > const& color_parameter) {
20980 	typedef ::color::category::hwb<tag_name> category_type;
20981 	enum { black_p = ::color::place::_internal::black<category_type>::position_entity };
20982 	return color_parameter.template get<black_p>();
20983 }
20984 
20985 }
20986 }
20987 
20988 namespace color {
20989 namespace get {
20990 
20991 template< typename tag_name >
20992 inline
20993 typename ::color::trait::component< ::color::category::hwb<tag_name> >::return_type
hue(::color::model<::color::category::hwb<tag_name>> const & color_parameter)20994 hue(::color::model< ::color::category::hwb<tag_name> > const& color_parameter) {
20995 	typedef ::color::category::hwb<tag_name> category_type;
20996 	enum { hue_p = ::color::place::_internal::hue<category_type>::position_enum };
20997 	return color_parameter.template get<hue_p>();
20998 }
20999 
21000 }
21001 }
21002 
21003 namespace color {
21004 namespace get {
21005 
21006 template< typename tag_name >
21007 inline
21008 typename ::color::trait::component< ::color::category::hwb<tag_name> >::return_type
white(::color::model<::color::category::hwb<tag_name>> const & color_parameter)21009 white(::color::model< ::color::category::hwb<tag_name> > const& color_parameter) {
21010 	typedef ::color::category::hwb<tag_name> category_type;
21011 	enum { white_p = ::color::place::_internal::white<category_type>::position_entity };
21012 	return color_parameter.template get<white_p>();
21013 }
21014 
21015 }
21016 }
21017 
21018 namespace color {
21019 namespace set {
21020 
21021 template< typename tag_name >
21022 inline
21023 void
gray(::color::model<::color::category::hwb<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::hwb<tag_name>>::akin_type>::model_type component_parameter)21024 gray
21025 (
21026 	::color::model< ::color::category::hwb< tag_name > > & color_parameter
21027 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::hwb< tag_name > >::akin_type >::model_type component_parameter
21028 ) {
21029 	typedef ::color::category::hwb< tag_name > category_type;
21030 	typedef typename ::color::akin::gray< category_type >::akin_type akin_category_type;
21031 	typedef ::color::_internal::reformat< category_type, akin_category_type > reformat_type;
21032 	enum {
21033 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
21034 	};
21035 	enum {
21036 		gray_p = ::color::place::_internal::lightness<akin_category_type>::position_enum
21037 	};
21038 	color_parameter.template set<lightness_p>(reformat_type::template process<lightness_p,gray_p>(component_parameter));
21039 }
21040 
21041 }
21042 }
21043 
21044 namespace color {
21045 namespace set {
21046 template< typename tag_name >
21047 inline
21048 void
lightness(::color::model<::color::category::hwb<tag_name>> & color_parameter,typename::color::model<::color::category::hwb<tag_name>>::component_input_const_type component_parameter)21049 lightness
21050 (
21051 	::color::model< ::color::category::hwb<tag_name> > & color_parameter,
21052 	typename ::color::model< ::color::category::hwb<tag_name> >::component_input_const_type component_parameter
21053 ) {
21054 	typedef ::color::category::hwb<tag_name> category_type;
21055 	enum {
21056 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
21057 	};
21058 	color_parameter.template set<lightness_p>(component_parameter);
21059 }
21060 
21061 }
21062 }
21063 
21064 namespace color {
21065 namespace set {
21066 
21067 template< typename tag_name >
21068 inline
21069 void
red(::color::model<::color::category::hwb<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::hwb<tag_name>>::akin_type>::model_type component_parameter)21070 red
21071 (
21072 	::color::model< ::color::category::hwb< tag_name > > & color_parameter
21073 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hwb< tag_name > >::akin_type >::model_type component_parameter
21074 ) {
21075 	typedef ::color::category::hwb< tag_name > category_type;
21076 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
21077 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
21078 	::color::model< akin_type > rgb(color_parameter);
21079 	rgb.template set< red_p > (component_parameter);
21080 	color_parameter = rgb;
21081 }
21082 
21083 }
21084 }
21085 
21086 namespace color {
21087 namespace set {
21088 
21089 template< typename tag_name >
21090 inline
21091 void
green(::color::model<::color::category::hwb<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::hwb<tag_name>>::akin_type>::model_type component_parameter)21092 green
21093 (
21094 	::color::model< ::color::category::hwb< tag_name > > & color_parameter
21095 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hwb< tag_name > >::akin_type >::model_type component_parameter
21096 ) {
21097 	typedef ::color::category::hwb< tag_name > category_type;
21098 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
21099 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
21100 	::color::model< akin_type > rgb(color_parameter);
21101 	rgb.template set< green_p > (component_parameter);
21102 	color_parameter = rgb;
21103 }
21104 
21105 }
21106 }
21107 
21108 namespace color {
21109 namespace set {
21110 
21111 template< typename tag_name >
21112 inline
21113 void
blue(::color::model<::color::category::hwb<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::hwb<tag_name>>::akin_type>::model_type component_parameter)21114 blue
21115 (
21116 	::color::model< ::color::category::hwb< tag_name > > & color_parameter
21117 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::hwb< tag_name > >::akin_type >::model_type component_parameter
21118 ) {
21119 	typedef ::color::category::hwb< tag_name > category_type;
21120 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
21121 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
21122 	::color::model< akin_type > rgb(color_parameter);
21123 	rgb.template set<blue_p > (component_parameter);
21124 	color_parameter = rgb;
21125 }
21126 
21127 }
21128 }
21129 
21130 namespace color {
21131 namespace _internal {
21132 
21133 template
21134 <
21135 	typename hwb_tag_name
21136 	,typename gray_tag_name
21137 	>
21138 struct convert
21139 	<
21140 	::color::category::hwb< hwb_tag_name >
21141 	,::color::category::gray< gray_tag_name >
21142 	> {
21143 public:
21144 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
21145 	typedef ::color::category::gray< gray_tag_name > category_right_type;
21146 
21147 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
21148 
21149 	typedef ::color::category::hwb< scalar_type > hwbSCALAR_category_type;
21150 
21151 	typedef ::color::trait::bound<category_left_type> bound_left_trait_type;
21152 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
21153 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
21154 
21155 	typedef ::color::operation::_internal::invert< category_right_type > invert_type;
21156 
21157 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
21158 	typedef ::color::_internal::reformat< category_left_type, hwbSCALAR_category_type > reformatHWB_type;
21159 
21160 	typedef typename container_left_trait_type::input_type container_left_input_type;
21161 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
21162 
processcolor::_internal::convert21163 	static void process
21164 	(
21165 		container_left_input_type left
21166 		,container_right_const_input_type right
21167 	) {
21168 		container_left_trait_type::template set<0>(left, reformatHWB_type::template process< 0, 0 >(0));
21169 		container_left_trait_type::template set<1>(left, reformat_type::template process< 1, 0 >(container_right_trait_type::template get<0>(right)));
21170 		container_left_trait_type::template set<2>(left, reformat_type::template process< 2, 0 >(invert_type::template component<0>(container_right_trait_type::template get<0>(right))));
21171 	}
21172 };
21173 
21174 }
21175 }
21176 
21177 namespace color {
21178 namespace _internal {
21179 
21180 template
21181 <
21182 	typename hwb_tag_name
21183 	,typename cmy_tag_name
21184 	>
21185 struct convert
21186 	<
21187 	::color::category::hwb< hwb_tag_name >
21188 	,::color::category::cmy< cmy_tag_name >
21189 	> {
21190 public:
21191 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
21192 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_right_type;
21193 
21194 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
21195 
21196 	typedef ::color::model< cmy_category_type > cmy_model_type;
21197 	typedef ::color::model< hwb_category_type > hwb_model_type;
21198 
21199 	typedef ::color::rgb< scalar_type > rgb_model_type;
21200 	typedef ::color::hsv< scalar_type > hsv_model_type;
21201 
21202 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
21203 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
21204 
21205 	typedef typename container_left_trait_type::input_type container_left_input_type;
21206 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
21207 
processcolor::_internal::convert21208 	static void process
21209 	(
21210 		container_left_input_type left
21211 		,container_right_const_input_type right
21212 	) {
21213 		left = hwb_model_type(hsv_model_type(rgb_model_type(cmy_model_type(right)))).container();
21214 	}
21215 };
21216 
21217 }
21218 }
21219 
21220 namespace color {
21221 namespace _internal {
21222 
21223 template
21224 <
21225 	typename hwb_tag_name
21226 	,typename cmyk_tag_name
21227 	>
21228 struct convert
21229 	<
21230 	::color::category::hwb< hwb_tag_name >
21231 	,::color::category::cmyk< cmyk_tag_name >
21232 	> {
21233 public:
21234 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
21235 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
21236 
21237 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
21238 
21239 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
21240 	typedef ::color::model< hwb_category_type > hwb_model_type;
21241 
21242 	typedef ::color::rgb< scalar_type > rgb_model_type;
21243 	typedef ::color::hsv< scalar_type > hsv_model_type;
21244 
21245 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
21246 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
21247 
21248 	typedef typename container_left_trait_type::input_type container_left_input_type;
21249 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
21250 
processcolor::_internal::convert21251 	static void process
21252 	(
21253 		container_left_input_type left
21254 		,container_right_const_input_type right
21255 	) {
21256 		left = hwb_model_type(hsv_model_type(rgb_model_type(cmyk_model_type(right)))).container();
21257 	}
21258 };
21259 
21260 }
21261 }
21262 
21263 namespace color {
21264 namespace _internal {
21265 
21266 template
21267 <
21268 	typename hwb_tag_name
21269 	,typename hsl_tag_name
21270 	>
21271 struct convert
21272 	<
21273 	::color::category::hwb< hwb_tag_name >
21274 	,::color::category::hsl< hsl_tag_name >
21275 	> {
21276 public:
21277 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
21278 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
21279 
21280 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
21281 
21282 	typedef ::color::model< hsl_category_type > hsl_model_type;
21283 	typedef ::color::model< hwb_category_type > hwb_model_type;
21284 
21285 	typedef ::color::rgb< scalar_type > rgb_model_type;
21286 	typedef ::color::hsv< scalar_type > hsv_model_type;
21287 
21288 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
21289 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
21290 
21291 	typedef typename container_left_trait_type::input_type container_left_input_type;
21292 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
21293 
processcolor::_internal::convert21294 	static void process
21295 	(
21296 		container_left_input_type left
21297 		,container_right_const_input_type right
21298 	) {
21299 		left = hwb_model_type(hsv_model_type(rgb_model_type(hsl_model_type(right)))).container();
21300 	}
21301 };
21302 
21303 }
21304 }
21305 
21306 namespace color {
21307 namespace _internal {
21308 
21309 template
21310 <
21311 	typename hwb_tag_name
21312 	,typename hsv_tag_name
21313 	>
21314 struct convert
21315 	<
21316 	::color::category::hwb< hwb_tag_name >
21317 	,::color::category::hsv< hsv_tag_name >
21318 	> {
21319 public:
21320 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
21321 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
21322 
21323 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
21324 
21325 	typedef ::color::model< hsv_category_type > hsv_model_type;
21326 	typedef ::color::model< hwb_category_type > hwb_model_type;
21327 
21328 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
21329 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
21330 
21331 	typedef typename container_left_trait_type::input_type container_left_input_type;
21332 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
21333 
21334 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
21335 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
21336 
21337 	enum {
21338 		hue_p = ::color::place::_internal::hue<category_right_type>::position_enum
21339 		,saturation_p = ::color::place::_internal::saturation<category_right_type>::position_enum
21340 		, value_p = ::color::place::_internal::value<category_right_type>::position_enum
21341 	};
21342 
processcolor::_internal::convert21343 	static void process
21344 	(
21345 		container_left_input_type left
21346 		,container_right_const_input_type right
21347 	) {
21348 		scalar_type const h = normalize_type::template process<hue_p >(container_right_trait_type::template get<hue_p >(right));
21349 		scalar_type const s = normalize_type::template process<saturation_p>(container_right_trait_type::template get<saturation_p>(right));
21350 		scalar_type const v = normalize_type::template process<value_p >(container_right_trait_type::template get<value_p >(right));
21351 		scalar_type w = (scalar_type(1)-s) * v;
21352 		scalar_type b = scalar_type(1) - v;
21353 		scalar_type summae = w + b;
21354 		if(scalar_type(1) < summae) {
21355 			w /= summae;
21356 			b /= summae;
21357 		}
21358 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(h));
21359 		container_left_trait_type::template set<1>(left, diverse_type::template process<1>(w));
21360 		container_left_trait_type::template set<2>(left, diverse_type::template process<2>(b));
21361 	}
21362 };
21363 
21364 }
21365 }
21366 
21367 namespace color {
21368 namespace _internal {
21369 
21370 template
21371 <
21372 	typename hwb_tag_name
21373 	,typename hsi_tag_name
21374 	>
21375 struct convert
21376 	<
21377 	::color::category::hwb< hwb_tag_name >
21378 	,::color::category::hsi< hsi_tag_name >
21379 	> {
21380 public:
21381 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
21382 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
21383 
21384 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
21385 
21386 	typedef ::color::model< hsi_category_type > hsi_model_type;
21387 	typedef ::color::model< hwb_category_type > hwb_model_type;
21388 
21389 	typedef ::color::rgb< scalar_type > rgb_model_type;
21390 	typedef ::color::hsv< scalar_type > hsv_model_type;
21391 
21392 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
21393 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
21394 
21395 	typedef typename container_left_trait_type::input_type container_left_input_type;
21396 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
21397 
processcolor::_internal::convert21398 	static void process
21399 	(
21400 		container_left_input_type left
21401 		,container_right_const_input_type right
21402 	) {
21403 		left = hwb_model_type(hsv_model_type(rgb_model_type(hsi_model_type(right)))).container();
21404 	}
21405 };
21406 
21407 }
21408 }
21409 namespace color {
21410 namespace _internal {
21411 
21412 template
21413 <
21414 	typename tag_left_name
21415 	,typename tag_right_name
21416 	>
21417 struct convert
21418 	<
21419 	::color::category::hwb< tag_left_name >
21420 	,::color::category::hwb< tag_right_name>
21421 	> {
21422 public:
21423 	typedef ::color::category::hwb< tag_left_name > category_left_type;
21424 	typedef ::color::category::hwb< tag_right_name> category_right_type;
21425 
21426 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
21427 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
21428 
21429 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
21430 
21431 	typedef typename container_left_trait_type::input_type container_left_input_type;
21432 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
21433 
processcolor::_internal::convert21434 	static void process
21435 	(
21436 		container_left_input_type left
21437 		,container_right_const_input_type right
21438 	) {
21439 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
21440 		container_left_trait_type::template set<1>(left, reformat_type::template process<1,1>(container_right_trait_type::template get<1>(right)));
21441 		container_left_trait_type::template set<2>(left, reformat_type::template process<2,2>(container_right_trait_type::template get<2>(right)));
21442 	}
21443 };
21444 
21445 }
21446 }
21447 
21448 namespace color {
21449 namespace _internal {
21450 
21451 template
21452 <
21453 	typename hwb_tag_name
21454 	,typename rgb_tag_name
21455 	>
21456 struct convert
21457 	<
21458 	::color::category::hwb< hwb_tag_name >
21459 	,::color::category::rgb< rgb_tag_name >
21460 	> {
21461 public:
21462 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
21463 	typedef ::color::category::rgb< rgb_tag_name > rgb_category_type, category_right_type;
21464 
21465 	typedef typename ::color::trait::scalar< category_left_type > scalar_trait_type;
21466 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
21467 
21468 	typedef ::color::model< hwb_category_type > hwb_model_type;
21469 	typedef ::color::model< rgb_category_type > rgb_model_type;
21470 
21471 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
21472 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
21473 
21474 	typedef typename container_left_trait_type::input_type container_left_input_type;
21475 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
21476 
21477 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
21478 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
21479 
21480 	enum {
21481 		hue_p = ::color::place::_internal::hue<category_left_type>::position_enum
21482 		, white_p = ::color::place::_internal::white<category_left_type>::position_entity
21483 		, black_p = ::color::place::_internal::black<category_left_type>::position_entity
21484 	};
21485 
21486 	enum {
21487 		red_p = ::color::place::_internal::red<category_right_type>::position_enum
21488 		,green_p = ::color::place::_internal::green<category_right_type>::position_enum
21489 		, blue_p = ::color::place::_internal::blue<category_right_type>::position_enum
21490 	};
21491 
processcolor::_internal::convert21492 	static void process
21493 	(
21494 		container_left_input_type left
21495 		,container_right_const_input_type right
21496 	) {
21497 		scalar_type r = normalize_type::template process<red_p >(container_right_trait_type::template get<red_p >(right));
21498 		scalar_type g = normalize_type::template process<green_p>(container_right_trait_type::template get<green_p>(right));
21499 		scalar_type b = normalize_type::template process<blue_p >(container_right_trait_type::template get<blue_p >(right));
21500 		scalar_type white = std::min<scalar_type>({r,g,b});
21501 		scalar_type max = std::max<scalar_type>({r,g,b});
21502 		scalar_type black = scalar_type(1) - max;
21503 		scalar_type delta = max - white;
21504 		scalar_type hue = 0;
21505 		if(false == scalar_trait_type::is_small(delta)) {
21506 			if(max == r) {
21507 				hue = (scalar_type(60)/scalar_type(360)) * (g - b) / delta + (g < b ? scalar_type(1) : scalar_type(0));
21508 			}
21509 			if(max == g) {
21510 				hue = (scalar_type(60)/scalar_type(360)) * (b - r) / delta + (scalar_type(120)/scalar_type(360));
21511 			}
21512 			if(max == b) {
21513 				hue = (scalar_type(60)/scalar_type(360)) * (r - g) / delta + (scalar_type(240)/scalar_type(360));
21514 			}
21515 		}
21516 		container_left_trait_type::template set< hue_p >(left, diverse_type::template process< hue_p>(hue));
21517 		container_left_trait_type::template set< white_p >(left, diverse_type::template process< white_p>(white));
21518 		container_left_trait_type::template set< black_p >(left, diverse_type::template process< black_p>(black));
21519 	}
21520 };
21521 
21522 }
21523 }
21524 
21525 namespace color {
21526 namespace akin {
21527 
21528 template< >struct yiq< ::color::category::gray_uint8 > {
21529 	typedef ::color::category::yiq_uint8 akin_type;
21530 };
21531 template< >struct yiq< ::color::category::gray_uint16 > {
21532 	typedef ::color::category::yiq_uint16 akin_type;
21533 };
21534 template< >struct yiq< ::color::category::gray_uint32 > {
21535 	typedef ::color::category::yiq_uint32 akin_type;
21536 };
21537 template< >struct yiq< ::color::category::gray_uint64 > {
21538 	typedef ::color::category::yiq_uint64 akin_type;
21539 };
21540 template< >struct yiq< ::color::category::gray_float > {
21541 	typedef ::color::category::yiq_float akin_type;
21542 };
21543 template< >struct yiq< ::color::category::gray_double > {
21544 	typedef ::color::category::yiq_double akin_type;
21545 };
21546 template< >struct yiq< ::color::category::gray_ldouble > {
21547 	typedef ::color::category::yiq_ldouble akin_type;
21548 };
21549 
21550 }
21551 }
21552 
21553 namespace color {
21554 namespace akin {
21555 
21556 template< >struct yiq< ::color::category::cmyk_uint8 > {
21557 	typedef ::color::category::yiq_uint8 akin_type;
21558 };
21559 template< >struct yiq< ::color::category::cmyk_uint16 > {
21560 	typedef ::color::category::yiq_uint16 akin_type;
21561 };
21562 template< >struct yiq< ::color::category::cmyk_uint32 > {
21563 	typedef ::color::category::yiq_uint32 akin_type;
21564 };
21565 template< >struct yiq< ::color::category::cmyk_uint64 > {
21566 	typedef ::color::category::yiq_uint64 akin_type;
21567 };
21568 template< >struct yiq< ::color::category::cmyk_float > {
21569 	typedef ::color::category::yiq_float akin_type;
21570 };
21571 template< >struct yiq< ::color::category::cmyk_double > {
21572 	typedef ::color::category::yiq_double akin_type;
21573 };
21574 template< >struct yiq< ::color::category::cmyk_ldouble > {
21575 	typedef ::color::category::yiq_ldouble akin_type;
21576 };
21577 
21578 }
21579 }
21580 
21581 namespace color {
21582 namespace akin {
21583 
21584 template< >struct yiq< ::color::category::hsl_uint8 > {
21585 	typedef ::color::category::yiq_uint8 akin_type;
21586 };
21587 template< >struct yiq< ::color::category::hsl_uint16 > {
21588 	typedef ::color::category::yiq_uint16 akin_type;
21589 };
21590 template< >struct yiq< ::color::category::hsl_uint32 > {
21591 	typedef ::color::category::yiq_uint32 akin_type;
21592 };
21593 template< >struct yiq< ::color::category::hsl_uint64 > {
21594 	typedef ::color::category::yiq_uint64 akin_type;
21595 };
21596 template< >struct yiq< ::color::category::hsl_float > {
21597 	typedef ::color::category::yiq_float akin_type;
21598 };
21599 template< >struct yiq< ::color::category::hsl_double > {
21600 	typedef ::color::category::yiq_double akin_type;
21601 };
21602 template< >struct yiq< ::color::category::hsl_ldouble > {
21603 	typedef ::color::category::yiq_ldouble akin_type;
21604 };
21605 
21606 }
21607 }
21608 
21609 namespace color {
21610 namespace akin {
21611 
21612 template< >struct yiq< ::color::category::hsv_uint8 > {
21613 	typedef ::color::category::yiq_uint8 akin_type;
21614 };
21615 template< >struct yiq< ::color::category::hsv_uint16 > {
21616 	typedef ::color::category::yiq_uint16 akin_type;
21617 };
21618 template< >struct yiq< ::color::category::hsv_uint32 > {
21619 	typedef ::color::category::yiq_uint32 akin_type;
21620 };
21621 template< >struct yiq< ::color::category::hsv_uint64 > {
21622 	typedef ::color::category::yiq_uint64 akin_type;
21623 };
21624 template< >struct yiq< ::color::category::hsv_float > {
21625 	typedef ::color::category::yiq_float akin_type;
21626 };
21627 template< >struct yiq< ::color::category::hsv_double > {
21628 	typedef ::color::category::yiq_double akin_type;
21629 };
21630 template< >struct yiq< ::color::category::hsv_ldouble > {
21631 	typedef ::color::category::yiq_ldouble akin_type;
21632 };
21633 
21634 }
21635 }
21636 
21637 namespace color {
21638 namespace akin {
21639 
21640 template< >struct yiq< ::color::category::hsi_uint8 > {
21641 	typedef ::color::category::yiq_uint8 akin_type;
21642 };
21643 template< >struct yiq< ::color::category::hsi_uint16 > {
21644 	typedef ::color::category::yiq_uint16 akin_type;
21645 };
21646 template< >struct yiq< ::color::category::hsi_uint32 > {
21647 	typedef ::color::category::yiq_uint32 akin_type;
21648 };
21649 template< >struct yiq< ::color::category::hsi_uint64 > {
21650 	typedef ::color::category::yiq_uint64 akin_type;
21651 };
21652 template< >struct yiq< ::color::category::hsi_float > {
21653 	typedef ::color::category::yiq_float akin_type;
21654 };
21655 template< >struct yiq< ::color::category::hsi_double > {
21656 	typedef ::color::category::yiq_double akin_type;
21657 };
21658 template< >struct yiq< ::color::category::hsi_ldouble > {
21659 	typedef ::color::category::yiq_ldouble akin_type;
21660 };
21661 
21662 }
21663 }
21664 
21665 namespace color {
21666 namespace akin {
21667 
21668 template
21669 <
21670 	typename tag_name
21671 
21672 	>
21673 struct yiq< ::color::category::hwb< tag_name > > {
21674 public:
21675 	typedef ::color::category::yiq< tag_name > akin_type;
21676 };
21677 
21678 }
21679 }
21680 
21681 namespace color {
21682 namespace akin {
21683 
21684 template< typename tag_name >
21685 struct yiq< ::color::category::yiq< tag_name > > {
21686 public:
21687 	typedef ::color::category::yiq< tag_name > akin_type;
21688 };
21689 
21690 }
21691 }
21692 
21693 namespace color {
21694 namespace akin {
21695 
21696 template< ::color::constant::yuv::reference_enum reference_number >struct yiq< ::color::category::yuv_uint8 <reference_number> > {
21697 	typedef ::color::category::yiq_uint8 akin_type;
21698 };
21699 template< ::color::constant::yuv::reference_enum reference_number >struct yiq< ::color::category::yuv_uint16 <reference_number> > {
21700 	typedef ::color::category::yiq_uint16 akin_type;
21701 };
21702 template< ::color::constant::yuv::reference_enum reference_number >struct yiq< ::color::category::yuv_uint32 <reference_number> > {
21703 	typedef ::color::category::yiq_uint32 akin_type;
21704 };
21705 template< ::color::constant::yuv::reference_enum reference_number >struct yiq< ::color::category::yuv_uint64 <reference_number> > {
21706 	typedef ::color::category::yiq_uint64 akin_type;
21707 };
21708 template< ::color::constant::yuv::reference_enum reference_number >struct yiq< ::color::category::yuv_float <reference_number> > {
21709 	typedef ::color::category::yiq_float akin_type;
21710 };
21711 template< ::color::constant::yuv::reference_enum reference_number >struct yiq< ::color::category::yuv_double <reference_number> > {
21712 	typedef ::color::category::yiq_double akin_type;
21713 };
21714 template< ::color::constant::yuv::reference_enum reference_number >struct yiq< ::color::category::yuv_ldouble<reference_number> > {
21715 	typedef ::color::category::yiq_ldouble akin_type;
21716 };
21717 
21718 }
21719 }
21720 
21721 namespace color {
21722 namespace akin {
21723 
21724 template< >struct yiq< ::color::category::YCgCo_uint8 > {
21725 	typedef ::color::category::yiq_uint8 akin_type;
21726 };
21727 template< >struct yiq< ::color::category::YCgCo_uint16 > {
21728 	typedef ::color::category::yiq_uint16 akin_type;
21729 };
21730 template< >struct yiq< ::color::category::YCgCo_uint32 > {
21731 	typedef ::color::category::yiq_uint32 akin_type;
21732 };
21733 template< >struct yiq< ::color::category::YCgCo_uint64 > {
21734 	typedef ::color::category::yiq_uint64 akin_type;
21735 };
21736 template< >struct yiq< ::color::category::YCgCo_float > {
21737 	typedef ::color::category::yiq_float akin_type;
21738 };
21739 template< >struct yiq< ::color::category::YCgCo_double > {
21740 	typedef ::color::category::yiq_double akin_type;
21741 };
21742 template< >struct yiq< ::color::category::YCgCo_ldouble > {
21743 	typedef ::color::category::yiq_ldouble akin_type;
21744 };
21745 
21746 }
21747 }
21748 
21749 namespace color {
21750 namespace akin {
21751 
21752 template< >struct yiq< ::color::category::YDbDr_uint8 > {
21753 	typedef ::color::category::yiq_uint8 akin_type;
21754 };
21755 template< >struct yiq< ::color::category::YDbDr_uint16 > {
21756 	typedef ::color::category::yiq_uint16 akin_type;
21757 };
21758 template< >struct yiq< ::color::category::YDbDr_uint32 > {
21759 	typedef ::color::category::yiq_uint32 akin_type;
21760 };
21761 template< >struct yiq< ::color::category::YDbDr_uint64 > {
21762 	typedef ::color::category::yiq_uint64 akin_type;
21763 };
21764 template< >struct yiq< ::color::category::YDbDr_float > {
21765 	typedef ::color::category::yiq_float akin_type;
21766 };
21767 template< >struct yiq< ::color::category::YDbDr_double > {
21768 	typedef ::color::category::yiq_double akin_type;
21769 };
21770 template< >struct yiq< ::color::category::YDbDr_ldouble > {
21771 	typedef ::color::category::yiq_ldouble akin_type;
21772 };
21773 
21774 }
21775 }
21776 
21777 namespace color {
21778 namespace akin {
21779 
21780 template< ::color::constant::YPbPr::reference_enum reference_number >struct yiq< ::color::category::YPbPr_uint8 <reference_number> > {
21781 	typedef ::color::category::yiq_uint8 akin_type;
21782 };
21783 template< ::color::constant::YPbPr::reference_enum reference_number >struct yiq< ::color::category::YPbPr_uint16 <reference_number> > {
21784 	typedef ::color::category::yiq_uint16 akin_type;
21785 };
21786 template< ::color::constant::YPbPr::reference_enum reference_number >struct yiq< ::color::category::YPbPr_uint32 <reference_number> > {
21787 	typedef ::color::category::yiq_uint32 akin_type;
21788 };
21789 template< ::color::constant::YPbPr::reference_enum reference_number >struct yiq< ::color::category::YPbPr_uint64 <reference_number> > {
21790 	typedef ::color::category::yiq_uint64 akin_type;
21791 };
21792 template< ::color::constant::YPbPr::reference_enum reference_number >struct yiq< ::color::category::YPbPr_float <reference_number> > {
21793 	typedef ::color::category::yiq_float akin_type;
21794 };
21795 template< ::color::constant::YPbPr::reference_enum reference_number >struct yiq< ::color::category::YPbPr_double <reference_number> > {
21796 	typedef ::color::category::yiq_double akin_type;
21797 };
21798 template< ::color::constant::YPbPr::reference_enum reference_number >struct yiq< ::color::category::YPbPr_ldouble<reference_number> > {
21799 	typedef ::color::category::yiq_ldouble akin_type;
21800 };
21801 
21802 }
21803 }
21804 
21805 namespace color {
21806 namespace akin {
21807 
21808 template
21809 <
21810 	typename tag_name
21811 
21812 	>
21813 struct yiq< ::color::category::xyz< tag_name > > {
21814 public:
21815 	typedef ::color::category::yiq< tag_name > akin_type;
21816 };
21817 
21818 }
21819 }
21820 
21821 namespace color {
21822 namespace akin {
21823 
21824 template
21825 <
21826 	typename tag_name, ::color::constant::lab::reference_enum lab_reference_number
21827 	>
21828 struct yiq< ::color::category::lab< tag_name, lab_reference_number > > {
21829 public:
21830 	typedef ::color::category::yiq< tag_name > akin_type;
21831 };
21832 
21833 }
21834 }
21835 
21836 namespace color {
21837 namespace akin {
21838 
21839 template< >struct yiq< ::color::category::xyy_uint8 > {
21840 	typedef ::color::category::yiq_uint8 akin_type;
21841 };
21842 template< >struct yiq< ::color::category::xyy_uint16 > {
21843 	typedef ::color::category::yiq_uint16 akin_type;
21844 };
21845 template< >struct yiq< ::color::category::xyy_uint32 > {
21846 	typedef ::color::category::yiq_uint32 akin_type;
21847 };
21848 template< >struct yiq< ::color::category::xyy_uint64 > {
21849 	typedef ::color::category::yiq_uint64 akin_type;
21850 };
21851 template< >struct yiq< ::color::category::xyy_float > {
21852 	typedef ::color::category::yiq_float akin_type;
21853 };
21854 template< >struct yiq< ::color::category::xyy_double > {
21855 	typedef ::color::category::yiq_double akin_type;
21856 };
21857 template< >struct yiq< ::color::category::xyy_ldouble > {
21858 	typedef ::color::category::yiq_ldouble akin_type;
21859 };
21860 
21861 }
21862 }
21863 
21864 namespace color {
21865 namespace akin {
21866 
21867 template
21868 <
21869 	typename tag_name
21870 	,::color::constant::lms::reference_enum reference_number
21871 
21872 	>
21873 struct yiq< ::color::category::lms< tag_name, reference_number > > {
21874 public:
21875 	typedef ::color::category::yiq< tag_name > akin_type;
21876 };
21877 
21878 }
21879 }
21880 
21881 namespace color {
21882 namespace akin {
21883 
21884 template< >struct yiq< ::color::category::luv_uint8 > {
21885 	typedef ::color::category::yiq_uint8 akin_type;
21886 };
21887 template< >struct yiq< ::color::category::luv_uint16 > {
21888 	typedef ::color::category::yiq_uint16 akin_type;
21889 };
21890 template< >struct yiq< ::color::category::luv_uint32 > {
21891 	typedef ::color::category::yiq_uint32 akin_type;
21892 };
21893 template< >struct yiq< ::color::category::luv_uint64 > {
21894 	typedef ::color::category::yiq_uint64 akin_type;
21895 };
21896 template< >struct yiq< ::color::category::luv_float > {
21897 	typedef ::color::category::yiq_float akin_type;
21898 };
21899 template< >struct yiq< ::color::category::luv_double > {
21900 	typedef ::color::category::yiq_double akin_type;
21901 };
21902 template< >struct yiq< ::color::category::luv_ldouble > {
21903 	typedef ::color::category::yiq_ldouble akin_type;
21904 };
21905 
21906 }
21907 }
21908 
21909 namespace color {
21910 namespace akin {
21911 
21912 template< >struct yiq< ::color::category::LabCH_uint8 > {
21913 	typedef ::color::category::yiq_uint8 akin_type;
21914 };
21915 template< >struct yiq< ::color::category::LabCH_uint16 > {
21916 	typedef ::color::category::yiq_uint16 akin_type;
21917 };
21918 template< >struct yiq< ::color::category::LabCH_uint32 > {
21919 	typedef ::color::category::yiq_uint32 akin_type;
21920 };
21921 template< >struct yiq< ::color::category::LabCH_uint64 > {
21922 	typedef ::color::category::yiq_uint64 akin_type;
21923 };
21924 template< >struct yiq< ::color::category::LabCH_float > {
21925 	typedef ::color::category::yiq_float akin_type;
21926 };
21927 template< >struct yiq< ::color::category::LabCH_double > {
21928 	typedef ::color::category::yiq_double akin_type;
21929 };
21930 template< >struct yiq< ::color::category::LabCH_ldouble > {
21931 	typedef ::color::category::yiq_ldouble akin_type;
21932 };
21933 
21934 }
21935 }
21936 
21937 namespace color {
21938 namespace akin {
21939 
21940 template< >struct yiq< ::color::category::LuvCH_uint8 > {
21941 	typedef ::color::category::yiq_uint8 akin_type;
21942 };
21943 template< >struct yiq< ::color::category::LuvCH_uint16 > {
21944 	typedef ::color::category::yiq_uint16 akin_type;
21945 };
21946 template< >struct yiq< ::color::category::LuvCH_uint32 > {
21947 	typedef ::color::category::yiq_uint32 akin_type;
21948 };
21949 template< >struct yiq< ::color::category::LuvCH_uint64 > {
21950 	typedef ::color::category::yiq_uint64 akin_type;
21951 };
21952 template< >struct yiq< ::color::category::LuvCH_float > {
21953 	typedef ::color::category::yiq_float akin_type;
21954 };
21955 template< >struct yiq< ::color::category::LuvCH_double > {
21956 	typedef ::color::category::yiq_double akin_type;
21957 };
21958 template< >struct yiq< ::color::category::LuvCH_ldouble > {
21959 	typedef ::color::category::yiq_ldouble akin_type;
21960 };
21961 
21962 }
21963 }
21964 
21965 namespace color {
21966 namespace trait {
21967 
21968 template <> struct info< ::color::category::yiq_uint8 > {
21969 public:
21970 	enum { implemented_entity = true };
21971 	enum { meaningful_entity = true };
21972 };
21973 template <> struct info< ::color::category::yiq_uint16 > {
21974 public:
21975 	enum { implemented_entity = true };
21976 	enum { meaningful_entity = true };
21977 };
21978 template <> struct info< ::color::category::yiq_uint32 > {
21979 public:
21980 	enum { implemented_entity = true };
21981 	enum { meaningful_entity = true };
21982 };
21983 template <> struct info< ::color::category::yiq_uint64 > {
21984 public:
21985 	enum { implemented_entity = true };
21986 	enum { meaningful_entity = true };
21987 };
21988 template <> struct info< ::color::category::yiq_float > {
21989 public:
21990 	enum { implemented_entity = true };
21991 	enum { meaningful_entity = true };
21992 };
21993 template <> struct info< ::color::category::yiq_double > {
21994 public:
21995 	enum { implemented_entity = true };
21996 	enum { meaningful_entity = true };
21997 };
21998 template <> struct info< ::color::category::yiq_ldouble > {
21999 public:
22000 	enum { implemented_entity = true };
22001 	enum { meaningful_entity = true };
22002 };
22003 
22004 }
22005 }
22006 
22007 namespace color {
22008 namespace _internal {
22009 namespace yiq {
22010 namespace bound {
22011 
22012 template< typename index_name, typename scalar_name >
22013 struct scalar {
22014 public:
22015 	typedef scalar_name scalar_type;
22016 	typedef index_name index_type;
22017 
22018 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
22019 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
22020 
22021 	typedef typename trait_type::instance_type instance_type;
22022 	typedef typename trait_type::return_image_type return_image_type;
22023 
22024 	typedef typename index_trait_type::instance_type index_instance_type;
22025 	typedef typename index_trait_type::model_type index_input_const_type;
22026 
22027 	template< index_instance_type index >
maximumcolor::_internal::yiq::bound::scalar22028 	static return_image_type maximum() {
22029 		static instance_type max_list[] = { 1, scalar_type(0.5957161349127745527), scalar_type(0.5225910452916111683) };
22030 		return max_list[index];
22031 	}
22032 
maximumcolor::_internal::yiq::bound::scalar22033 	static return_image_type maximum(index_input_const_type index) {
22034 		static instance_type max_list[] = { 1, scalar_type(0.5957161349127745527), scalar_type(0.5225910452916111683) };
22035 		return max_list[index];
22036 	}
22037 
22038 	template< index_instance_type index >
minimumcolor::_internal::yiq::bound::scalar22039 	static return_image_type minimum() {
22040 		static instance_type min_list[] = { 0, scalar_type(-0.5957161349127745527), scalar_type(-0.5225910452916111683) };
22041 		return min_list[index];
22042 	}
22043 
minimumcolor::_internal::yiq::bound::scalar22044 	static return_image_type minimum(index_input_const_type index) {
22045 		static instance_type min_list[] = { 0, scalar_type(-0.5957161349127745527), scalar_type(-0.5225910452916111683) };
22046 		return min_list[index];
22047 	}
22048 
22049 	template< index_instance_type index >
rangecolor::_internal::yiq::bound::scalar22050 	static return_image_type range() {
22051 		static instance_type range_list[] = { 1, scalar_type(2*0.5957161349127745527), scalar_type(2 * 0.5225910452916111683) };
22052 		return range_list[index];
22053 	}
22054 
rangecolor::_internal::yiq::bound::scalar22055 	static return_image_type range(index_input_const_type index) {
22056 		static instance_type range_list[] = { 1, scalar_type(2*0.5957161349127745527), scalar_type(2*0.5225910452916111683) };
22057 		return range_list[index];
22058 	}
22059 };
22060 
22061 }
22062 }
22063 }
22064 }
22065 
22066 namespace color {
22067 namespace trait {
22068 
22069 template< >
22070 struct bound< ::color::category::yiq_float >
22071 	: public ::color::_internal::yiq::bound::scalar< typename ::color::trait::index< ::color::category::yiq_float >::instance_type, float > {
22072 };
22073 
22074 template< >
22075 struct bound< ::color::category::yiq_double >
22076 	: public ::color::_internal::yiq::bound::scalar< typename ::color::trait::index< ::color::category::yiq_double >::instance_type, double > {
22077 };
22078 
22079 template< >
22080 struct bound< ::color::category::yiq_ldouble >
22081 	: public ::color::_internal::yiq::bound::scalar< typename ::color::trait::index< ::color::category::yiq_ldouble >::instance_type, long double > {
22082 };
22083 
22084 }
22085 }
22086 
22087 namespace color {
22088 namespace trait {
22089 
22090 template< >
22091 struct bound< ::color::category::yiq_uint8 >
22092 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::yiq_uint8 >::instance_type > {
22093 };
22094 
22095 template< >
22096 struct bound< ::color::category::yiq_uint16 >
22097 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::yiq_uint16 >::instance_type > {
22098 };
22099 
22100 template< >
22101 struct bound< ::color::category::yiq_uint32 >
22102 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::yiq_uint32 >::instance_type > {
22103 };
22104 
22105 template< >
22106 struct bound< ::color::category::yiq_uint64 >
22107 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::yiq_uint64 >::instance_type > {
22108 };
22109 
22110 }
22111 }
22112 
22113 namespace color {
22114 namespace trait {
22115 
22116 template< >
22117 struct container< ::color::category::yiq_float >
22118 	: public ::color::_internal::utility::container::array< float, 3 > {
22119 };
22120 
22121 template< >
22122 struct container< ::color::category::yiq_double >
22123 	: public ::color::_internal::utility::container::array< double, 3 > {
22124 };
22125 
22126 template< >
22127 struct container< ::color::category::yiq_ldouble >
22128 	: public ::color::_internal::utility::container::array< long double, 3 > {
22129 };
22130 
22131 }
22132 }
22133 
22134 namespace color {
22135 namespace trait {
22136 
22137 template< >
22138 struct container< ::color::category::yiq_uint8 >
22139 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
22140 };
22141 
22142 template< >
22143 struct container< ::color::category::yiq_uint16 >
22144 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
22145 };
22146 
22147 template< >
22148 struct container< ::color::category::yiq_uint32 >
22149 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
22150 };
22151 
22152 template< >
22153 struct container< ::color::category::yiq_uint64 >
22154 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
22155 };
22156 
22157 }
22158 }
22159 
22160 namespace color {
22161 
22162 template< typename type_name >
22163 using yiq = ::color::model< typename ::color::category::yiq< type_name > >;
22164 
22165 }
22166 
22167 namespace color {
22168 namespace get {
22169 
22170 template< typename tag_name >
22171 inline
22172 typename ::color::model< ::color::category::yiq< tag_name> >::component_const_type
inphase(::color::model<::color::category::yiq<tag_name>> const & color_parameter)22173 inphase(::color::model< ::color::category::yiq< tag_name> > const& color_parameter) {
22174 	typedef ::color::category::yiq< tag_name> category_type;
22175 	enum { inphase_p = ::color::place::_internal::inphase<category_type>::position_enum };
22176 	return color_parameter.template get<inphase_p>();
22177 }
22178 
22179 }
22180 }
22181 
22182 namespace color {
22183 namespace get {
22184 
22185 template< typename tag_name >
22186 inline
22187 typename ::color::model< ::color::category::yiq< tag_name> >::component_const_type
quadrature(::color::model<::color::category::yiq<tag_name>> const & color_parameter)22188 quadrature(::color::model< ::color::category::yiq< tag_name> > const& color_parameter) {
22189 	typedef ::color::category::yiq< tag_name> category_type;
22190 	enum { quadrature_p = ::color::place::_internal::quadrature<category_type>::position_enum };
22191 	return color_parameter.template get<quadrature_p>();
22192 }
22193 
22194 }
22195 }
22196 
22197 namespace color {
22198 namespace get {
22199 
22200 template< typename tag_name >
22201 inline
22202 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::yiq<tag_name> >::akin_type >::return_type
red(::color::model<::color::category::yiq<tag_name>> const & color_parameter)22203 red(::color::model< ::color::category::yiq<tag_name> > const& color_parameter) {
22204 	typedef ::color::category::yiq<tag_name> category_type;
22205 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
22206 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
22207 	typedef ::color::_internal::diverse< akin_type > diverse_type;
22208 	typedef ::color::_internal::normalize<category_type> normalize_type;
22209 	typedef ::color::constant::yiq<category_type> yiq_const_type;
22210 	enum {
22211 		luma_p = ::color::place::_internal::luma<category_type>::position_enum
22212 		, inphase_p = ::color::place::_internal::inphase<category_type>::position_enum
22213 		,quadrature_p = ::color::place::_internal::quadrature<category_type>::position_enum
22214 	};
22215 	enum {
22216 		red_p = ::color::place::_internal::red<akin_type>::position_enum
22217 	};
22218 	static scalar_type a11 = yiq_const_type::a11(), a12 = yiq_const_type::a12(), a13 = yiq_const_type::a13();
22219 	scalar_type y = normalize_type::template process< luma_p >(color_parameter.template get< luma_p>());
22220 	scalar_type i = normalize_type::template process< inphase_p>(color_parameter.template get< inphase_p>());
22221 	scalar_type q = normalize_type::template process<quadrature_p>(color_parameter.template get<quadrature_p>());
22222 	i = (scalar_type(2) * i - scalar_type(1)) * yiq_const_type::i_max();
22223 	q = (scalar_type(2) * q - scalar_type(1)) * yiq_const_type::q_max();
22224 	scalar_type r = a11 * y + a12 * i + a13 * q;
22225 	return diverse_type::template process<red_p>(r);
22226 }
22227 
22228 }
22229 }
22230 
22231 namespace color {
22232 namespace get {
22233 
22234 template< typename tag_name >
22235 inline
22236 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::yiq<tag_name> >::akin_type >::return_type
green(::color::model<::color::category::yiq<tag_name>> const & color_parameter)22237 green(::color::model< ::color::category::yiq<tag_name> > const& color_parameter) {
22238 	typedef ::color::category::yiq<tag_name> category_type;
22239 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
22240 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
22241 	typedef ::color::_internal::diverse< akin_type > diverse_type;
22242 	typedef ::color::_internal::normalize<category_type> normalize_type;
22243 	typedef ::color::constant::yiq<category_type> yiq_const_type;
22244 	enum {
22245 		luma_p = ::color::place::_internal::luma<category_type>::position_enum
22246 		, inphase_p = ::color::place::_internal::inphase<category_type>::position_enum
22247 		,quadrature_p = ::color::place::_internal::quadrature<category_type>::position_enum
22248 	};
22249 	enum {
22250 		green_p = ::color::place::_internal::green<akin_type>::position_enum
22251 	};
22252 	static scalar_type a21 = yiq_const_type::a21(), a22 = yiq_const_type::a22(), a23 = yiq_const_type::a23();
22253 	scalar_type y = normalize_type::template process< luma_p>(color_parameter.template get< luma_p>());
22254 	scalar_type i = normalize_type::template process< inphase_p>(color_parameter.template get< inphase_p>());
22255 	scalar_type q = normalize_type::template process<quadrature_p>(color_parameter.template get<quadrature_p>());
22256 	i = (scalar_type(2) * i - scalar_type(1)) * yiq_const_type::i_max();
22257 	q = (scalar_type(2) * q - scalar_type(1)) * yiq_const_type::q_max();
22258 	scalar_type g = a21 * y + a22 * i + a23 * q;
22259 	return diverse_type::template process<green_p>(g);
22260 }
22261 
22262 }
22263 }
22264 
22265 namespace color {
22266 namespace get {
22267 
22268 template< typename tag_name >
22269 inline
22270 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::yiq<tag_name> >::akin_type >::return_type
blue(::color::model<::color::category::yiq<tag_name>> const & color_parameter)22271 blue(::color::model< ::color::category::yiq<tag_name> > const& color_parameter) {
22272 	typedef ::color::category::yiq<tag_name> category_type;
22273 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
22274 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
22275 	typedef ::color::_internal::diverse<akin_type> diverse_type;
22276 	typedef ::color::_internal::normalize<category_type> normalize_type;
22277 	typedef ::color::constant::yiq<category_type> yiq_const_type;
22278 	enum {
22279 		luma_p = ::color::place::_internal::luma<category_type>::position_enum
22280 		, inphase_p = ::color::place::_internal::inphase<category_type>::position_enum
22281 		,quadrature_p = ::color::place::_internal::quadrature<category_type>::position_enum
22282 	};
22283 	enum {
22284 		blue_p = ::color::place::_internal::blue<akin_type>::position_enum
22285 	};
22286 	static scalar_type a31 = yiq_const_type::a31(), a32 = yiq_const_type::a32(), a33 = yiq_const_type::a33();
22287 	scalar_type y = normalize_type::template process< luma_p >(color_parameter.template get< luma_p>());
22288 	scalar_type i = normalize_type::template process< inphase_p>(color_parameter.template get< inphase_p>());
22289 	scalar_type q = normalize_type::template process<quadrature_p>(color_parameter.template get<quadrature_p>());
22290 	i = (scalar_type(2) * i - scalar_type(1)) * yiq_const_type::i_max();
22291 	q = (scalar_type(2) * q - scalar_type(1)) * yiq_const_type::q_max();
22292 	scalar_type b = a31 * y + a32 * i + a33 * q;
22293 	return diverse_type::template process<blue_p>(b);
22294 }
22295 
22296 }
22297 }
22298 
22299 namespace color {
22300 namespace get {
22301 
22302 template< typename tag_name >
22303 inline
22304 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::yiq<tag_name> >::akin_type >::return_type
gray(::color::model<::color::category::yiq<tag_name>> const & color_parameter)22305 gray(::color::model< ::color::category::yiq<tag_name> > const& color_parameter) {
22306 	typedef ::color::category::yiq< tag_name > category_type;
22307 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
22308 	typedef ::color::_internal::reformat< akin_type, category_type > reformat_type;
22309 	return reformat_type::template process<0,0>(color_parameter.template get<0>());
22310 }
22311 
22312 }
22313 }
22314 
22315 namespace color {
22316 namespace set {
22317 
22318 template< typename tag_name >
22319 inline
22320 void
red(::color::model<::color::category::yiq<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::yiq<tag_name>>::akin_type>::model_type component_parameter)22321 red
22322 (
22323 	::color::model< ::color::category::yiq< tag_name > > & color_parameter
22324 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::yiq< tag_name > >::akin_type >::model_type component_parameter
22325 ) {
22326 	typedef ::color::category::yiq< tag_name > category_type;
22327 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
22328 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
22329 	::color::model< akin_type > rgb(color_parameter);
22330 	rgb.template set< red_p > (component_parameter);
22331 	color_parameter = rgb;
22332 }
22333 
22334 }
22335 }
22336 
22337 namespace color {
22338 namespace set {
22339 
22340 template< typename tag_name >
22341 inline
22342 void
green(::color::model<::color::category::yiq<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::yiq<tag_name>>::akin_type>::model_type component_parameter)22343 green
22344 (
22345 	::color::model< ::color::category::yiq< tag_name > > & color_parameter
22346 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::yiq< tag_name > >::akin_type >::model_type component_parameter
22347 ) {
22348 	typedef ::color::category::yiq< tag_name > category_type;
22349 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
22350 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
22351 	::color::model< akin_type > rgb(color_parameter);
22352 	rgb.template set< green_p > (component_parameter);
22353 	color_parameter = rgb;
22354 }
22355 
22356 }
22357 }
22358 
22359 namespace color {
22360 namespace set {
22361 
22362 template< typename tag_name >
22363 inline
22364 void
blue(::color::model<::color::category::yiq<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::yiq<tag_name>>::akin_type>::model_type component_parameter)22365 blue
22366 (
22367 	::color::model< ::color::category::yiq< tag_name > > & color_parameter
22368 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::yiq< tag_name > >::akin_type >::model_type component_parameter
22369 ) {
22370 	typedef ::color::category::yiq< tag_name > category_type;
22371 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
22372 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
22373 	::color::model< akin_type > rgb(color_parameter);
22374 	rgb.template set<blue_p > (component_parameter);
22375 	color_parameter = rgb;
22376 }
22377 
22378 }
22379 }
22380 
22381 namespace color {
22382 namespace set {
22383 
22384 template< typename tag_name >
22385 inline
22386 void
gray(::color::model<::color::category::yiq<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::yiq<tag_name>>::akin_type>::model_type component_parameter)22387 gray
22388 (
22389 	::color::model< ::color::category::yiq< tag_name > > & color_parameter
22390 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::yiq< tag_name > >::akin_type >::model_type component_parameter
22391 ) {
22392 	typedef ::color::category::yiq< tag_name > category_type;
22393 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
22394 	typedef ::color::_internal::reformat< category_type, akin_type > reformat_type;
22395 	enum {
22396 		luma_p = ::color::place::_internal::luma<category_type>::position_enum
22397 	};
22398 	color_parameter.template set<luma_p>(reformat_type::template process<luma_p,0>(component_parameter));
22399 }
22400 
22401 }
22402 }
22403 
22404 namespace color {
22405 namespace _internal {
22406 
22407 template< typename yiq_tag_name, typename gray_tag_name >
22408 struct convert
22409 	<
22410 	::color::category::yiq< yiq_tag_name >
22411 	,::color::category::gray< gray_tag_name >
22412 	> {
22413 public:
22414 	typedef ::color::category::yiq< yiq_tag_name > category_left_type;
22415 	typedef ::color::category::gray< gray_tag_name > category_right_type;
22416 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
22417 
22418 	typedef ::color::trait::bound<category_left_type> bound_left_trait_type;
22419 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
22420 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
22421 
22422 	typedef typename container_left_trait_type::input_type container_left_input_type;
22423 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
22424 
22425 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
22426 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
22427 
22428 	enum {
22429 		luma_p = ::color::place::_internal::luma<category_left_type>::position_enum
22430 		, inphase_p = ::color::place::_internal::inphase<category_left_type>::position_enum
22431 		,quadrature_p = ::color::place::_internal::quadrature<category_left_type>::position_enum
22432 	};
22433 
processcolor::_internal::convert22434 	static void process
22435 	(
22436 		container_left_input_type left
22437 		,container_right_const_input_type right
22438 	) {
22439 		scalar_type g = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
22440 		auto y = diverse_type::template process<0>(g);
22441 		static auto const i = diverse_type::template process<1>(0.5);
22442 		static auto const q = diverse_type::template process<2>(0.5);
22443 		container_left_trait_type::template set<0>(left, y);
22444 		container_left_trait_type::template set<1>(left, i);
22445 		container_left_trait_type::template set<2>(left, q);
22446 		container_left_trait_type::template set< luma_p>(left, y);
22447 		container_left_trait_type::template set< inphase_p>(left, i);
22448 		container_left_trait_type::template set<quadrature_p>(left, q);
22449 	}
22450 
22451 };
22452 
22453 }
22454 }
22455 
22456 namespace color {
22457 namespace _internal {
22458 
22459 template< typename yiq_tag_name, typename cmy_tag_name >
22460 struct convert
22461 	<
22462 	::color::category::yiq< yiq_tag_name >
22463 	,::color::category::cmy< cmy_tag_name >
22464 	> {
22465 public:
22466 	typedef ::color::category::yiq< yiq_tag_name > category_left_type;
22467 	typedef ::color::category::cmy< cmy_tag_name > category_right_type;
22468 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
22469 
22470 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
22471 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
22472 
22473 	typedef ::color::constant::yiq< category_left_type > yiq_const_type;
22474 
22475 	typedef typename container_left_trait_type::input_type container_left_input_type;
22476 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
22477 
22478 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
22479 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
22480 
22481 	enum {
22482 		luma_p = ::color::place::_internal::luma<category_left_type>::position_enum
22483 		, inphase_p = ::color::place::_internal::inphase<category_left_type>::position_enum
22484 		,quadrature_p = ::color::place::_internal::quadrature<category_left_type>::position_enum
22485 	};
22486 
22487 	enum {
22488 		cyan_p = ::color::place::_internal::cyan<category_right_type>::position_enum
22489 		,magenta_p = ::color::place::_internal::magenta<category_right_type>::position_enum
22490 		,yellow_p = ::color::place::_internal::yellow<category_right_type>::position_enum
22491 	};
22492 
processcolor::_internal::convert22493 	static void process
22494 	(
22495 		container_left_input_type left
22496 		,container_right_const_input_type right
22497 	) {
22498 		static scalar_type b11 = yiq_const_type::b11(), b12 = yiq_const_type::b12(), b13 = yiq_const_type::b13();
22499 		static scalar_type b21 = yiq_const_type::b21(), b22 = yiq_const_type::b22(), b23 = yiq_const_type::b23();
22500 		static scalar_type b31 = yiq_const_type::b31(), b32 = yiq_const_type::b32(), b33 = yiq_const_type::b33();
22501 		static scalar_type const b32n = -b32;
22502 		scalar_type r = scalar_type(1) - normalize_type::template process<cyan_p >(container_right_trait_type::template get<cyan_p >(right));
22503 		scalar_type g = scalar_type(1) - normalize_type::template process<magenta_p>(container_right_trait_type::template get<magenta_p>(right));
22504 		scalar_type b = scalar_type(1) - normalize_type::template process<yellow_p >(container_right_trait_type::template get<yellow_p >(right));
22505 		scalar_type y = b11 * r + b12 * g + b13 * b;
22506 		scalar_type i = b21 * r + b22 * g + b23 * b;
22507 		scalar_type q = b31 * r + b32 * g + b33 * b;
22508 		i = (i / b21 + scalar_type(1)) / scalar_type(2);
22509 		q = (q / b32n + scalar_type(1)) / scalar_type(2);
22510 		container_left_trait_type::template set< luma_p>(left, diverse_type::template process< luma_p>(y));
22511 		container_left_trait_type::template set< inphase_p>(left, diverse_type::template process< inphase_p>(i));
22512 		container_left_trait_type::template set<quadrature_p>(left, diverse_type::template process<quadrature_p>(q));
22513 	}
22514 };
22515 
22516 }
22517 }
22518 
22519 namespace color {
22520 namespace _internal {
22521 
22522 template< typename yiq_tag_name, typename cmyk_tag_name >
22523 struct convert
22524 	<
22525 	::color::category::yiq< yiq_tag_name >
22526 	,::color::category::cmyk< cmyk_tag_name >
22527 	> {
22528 public:
22529 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
22530 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
22531 
22532 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
22533 
22534 	typedef ::color::model< yiq_category_type > yiq_model_type;
22535 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
22536 
22537 	typedef ::color::rgb< scalar_type > rgb_model_type;
22538 
22539 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
22540 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
22541 
22542 	typedef typename container_left_trait_type::input_type container_left_input_type;
22543 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
22544 
processcolor::_internal::convert22545 	static void process
22546 	(
22547 		container_left_input_type left
22548 		,container_right_const_input_type right
22549 	) {
22550 		left = yiq_model_type(rgb_model_type(cmyk_model_type(right))).container();
22551 	}
22552 };
22553 
22554 }
22555 }
22556 
22557 namespace color {
22558 namespace _internal {
22559 
22560 template< typename yiq_tag_name, typename hsl_tag_name >
22561 struct convert
22562 	<
22563 	::color::category::yiq< yiq_tag_name >
22564 	,::color::category::hsl< hsl_tag_name >
22565 	> {
22566 public:
22567 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
22568 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
22569 
22570 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
22571 
22572 	typedef ::color::model< yiq_category_type > yiq_model_type;
22573 	typedef ::color::model< hsl_category_type > hsl_model_type;
22574 
22575 	typedef ::color::rgb< scalar_type > rgb_model_type;
22576 
22577 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
22578 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
22579 
22580 	typedef typename container_left_trait_type::input_type container_left_input_type;
22581 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
22582 
processcolor::_internal::convert22583 	static void process
22584 	(
22585 		container_left_input_type left
22586 		,container_right_const_input_type right
22587 	) {
22588 		left = yiq_model_type(rgb_model_type(hsl_model_type(right))).container();
22589 	}
22590 };
22591 
22592 }
22593 }
22594 
22595 namespace color {
22596 namespace _internal {
22597 
22598 template< typename yiq_tag_name, typename hsv_tag_name >
22599 struct convert
22600 	<
22601 	::color::category::yiq< yiq_tag_name >
22602 	,::color::category::hsv< hsv_tag_name >
22603 	> {
22604 public:
22605 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
22606 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
22607 
22608 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
22609 
22610 	typedef ::color::model< yiq_category_type > yiq_model_type;
22611 	typedef ::color::model< hsv_category_type > hsv_model_type;
22612 
22613 	typedef ::color::rgb< scalar_type > rgb_model_type;
22614 
22615 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
22616 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
22617 
22618 	typedef typename container_left_trait_type::input_type container_left_input_type;
22619 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
22620 
processcolor::_internal::convert22621 	static void process
22622 	(
22623 		container_left_input_type left
22624 		,container_right_const_input_type right
22625 	) {
22626 		left = yiq_model_type(rgb_model_type(hsv_model_type(right))).container();
22627 	}
22628 };
22629 
22630 }
22631 }
22632 
22633 namespace color {
22634 namespace _internal {
22635 
22636 template< typename yiq_tag_name, typename hsi_tag_name >
22637 struct convert
22638 	<
22639 	::color::category::yiq< yiq_tag_name >
22640 	,::color::category::hsi< hsi_tag_name >
22641 	> {
22642 public:
22643 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
22644 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
22645 
22646 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
22647 
22648 	typedef ::color::model< yiq_category_type > yiq_model_type;
22649 	typedef ::color::model< hsi_category_type > hsi_model_type;
22650 
22651 	typedef ::color::rgb< scalar_type > rgb_model_type;
22652 
22653 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
22654 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
22655 
22656 	typedef typename container_left_trait_type::input_type container_left_input_type;
22657 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
22658 
processcolor::_internal::convert22659 	static void process
22660 	(
22661 		container_left_input_type left
22662 		,container_right_const_input_type right
22663 	) {
22664 		left = yiq_model_type(rgb_model_type(hsi_model_type(right))).container();
22665 	}
22666 };
22667 
22668 }
22669 }
22670 
22671 namespace color {
22672 namespace _internal {
22673 
22674 template
22675 <
22676 	typename yiq_tag_name
22677 	,typename hwb_tag_name
22678 	>
22679 struct convert
22680 	<
22681 	::color::category::yiq< yiq_tag_name >
22682 	,::color::category::hwb< hwb_tag_name >
22683 	> {
22684 public:
22685 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
22686 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
22687 
22688 	typedef typename ::color::trait::scalar< yiq_category_type >::instance_type scalar_type;
22689 
22690 	typedef ::color::model< yiq_category_type > yiq_model_type;
22691 	typedef ::color::model< hwb_category_type > hwb_model_type;
22692 
22693 	typedef ::color::rgb< scalar_type > rgb_model_type;
22694 	typedef ::color::hsv< scalar_type > hsv_model_type;
22695 
22696 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
22697 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
22698 
22699 	typedef typename container_left_trait_type::input_type container_left_input_type;
22700 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
22701 
processcolor::_internal::convert22702 	static void process
22703 	(
22704 		container_left_input_type left
22705 		,container_right_const_input_type right
22706 	) {
22707 		left = yiq_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right)))).container();
22708 	}
22709 };
22710 
22711 }
22712 }
22713 
22714 namespace color {
22715 namespace _internal {
22716 
22717 template< typename yiq_tag_name, typename rgb_tag_name >
22718 struct convert
22719 	<
22720 	::color::category::yiq< yiq_tag_name >
22721 	,::color::category::rgb< rgb_tag_name >
22722 	> {
22723 public:
22724 	typedef ::color::category::yiq< yiq_tag_name > category_left_type;
22725 	typedef ::color::category::rgb< rgb_tag_name > category_right_type;
22726 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
22727 
22728 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
22729 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
22730 
22731 	typedef ::color::constant::yiq< category_left_type > yiq_const_type;
22732 
22733 	typedef typename container_left_trait_type::input_type container_left_input_type;
22734 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
22735 
22736 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
22737 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
22738 
22739 	enum {
22740 		luma_p = ::color::place::_internal::luma<category_left_type>::position_enum
22741 		, inphase_p = ::color::place::_internal::inphase<category_left_type>::position_enum
22742 		,quadrature_p = ::color::place::_internal::quadrature<category_left_type>::position_enum
22743 	};
22744 
22745 	enum {
22746 		red_p = ::color::place::_internal::red<category_right_type>::position_enum
22747 		,green_p = ::color::place::_internal::green<category_right_type>::position_enum
22748 		,blue_p = ::color::place::_internal::blue<category_right_type>::position_enum
22749 	};
22750 
processcolor::_internal::convert22751 	static void process
22752 	(
22753 		container_left_input_type left
22754 		,container_right_const_input_type right
22755 	) {
22756 		static scalar_type b11 = yiq_const_type::b11(), b12 = yiq_const_type::b12(), b13 = yiq_const_type::b13();
22757 		static scalar_type b21 = yiq_const_type::b21(), b22 = yiq_const_type::b22(), b23 = yiq_const_type::b23();
22758 		static scalar_type b31 = yiq_const_type::b31(), b32 = yiq_const_type::b32(), b33 = yiq_const_type::b33();
22759 		static scalar_type const b32n = -b32;
22760 		scalar_type r = normalize_type::template process<red_p >(container_right_trait_type::template get<red_p >(right));
22761 		scalar_type g = normalize_type::template process<green_p>(container_right_trait_type::template get<green_p>(right));
22762 		scalar_type b = normalize_type::template process<blue_p >(container_right_trait_type::template get<blue_p >(right));
22763 		scalar_type y = b11 * r + b12 * g + b13 * b;
22764 		scalar_type i = b21 * r + b22 * g + b23 * b;
22765 		scalar_type q = b31 * r + b32 * g + b33 * b;
22766 		i = (i / b21 + scalar_type(1)) / scalar_type(2);
22767 		q = (q / b32n + scalar_type(1)) / scalar_type(2);
22768 		container_left_trait_type::template set< luma_p>(left, diverse_type::template process< luma_p>(y));
22769 		container_left_trait_type::template set< inphase_p>(left, diverse_type::template process< inphase_p>(i));
22770 		container_left_trait_type::template set<quadrature_p>(left, diverse_type::template process<quadrature_p>(q));
22771 	}
22772 };
22773 
22774 }
22775 }
22776 
22777 namespace color {
22778 namespace _internal {
22779 
22780 template< typename tag_left_name, typename tag_right_name >
22781 struct convert
22782 	<
22783 	::color::category::yiq< tag_left_name >
22784 	,::color::category::yiq< tag_right_name>
22785 	> {
22786 public:
22787 	typedef ::color::category::yiq< tag_left_name > category_left_type;
22788 	typedef ::color::category::yiq< tag_right_name> category_right_type;
22789 
22790 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
22791 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
22792 
22793 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
22794 
22795 	typedef typename container_left_trait_type::input_type container_left_input_type;
22796 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
22797 
22798 	enum {
22799 		ll_p = ::color::place::_internal::luma<category_left_type>::position_enum
22800 		,il_p = ::color::place::_internal::inphase<category_left_type>::position_enum
22801 		,ql_p = ::color::place::_internal::quadrature<category_left_type>::position_enum
22802 	};
22803 
22804 	enum {
22805 		lr_p = ::color::place::_internal::luma<category_right_type>::position_enum
22806 		,ir_p = ::color::place::_internal::inphase<category_right_type>::position_enum
22807 		,qr_p = ::color::place::_internal::quadrature<category_right_type>::position_enum
22808 	};
22809 
processcolor::_internal::convert22810 	static void process
22811 	(
22812 		container_left_input_type left
22813 		,container_right_const_input_type right
22814 	) {
22815 		container_left_trait_type::template set<ll_p>(left, reformat_type::template process<ll_p,lr_p>(container_right_trait_type::template get<lr_p>(right)));
22816 		container_left_trait_type::template set<il_p>(left, reformat_type::template process<il_p,ir_p>(container_right_trait_type::template get<ir_p>(right)));
22817 		container_left_trait_type::template set<ql_p>(left, reformat_type::template process<ql_p,qr_p>(container_right_trait_type::template get<qr_p>(right)));
22818 	}
22819 };
22820 }
22821 }
22822 
22823 namespace color {
22824 namespace akin {
22825 
22826 template
22827 <
22828 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
22829 
22830 	>
22831 struct yuv< ::color::category::gray< tag_name >, yuv_reference_number > {
22832 public:
22833 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
22834 };
22835 
22836 }
22837 }
22838 
22839 namespace color {
22840 namespace akin {
22841 
22842 template
22843 <
22844 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
22845 
22846 	>
22847 struct yuv< ::color::category::cmy< tag_name >, yuv_reference_number > {
22848 public:
22849 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
22850 };
22851 
22852 }
22853 }
22854 
22855 namespace color {
22856 namespace akin {
22857 
22858 template
22859 <
22860 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
22861 
22862 	>
22863 struct yuv< ::color::category::cmyk< tag_name >, yuv_reference_number > {
22864 public:
22865 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
22866 };
22867 
22868 }
22869 }
22870 
22871 namespace color {
22872 namespace akin {
22873 
22874 template
22875 <
22876 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
22877 
22878 	>
22879 struct yuv< ::color::category::hsl< tag_name >, yuv_reference_number > {
22880 public:
22881 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
22882 };
22883 
22884 }
22885 }
22886 
22887 namespace color {
22888 namespace akin {
22889 
22890 template
22891 <
22892 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
22893 
22894 	>
22895 struct yuv< ::color::category::hsv< tag_name >, yuv_reference_number > {
22896 public:
22897 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
22898 };
22899 
22900 }
22901 }
22902 
22903 namespace color {
22904 namespace akin {
22905 
22906 template
22907 <
22908 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
22909 
22910 	>
22911 struct yuv< ::color::category::hsi< tag_name >, yuv_reference_number > {
22912 public:
22913 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
22914 };
22915 
22916 }
22917 }
22918 
22919 namespace color {
22920 namespace akin {
22921 
22922 template
22923 <
22924 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
22925 
22926 	>
22927 struct yuv< ::color::category::hwb< tag_name >, yuv_reference_number > {
22928 public:
22929 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
22930 };
22931 
22932 }
22933 }
22934 
22935 namespace color {
22936 namespace akin {
22937 
22938 template
22939 <
22940 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
22941 
22942 	>
22943 struct yuv< ::color::category::rgb< tag_name >, yuv_reference_number > {
22944 public:
22945 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
22946 };
22947 
22948 }
22949 }
22950 
22951 namespace color {
22952 namespace akin {
22953 
22954 template
22955 <
22956 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
22957 
22958 	>
22959 struct yuv< ::color::category::yiq< tag_name >, yuv_reference_number > {
22960 public:
22961 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
22962 };
22963 
22964 }
22965 }
22966 
22967 namespace color {
22968 namespace akin {
22969 
22970 template
22971 <
22972 	typename tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
22973 	>
22974 struct yuv< ::color::category::yuv< tag_name, yuv_reference_number >, yuv_reference_number > {
22975 public:
22976 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
22977 };
22978 
22979 }
22980 }
22981 
22982 namespace color {
22983 namespace akin {
22984 
22985 template
22986 <
22987 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
22988 
22989 	>
22990 struct yuv< ::color::category::YCgCo< tag_name >, yuv_reference_number > {
22991 public:
22992 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
22993 };
22994 
22995 }
22996 }
22997 
22998 namespace color {
22999 namespace akin {
23000 
23001 template
23002 <
23003 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
23004 
23005 	>
23006 struct yuv< ::color::category::YDbDr< tag_name >, yuv_reference_number > {
23007 public:
23008 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
23009 };
23010 
23011 }
23012 }
23013 
23014 namespace color {
23015 namespace akin {
23016 
23017 template
23018 <
23019 	typename tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
23020 	, typename ::color::constant::YPbPr::reference_enum YPbPr_reference_number
23021 	>
23022 struct yuv< ::color::category::YPbPr< tag_name, YPbPr_reference_number >, yuv_reference_number > {
23023 public:
23024 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
23025 };
23026 
23027 }
23028 }
23029 
23030 namespace color {
23031 namespace akin {
23032 
23033 template
23034 <
23035 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
23036 
23037 	>
23038 struct yuv< ::color::category::xyz< tag_name >, yuv_reference_number > {
23039 public:
23040 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
23041 };
23042 
23043 }
23044 }
23045 
23046 namespace color {
23047 namespace akin {
23048 
23049 template
23050 <
23051 	typename tag_name
23052 	,::color::constant::yuv::reference_enum yuv_reference_number
23053 	,::color::constant::lab::reference_enum lab_reference_number
23054 	>
23055 struct yuv< ::color::category::lab< tag_name, lab_reference_number >, yuv_reference_number > {
23056 public:
23057 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
23058 };
23059 
23060 }
23061 }
23062 
23063 namespace color {
23064 namespace akin {
23065 
23066 template
23067 <
23068 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
23069 
23070 	>
23071 struct yuv< ::color::category::xyy< tag_name >, yuv_reference_number > {
23072 public:
23073 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
23074 };
23075 
23076 }
23077 }
23078 
23079 namespace color {
23080 namespace akin {
23081 
23082 template
23083 <
23084 	typename tag_name
23085 	,::color::constant::yuv::reference_enum yuv_reference_number
23086 	,::color::constant::lms::reference_enum lms_reference_number
23087 	>
23088 struct yuv< ::color::category::lms< tag_name, lms_reference_number >, yuv_reference_number > {
23089 public:
23090 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
23091 };
23092 
23093 }
23094 }
23095 
23096 namespace color {
23097 namespace akin {
23098 
23099 template
23100 <
23101 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
23102 
23103 	>
23104 struct yuv< ::color::category::luv< tag_name >, yuv_reference_number > {
23105 public:
23106 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
23107 };
23108 
23109 }
23110 }
23111 
23112 namespace color {
23113 namespace akin {
23114 
23115 template
23116 <
23117 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
23118 
23119 	>
23120 struct yuv< ::color::category::LabCH< tag_name >, yuv_reference_number > {
23121 public:
23122 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
23123 };
23124 
23125 }
23126 }
23127 
23128 namespace color {
23129 namespace akin {
23130 
23131 template
23132 <
23133 	typename tag_name, typename ::color::constant::yuv::reference_enum yuv_reference_number
23134 
23135 	>
23136 struct yuv< ::color::category::LuvCH< tag_name >, yuv_reference_number > {
23137 public:
23138 	typedef ::color::category::yuv< tag_name, yuv_reference_number > akin_type;
23139 };
23140 
23141 }
23142 }
23143 
23144 namespace color {
23145 namespace trait {
23146 
23147 template < ::color::constant::yuv::reference_enum reference_number > struct info< ::color::category::yuv_uint8 < reference_number > > {
23148 public:
23149 	enum { implemented_entity = true };
23150 	enum { meaningful_entity = true };
23151 };
23152 template < ::color::constant::yuv::reference_enum reference_number > struct info< ::color::category::yuv_uint16 < reference_number > > {
23153 public:
23154 	enum { implemented_entity = true };
23155 	enum { meaningful_entity = true };
23156 };
23157 template < ::color::constant::yuv::reference_enum reference_number > struct info< ::color::category::yuv_uint32 < reference_number > > {
23158 public:
23159 	enum { implemented_entity = true };
23160 	enum { meaningful_entity = true };
23161 };
23162 template < ::color::constant::yuv::reference_enum reference_number > struct info< ::color::category::yuv_uint64 < reference_number > > {
23163 public:
23164 	enum { implemented_entity = true };
23165 	enum { meaningful_entity = true };
23166 };
23167 template < ::color::constant::yuv::reference_enum reference_number > struct info< ::color::category::yuv_float < reference_number > > {
23168 public:
23169 	enum { implemented_entity = true };
23170 	enum { meaningful_entity = true };
23171 };
23172 template < ::color::constant::yuv::reference_enum reference_number > struct info< ::color::category::yuv_double < reference_number > > {
23173 public:
23174 	enum { implemented_entity = true };
23175 	enum { meaningful_entity = true };
23176 };
23177 template < ::color::constant::yuv::reference_enum reference_number > struct info< ::color::category::yuv_ldouble< reference_number > > {
23178 public:
23179 	enum { implemented_entity = true };
23180 	enum { meaningful_entity = true };
23181 };
23182 
23183 }
23184 }
23185 
23186 namespace color {
23187 namespace _internal {
23188 namespace yuv {
23189 namespace bound {
23190 
23191 template< typename index_name, typename scalar_name >
23192 struct scalar {
23193 public:
23194 	typedef scalar_name scalar_type;
23195 	typedef index_name index_type;
23196 
23197 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
23198 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
23199 
23200 	typedef typename trait_type::instance_type instance_type;
23201 	typedef typename trait_type::return_image_type return_image_type;
23202 
23203 	typedef typename index_trait_type::instance_type index_instance_type;
23204 	typedef typename index_trait_type::model_type index_input_const_type;
23205 
23206 	template< index_instance_type index >
maximumcolor::_internal::yuv::bound::scalar23207 	static return_image_type maximum() {
23208 		static instance_type max_list[] = { 1, scalar_type(0.436), scalar_type(0.615) };
23209 		return max_list[index];
23210 	}
23211 
maximumcolor::_internal::yuv::bound::scalar23212 	static return_image_type maximum(index_input_const_type index) {
23213 		static instance_type max_list[] = { 1, scalar_type(0.436), scalar_type(0.615) };
23214 		return max_list[index];
23215 	}
23216 
23217 	template< index_instance_type index >
minimumcolor::_internal::yuv::bound::scalar23218 	static return_image_type minimum() {
23219 		static instance_type min_list[] = { 0, scalar_type(-0.436), scalar_type(-0.615) };
23220 		return min_list[index];
23221 	}
23222 
minimumcolor::_internal::yuv::bound::scalar23223 	static return_image_type minimum(index_input_const_type index) {
23224 		static instance_type min_list[] = { 0, scalar_type(-0.436), scalar_type(-0.615) };
23225 		return min_list[index];
23226 	}
23227 
23228 	template< index_instance_type index >
rangecolor::_internal::yuv::bound::scalar23229 	static return_image_type range() {
23230 		static instance_type range_list[] = { 1, scalar_type(2*0.436), scalar_type(2 * 0.615) };
23231 		return range_list[index];
23232 	}
23233 
rangecolor::_internal::yuv::bound::scalar23234 	static return_image_type range(index_input_const_type index) {
23235 		static instance_type range_list[] = { 1, scalar_type(2*0.436), scalar_type(2*0.615) };
23236 		return range_list[index];
23237 	}
23238 };
23239 
23240 }
23241 }
23242 }
23243 }
23244 
23245 namespace color {
23246 namespace trait {
23247 
23248 template< ::color::constant::yuv::reference_enum reference_number >
23249 struct bound< ::color::category::yuv_float<reference_number> >
23250 	: public ::color::_internal::yuv::bound::scalar< typename ::color::trait::index< ::color::category::yuv_float<reference_number> >::instance_type, float > {
23251 };
23252 
23253 template< ::color::constant::yuv::reference_enum reference_number >
23254 struct bound< ::color::category::yuv_double< reference_number > >
23255 	: public ::color::_internal::yuv::bound::scalar< typename ::color::trait::index< ::color::category::yuv_double<reference_number> >::instance_type, double > {
23256 };
23257 
23258 template< ::color::constant::yuv::reference_enum reference_number >
23259 struct bound< ::color::category::yuv_ldouble<reference_number> >
23260 	: public ::color::_internal::yuv::bound::scalar< typename ::color::trait::index< ::color::category::yuv_ldouble<reference_number> >::instance_type, long double > {
23261 };
23262 
23263 }
23264 }
23265 
23266 namespace color {
23267 namespace trait {
23268 
23269 template< ::color::constant::yuv::reference_enum reference_number >
23270 struct bound< ::color::category::yuv_uint8<reference_number> >
23271 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::yuv_uint8<reference_number> >::instance_type > {
23272 };
23273 
23274 template< ::color::constant::yuv::reference_enum reference_number >
23275 struct bound< ::color::category::yuv_uint16<reference_number> >
23276 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::yuv_uint16<reference_number> >::instance_type > {
23277 };
23278 
23279 template< ::color::constant::yuv::reference_enum reference_number >
23280 struct bound< ::color::category::yuv_uint32<reference_number> >
23281 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::yuv_uint32<reference_number> >::instance_type > {
23282 };
23283 
23284 template< ::color::constant::yuv::reference_enum reference_number >
23285 struct bound< ::color::category::yuv_uint64< reference_number> >
23286 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::yuv_uint64<reference_number> >::instance_type > {
23287 };
23288 
23289 }
23290 }
23291 
23292 namespace color {
23293 namespace trait {
23294 
23295 template< ::color::constant::yuv::reference_enum reference_number >
23296 struct component< ::color::category::yuv_float<reference_number> >
23297 	: public ::color::_internal::utility::component::array< float > {
23298 };
23299 
23300 template< ::color::constant::yuv::reference_enum reference_number >
23301 struct component< ::color::category::yuv_double<reference_number> >
23302 	: public ::color::_internal::utility::component::array< double > {
23303 };
23304 
23305 template< ::color::constant::yuv::reference_enum reference_number >
23306 struct component< ::color::category::yuv_ldouble<reference_number> >
23307 	: public ::color::_internal::utility::component::array< long double > {
23308 };
23309 
23310 }
23311 }
23312 
23313 namespace color {
23314 namespace trait {
23315 
23316 template< ::color::constant::yuv::reference_enum reference_number >
23317 struct component< ::color::category::yuv_uint8< reference_number > >
23318 	: public ::color::_internal::utility::component::array< std::uint8_t > {
23319 };
23320 
23321 template< ::color::constant::yuv::reference_enum reference_number >
23322 struct component< ::color::category::yuv_uint16<reference_number> >
23323 	: public ::color::_internal::utility::component::array< std::uint16_t > {
23324 };
23325 
23326 template< ::color::constant::yuv::reference_enum reference_number >
23327 struct component< ::color::category::yuv_uint32<reference_number> >
23328 	: public ::color::_internal::utility::component::array< std::uint32_t > {
23329 };
23330 
23331 template< ::color::constant::yuv::reference_enum reference_number >
23332 struct component< ::color::category::yuv_uint64<reference_number> >
23333 	: public ::color::_internal::utility::component::array< std::uint64_t > {
23334 };
23335 
23336 }
23337 }
23338 
23339 namespace color {
23340 namespace trait {
23341 
23342 template< ::color::constant::yuv::reference_enum reference_number >
23343 struct container< ::color::category::yuv_float< reference_number > >
23344 	: public ::color::_internal::utility::container::array< float, 3 > {
23345 };
23346 
23347 template< ::color::constant::yuv::reference_enum reference_number >
23348 struct container< ::color::category::yuv_double<reference_number> >
23349 	: public ::color::_internal::utility::container::array< double, 3 > {
23350 };
23351 
23352 template< ::color::constant::yuv::reference_enum reference_number >
23353 struct container< ::color::category::yuv_ldouble<reference_number> >
23354 	: public ::color::_internal::utility::container::array< long double, 3 > {
23355 };
23356 
23357 }
23358 }
23359 
23360 namespace color {
23361 namespace trait {
23362 
23363 template< ::color::constant::yuv::reference_enum reference_number >
23364 struct container< ::color::category::yuv_uint8<reference_number> >
23365 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
23366 };
23367 
23368 template< ::color::constant::yuv::reference_enum reference_number >
23369 struct container< ::color::category::yuv_uint16<reference_number> >
23370 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
23371 };
23372 
23373 template< ::color::constant::yuv::reference_enum reference_number >
23374 struct container< ::color::category::yuv_uint32< reference_number> >
23375 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
23376 };
23377 
23378 template< ::color::constant::yuv::reference_enum reference_number >
23379 struct container< ::color::category::yuv_uint64< reference_number > >
23380 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
23381 };
23382 
23383 }
23384 }
23385 
23386 namespace color {
23387 namespace constant {
23388 namespace yuv {
23389 
23390 namespace _internal {
23391 
23392 template< typename scalar_name, ::color::constant::yuv::reference_enum reference_number = ::color::constant::yuv::error_entity >
23393 struct base {
23394 	typedef scalar_name scalar_type;
Wrcolor::constant::yuv::_internal::base23395 	static scalar_type const Wr() {
23396 		return 0;
23397 	}
Wbcolor::constant::yuv::_internal::base23398 	static scalar_type const Wb() {
23399 		return 0;
23400 	}
Wgcolor::constant::yuv::_internal::base23401 	static scalar_type const Wg() {
23402 		return 0;
23403 	}
Umaxcolor::constant::yuv::_internal::base23404 	static scalar_type const Umax() {
23405 		return 0;
23406 	}
Vmaxcolor::constant::yuv::_internal::base23407 	static scalar_type const Vmax() {
23408 		return 0;
23409 	}
23410 };
23411 
23412 template< typename scalar_name >
23413 struct base< scalar_name, ::color::constant::yuv::BT_601_entity > {
23414 	typedef scalar_name scalar_type;
23415 	typedef ::color::constant::yuv::_internal::base< scalar_name, ::color::constant::yuv::BT_601_entity > this_type;
23416 
Wrcolor::constant::yuv::_internal::base23417 	static scalar_type const Wr() {
23418 		return 0.2988390;
23419 	}
Wbcolor::constant::yuv::_internal::base23420 	static scalar_type const Wb() {
23421 		return 0.1143500;
23422 	}
Wgcolor::constant::yuv::_internal::base23423 	static scalar_type const Wg() {
23424 		return 1 - this_type::Wr() - this_type::Wb();
23425 	}
Umaxcolor::constant::yuv::_internal::base23426 	static scalar_type const Umax() {
23427 		return 0.436;
23428 	}
Vmaxcolor::constant::yuv::_internal::base23429 	static scalar_type const Vmax() {
23430 		return 0.615;
23431 	}
23432 };
23433 
23434 template< typename scalar_name >
23435 struct base< scalar_name, ::color::constant::yuv::BT_709_entity > {
23436 	typedef scalar_name scalar_type;
23437 	typedef ::color::constant::yuv::_internal::base< scalar_name, ::color::constant::yuv::BT_709_entity > this_type;
23438 
Wrcolor::constant::yuv::_internal::base23439 	static scalar_type const Wr() {
23440 		return 0.2126729;
23441 	}
Wbcolor::constant::yuv::_internal::base23442 	static scalar_type const Wb() {
23443 		return 0.0721750;
23444 	}
Wgcolor::constant::yuv::_internal::base23445 	static scalar_type const Wg() {
23446 		return 1 - this_type::Wr() - this_type::Wb();
23447 	}
Umaxcolor::constant::yuv::_internal::base23448 	static scalar_type const Umax() {
23449 		return 0.436;
23450 	}
Vmaxcolor::constant::yuv::_internal::base23451 	static scalar_type const Vmax() {
23452 		return 0.615;
23453 	}
23454 };
23455 }
23456 
23457 template< typename tag_name, ::color::constant::yuv::reference_enum reference_number >
23458 struct parameter
23459 	: public ::color::constant::yuv::_internal::base< typename ::color::trait::scalar< ::color::category::yuv< tag_name, reference_number > >::instance_type, reference_number > {
23460 public:
23461 	typedef ::color::category::yuv< tag_name, reference_number > category_type;
23462 
23463 	typedef typename ::color::trait::scalar< category_type >::instance_type scalar_type;
23464 
23465 	typedef ::color::constant::yuv::parameter<tag_name,reference_number> this_type;
23466 
u_mincolor::constant::yuv::parameter23467 	static scalar_type const u_min() {
23468 		return -this_type::Umax();
23469 	}
u_maxcolor::constant::yuv::parameter23470 	static scalar_type const u_max() {
23471 		return this_type::Umax();
23472 	}
u_rangecolor::constant::yuv::parameter23473 	static scalar_type const u_range() {
23474 		return 2*this_type::Umax();
23475 	}
23476 
v_mincolor::constant::yuv::parameter23477 	static scalar_type const v_min() {
23478 		return -this_type::Vmax();
23479 	}
v_maxcolor::constant::yuv::parameter23480 	static scalar_type const v_max() {
23481 		return this_type::Vmax();
23482 	}
v_rangecolor::constant::yuv::parameter23483 	static scalar_type const v_range() {
23484 		return 2*this_type::Vmax();
23485 	}
23486 
u_diversecolor::constant::yuv::parameter23487 	static scalar_type u_diverse(scalar_type const& normal) {
23488 		return this_type::u_range() * normal + this_type::u_min();
23489 	}
u_normalizecolor::constant::yuv::parameter23490 	static scalar_type u_normalize(scalar_type const& divert) {
23491 		return (divert - this_type::u_min()) /this_type::u_range();
23492 	}
23493 
v_diversecolor::constant::yuv::parameter23494 	static scalar_type v_diverse(scalar_type const& normal) {
23495 		return this_type::v_range() * normal + this_type::v_min();
23496 	}
v_normalizecolor::constant::yuv::parameter23497 	static scalar_type v_normalize(scalar_type const& divert) {
23498 		return (divert - this_type::v_min()) /this_type::v_range();
23499 	}
23500 };
23501 
23502 }
23503 }
23504 }
23505 
23506 namespace color {
23507 
23508 template< typename type_name, ::color::constant::yuv::reference_enum reference_number = ::color::constant::yuv::BT_709_entity >
23509 using yuv = ::color::model< typename ::color::category::yuv< type_name, reference_number > >;
23510 
23511 }
23512 
23513 namespace color {
23514 namespace place {
23515 namespace _internal {
23516 
23517 template< typename tag_name, ::color::constant::yuv::reference_enum reference_number >
23518 struct luma< ::color::category::yuv< tag_name, reference_number > > {
23519 public:
23520 	typedef ::color::category::yuv< tag_name, reference_number > category_type;
23521 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
23522 
23523 	enum { position_enum = 0 };
23524 	enum { has_enum = true };
23525 
positioncolor::place::_internal::luma23526 	static index_instance_type position() {
23527 		return position_enum;
23528 	}
23529 };
23530 
23531 }
23532 }
23533 }
23534 
23535 namespace color {
23536 namespace get {
23537 
23538 template< typename tag_name, ::color::constant::yuv::reference_enum reference_number >
23539 inline
23540 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::yuv<tag_name,reference_number> >::akin_type >::return_type
gray(::color::model<::color::category::yuv<tag_name,reference_number>> const & color_parameter)23541 gray(::color::model< ::color::category::yuv<tag_name, reference_number> > const& color_parameter) {
23542 	typedef ::color::category::yuv< tag_name, reference_number > category_type;
23543 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
23544 	typedef ::color::_internal::reformat< akin_type, category_type > reformat_type;
23545 	enum { luma_p = ::color::place::_internal::luma<category_type>::position_enum };
23546 	return reformat_type::template process<0,luma_p>(color_parameter.template get<luma_p>());
23547 }
23548 
23549 }
23550 }
23551 
23552 namespace color {
23553 namespace get {
23554 
23555 template< typename tag_name, ::color::constant::yuv::reference_enum reference_number >
23556 inline
23557 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::yuv<tag_name,reference_number> >::akin_type >::return_type
red(::color::model<::color::category::yuv<tag_name,reference_number>> const & color_parameter)23558 red(::color::model< ::color::category::yuv<tag_name,reference_number> > const& color_parameter) {
23559 	typedef ::color::category::yuv< tag_name, reference_number > category_type;
23560 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
23561 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
23562 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
23563 	typedef ::color::_internal::diverse< akin_type > diverse_type;
23564 	typedef ::color::_internal::normalize<category_type> normalize_type;
23565 	typedef ::color::constant::yuv::parameter< tag_name, reference_number > yuv_parameter_type;
23566 	static scalar_type const Wr = yuv_parameter_type::Wr();
23567 	static scalar_type const Vmax = yuv_parameter_type::Vmax();
23568 	static scalar_type const b11 = 1, b12 = 0, b13 = (1 - Wr) / Vmax;
23569 	scalar_type y = normalize_type::template process<0>(color_parameter.template get<0>());
23570 	scalar_type v = normalize_type::template process<2>(color_parameter.template get<2>());
23571 	v = (v - scalar_type(0.5)) * scalar_type(2) * Vmax;
23572 	scalar_type r = y + v * b13;
23573 	return diverse_type::template process<red_p>(r);
23574 }
23575 
23576 }
23577 }
23578 
23579 namespace color {
23580 namespace get {
23581 
23582 template< typename tag_name, ::color::constant::yuv::reference_enum reference_number >
23583 inline
23584 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::yuv<tag_name,reference_number> >::akin_type >::return_type
green(::color::model<::color::category::yuv<tag_name,reference_number>> const & color_parameter)23585 green(::color::model< ::color::category::yuv<tag_name, reference_number> > const& color_parameter) {
23586 	typedef ::color::category::yuv<tag_name, reference_number> category_type;
23587 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
23588 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
23589 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
23590 	typedef ::color::_internal::diverse< akin_type > diverse_type;
23591 	typedef ::color::_internal::normalize<category_type> normalize_type;
23592 	typedef ::color::constant::yuv::parameter< tag_name, reference_number > yuv_parameter_type;
23593 	static scalar_type const Wr = yuv_parameter_type::Wr();
23594 	static scalar_type const Wb = yuv_parameter_type::Wb();
23595 	static scalar_type const Wg = yuv_parameter_type::Wg();
23596 	static scalar_type const Umax = yuv_parameter_type::Umax();
23597 	static scalar_type const Vmax = yuv_parameter_type::Vmax();
23598 	static scalar_type const b21 = 1, b22 = - Wb*(1 - Wb) / Umax / Wg, b23 = -Wr*(1 - Wr) / Vmax / Wg;
23599 	scalar_type y = normalize_type::template process<0>(color_parameter.template get<0>());
23600 	scalar_type u = normalize_type::template process<1>(color_parameter.template get<1>());
23601 	scalar_type v = normalize_type::template process<2>(color_parameter.template get<2>());
23602 	u = (u - scalar_type(0.5)) * scalar_type(2) * Umax;
23603 	v = (v - scalar_type(0.5)) * scalar_type(2) * Vmax;
23604 	scalar_type g = y + u * b22 + v * b23;
23605 	return diverse_type::template process<green_p>(g);
23606 }
23607 
23608 }
23609 }
23610 
23611 namespace color {
23612 namespace get {
23613 
23614 template< typename tag_name, ::color::constant::yuv::reference_enum reference_number >
23615 inline
23616 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::yuv<tag_name,reference_number> >::akin_type >::return_type
blue(::color::model<::color::category::yuv<tag_name,reference_number>> const & color_parameter)23617 blue(::color::model< ::color::category::yuv<tag_name,reference_number> > const& color_parameter) {
23618 	typedef ::color::category::yuv<tag_name,reference_number> category_type;
23619 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
23620 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
23621 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
23622 	typedef ::color::_internal::diverse< akin_type > diverse_type;
23623 	typedef ::color::_internal::normalize<category_type> normalize_type;
23624 	typedef ::color::constant::yuv::parameter< tag_name,reference_number > yuv_parameter_type;
23625 	static scalar_type const Wb = yuv_parameter_type::Wb();
23626 	static scalar_type const Umax = yuv_parameter_type::Umax();
23627 	static scalar_type const b31 = 1, b32 = ((1 - Wb) / Umax), b33 = 0;
23628 	scalar_type y = normalize_type::template process<0>(color_parameter.template get<0>());
23629 	scalar_type u = normalize_type::template process<1>(color_parameter.template get<1>());
23630 	u = (u - scalar_type(0.5)) * scalar_type(2) * Umax;
23631 	scalar_type b = y + u * b32;
23632 	return diverse_type::template process<blue_p>(b);
23633 }
23634 
23635 }
23636 }
23637 
23638 namespace color {
23639 namespace set {
23640 
23641 template< typename tag_name, ::color::constant::yuv::reference_enum reference_number >
23642 inline
23643 void
blue(::color::model<::color::category::yuv<tag_name,reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::yuv<tag_name,reference_number>>::akin_type>::model_type component_parameter)23644 blue
23645 (
23646 	::color::model< ::color::category::yuv< tag_name, reference_number > > & color_parameter
23647 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::yuv< tag_name,reference_number > >::akin_type >::model_type component_parameter
23648 ) {
23649 	typedef ::color::category::yuv< tag_name, reference_number > category_type;
23650 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
23651 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
23652 	::color::model< akin_type > rgb_instance(color_parameter);
23653 	rgb_instance.template set<blue_p > (component_parameter);
23654 	color_parameter = rgb_instance;
23655 }
23656 
23657 }
23658 }
23659 
23660 namespace color {
23661 namespace set {
23662 
23663 template< typename tag_name, ::color::constant::yuv::reference_enum reference_number >
23664 inline
23665 void
green(::color::model<::color::category::yuv<tag_name,reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::yuv<tag_name,reference_number>>::akin_type>::model_type component_parameter)23666 green
23667 (
23668 	::color::model< ::color::category::yuv< tag_name, reference_number > > & color_parameter
23669 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::yuv< tag_name, reference_number > >::akin_type >::model_type component_parameter
23670 ) {
23671 	typedef ::color::category::yuv< tag_name, reference_number > category_type;
23672 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
23673 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
23674 	::color::model< akin_type > rgb(color_parameter);
23675 	rgb.template set< green_p > (component_parameter);
23676 	color_parameter = rgb;
23677 }
23678 
23679 }
23680 }
23681 
23682 namespace color {
23683 namespace set {
23684 
23685 template< typename tag_name, ::color::constant::yuv::reference_enum reference_number >
23686 inline
23687 void
red(::color::model<::color::category::yuv<tag_name,reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::yuv<tag_name,reference_number>>::akin_type>::model_type component_parameter)23688 red
23689 (
23690 	::color::model< ::color::category::yuv< tag_name,reference_number > > & color_parameter
23691 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::yuv< tag_name,reference_number > >::akin_type >::model_type component_parameter
23692 ) {
23693 	typedef ::color::category::yuv< tag_name,reference_number > category_type;
23694 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
23695 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
23696 	::color::model< akin_type > rgb(color_parameter);
23697 	rgb.template set<red_p> (component_parameter);
23698 	color_parameter = rgb;
23699 }
23700 
23701 }
23702 }
23703 
23704 namespace color {
23705 namespace set {
23706 
23707 template< typename tag_name, ::color::constant::yuv::reference_enum reference_number >
23708 inline
23709 void
gray(::color::model<::color::category::yuv<tag_name,reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::yuv<tag_name,reference_number>>::akin_type>::model_type component_parameter)23710 gray
23711 (
23712 	::color::model< ::color::category::yuv< tag_name, reference_number > > & color_parameter
23713 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::yuv< tag_name, reference_number > >::akin_type >::model_type component_parameter
23714 ) {
23715 	typedef ::color::category::yuv< tag_name, reference_number > category_type;
23716 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
23717 	typedef ::color::_internal::reformat< category_type, akin_type > reformat_type;
23718 	color_parameter.template set<0>(reformat_type::template process<0,0>(component_parameter));
23719 }
23720 
23721 }
23722 }
23723 
23724 namespace color {
23725 namespace _internal {
23726 
23727 template
23728 <
23729 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
23730 	,typename gray_tag_name
23731 	>
23732 struct convert
23733 	<
23734 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
23735 	,::color::category::gray< gray_tag_name >
23736 	> {
23737 public:
23738 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > category_left_type;
23739 	typedef ::color::category::gray< gray_tag_name > category_right_type;
23740 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
23741 
23742 	typedef ::color::trait::bound<category_left_type> bound_left_trait_type;
23743 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
23744 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
23745 
23746 	typedef typename container_left_trait_type::input_type container_left_input_type;
23747 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
23748 
23749 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
23750 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
23751 
processcolor::_internal::convert23752 	static void process
23753 	(
23754 		container_left_input_type left
23755 		,container_right_const_input_type right
23756 	) {
23757 		scalar_type g = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
23758 		auto y = diverse_type::template process<0>(g);
23759 		static auto const u = diverse_type::template process<1>(0.5);
23760 		static auto const v = diverse_type::template process<2>(0.5);
23761 		container_left_trait_type::template set<0>(left, y);
23762 		container_left_trait_type::template set<1>(left, u);
23763 		container_left_trait_type::template set<2>(left, v);
23764 	}
23765 };
23766 
23767 }
23768 }
23769 
23770 namespace color {
23771 namespace _internal {
23772 
23773 template
23774 <
23775 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
23776 	,typename cmy_tag_name
23777 	>
23778 struct convert
23779 	<
23780 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
23781 	,::color::category::cmy< cmy_tag_name >
23782 	> {
23783 public:
23784 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > category_left_type;
23785 	typedef ::color::category::cmy< cmy_tag_name > category_right_type;
23786 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
23787 
23788 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
23789 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
23790 
23791 	typedef typename container_left_trait_type::input_type container_left_input_type;
23792 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
23793 
23794 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
23795 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
23796 
23797 	typedef ::color::constant::yuv::parameter< yuv_tag_name, yuv_reference_number > yuv_parameter_type;
23798 
23799 	enum {
23800 		cyan_p = ::color::place::_internal::cyan<category_right_type>::position_enum
23801 		,magenta_p = ::color::place::_internal::magenta<category_right_type>::position_enum
23802 		,yellow_p = ::color::place::_internal::yellow<category_right_type>::position_enum
23803 	};
23804 
processcolor::_internal::convert23805 	static void process
23806 	(
23807 		container_left_input_type left
23808 		,container_right_const_input_type right
23809 	) {
23810 		static scalar_type const Wr = yuv_parameter_type::Wr();
23811 		static scalar_type const Wb = yuv_parameter_type::Wb();
23812 		static scalar_type const Wg = yuv_parameter_type::Wg();
23813 		static scalar_type const Umax = yuv_parameter_type::Umax();
23814 		static scalar_type const Vmax = yuv_parameter_type::Vmax();
23815 		scalar_type r = scalar_type(1) - normalize_type::template process<cyan_p >(container_right_trait_type::template get<cyan_p >(right));
23816 		scalar_type g = scalar_type(1) - normalize_type::template process<magenta_p >(container_right_trait_type::template get<magenta_p >(right));
23817 		scalar_type b = scalar_type(1) - normalize_type::template process<yellow_p >(container_right_trait_type::template get<yellow_p >(right));
23818 		scalar_type y = Wr * r + Wg * g + Wb * b;
23819 		scalar_type u = ((b - y) / (1 - Wb) + scalar_type(1)) / scalar_type(2);
23820 		scalar_type v = ((r - y) / (1 - Wr) + scalar_type(1)) / scalar_type(2);
23821 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(y));
23822 		container_left_trait_type::template set<1>(left, diverse_type::template process<1>(u));
23823 		container_left_trait_type::template set<2>(left, diverse_type::template process<2>(v));
23824 	}
23825 };
23826 
23827 }
23828 }
23829 
23830 namespace color {
23831 namespace _internal {
23832 
23833 template
23834 <
23835 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
23836 	,typename cmyk_tag_name
23837 	>
23838 struct convert
23839 	<
23840 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
23841 	,::color::category::cmyk< cmyk_tag_name >
23842 	> {
23843 public:
23844 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
23845 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
23846 
23847 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
23848 
23849 	typedef ::color::model< yuv_category_type > yuv_model_type;
23850 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
23851 
23852 	typedef ::color::rgb< scalar_type > rgb_model_type;
23853 
23854 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
23855 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
23856 
23857 	typedef typename container_left_trait_type::input_type container_left_input_type;
23858 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
23859 
processcolor::_internal::convert23860 	static void process
23861 	(
23862 		container_left_input_type left
23863 		,container_right_const_input_type right
23864 	) {
23865 		left = yuv_model_type(rgb_model_type(cmyk_model_type(right))).container();
23866 	}
23867 };
23868 
23869 }
23870 }
23871 
23872 namespace color {
23873 namespace _internal {
23874 
23875 template
23876 <
23877 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
23878 	,typename hsl_tag_name
23879 	>
23880 struct convert
23881 	<
23882 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
23883 	,::color::category::hsl< hsl_tag_name >
23884 	> {
23885 public:
23886 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
23887 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
23888 
23889 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
23890 
23891 	typedef ::color::model< yuv_category_type > yuv_model_type;
23892 	typedef ::color::model< hsl_category_type > hsl_model_type;
23893 
23894 	typedef ::color::rgb< scalar_type > rgb_model_type;
23895 
23896 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
23897 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
23898 
23899 	typedef typename container_left_trait_type::input_type container_left_input_type;
23900 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
23901 
processcolor::_internal::convert23902 	static void process
23903 	(
23904 		container_left_input_type left
23905 		,container_right_const_input_type right
23906 	) {
23907 		left = yuv_model_type(rgb_model_type(hsl_model_type(right))).container();
23908 	}
23909 };
23910 
23911 }
23912 }
23913 
23914 namespace color {
23915 namespace _internal {
23916 
23917 template
23918 <
23919 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
23920 	,typename hsv_tag_name
23921 	>
23922 struct convert
23923 	<
23924 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
23925 	,::color::category::hsv< hsv_tag_name >
23926 	> {
23927 public:
23928 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
23929 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
23930 
23931 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
23932 
23933 	typedef ::color::model< yuv_category_type > yuv_model_type;
23934 	typedef ::color::model< hsv_category_type > hsv_model_type;
23935 
23936 	typedef ::color::rgb< scalar_type > rgb_model_type;
23937 
23938 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
23939 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
23940 
23941 	typedef typename container_left_trait_type::input_type container_left_input_type;
23942 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
23943 
processcolor::_internal::convert23944 	static void process
23945 	(
23946 		container_left_input_type left
23947 		,container_right_const_input_type right
23948 	) {
23949 		left = yuv_model_type(rgb_model_type(hsv_model_type(right))).container();
23950 	}
23951 };
23952 
23953 }
23954 }
23955 
23956 namespace color {
23957 namespace _internal {
23958 
23959 template
23960 <
23961 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
23962 	,typename hsi_tag_name
23963 	>
23964 struct convert
23965 	<
23966 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
23967 	,::color::category::hsi< hsi_tag_name >
23968 	> {
23969 public:
23970 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
23971 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
23972 
23973 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
23974 
23975 	typedef ::color::model< yuv_category_type > yuv_model_type;
23976 	typedef ::color::model< hsi_category_type > hsi_model_type;
23977 
23978 	typedef ::color::rgb< scalar_type > rgb_model_type;
23979 
23980 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
23981 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
23982 
23983 	typedef typename container_left_trait_type::input_type container_left_input_type;
23984 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
23985 
processcolor::_internal::convert23986 	static void process
23987 	(
23988 		container_left_input_type left
23989 		,container_right_const_input_type right
23990 	) {
23991 		left = yuv_model_type(rgb_model_type(hsi_model_type(right))).container();
23992 	}
23993 };
23994 
23995 }
23996 }
23997 
23998 namespace color {
23999 namespace _internal {
24000 
24001 template
24002 <
24003 	typename yuv_tag_name, ::color::constant::yuv::reference_enum reference_number
24004 	,typename hwb_tag_name
24005 	>
24006 struct convert
24007 	<
24008 	::color::category::yuv< yuv_tag_name, reference_number >
24009 	,::color::category::hwb< hwb_tag_name >
24010 	> {
24011 public:
24012 	typedef ::color::category::yuv< yuv_tag_name, reference_number > yuv_category_type, category_left_type;
24013 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
24014 
24015 	typedef typename ::color::trait::scalar< yuv_category_type >::instance_type scalar_type;
24016 
24017 	typedef ::color::model< yuv_category_type > yuv_model_type;
24018 	typedef ::color::model< hwb_category_type > hwb_model_type;
24019 
24020 	typedef ::color::rgb< scalar_type > rgb_model_type;
24021 	typedef ::color::hsv< scalar_type > hsv_model_type;
24022 
24023 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
24024 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
24025 
24026 	typedef typename container_left_trait_type::input_type container_left_input_type;
24027 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
24028 
processcolor::_internal::convert24029 	static void process
24030 	(
24031 		container_left_input_type left
24032 		,container_right_const_input_type right
24033 	) {
24034 		left = yuv_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right)))).container();
24035 	}
24036 };
24037 
24038 }
24039 }
24040 
24041 namespace color {
24042 namespace _internal {
24043 
24044 template
24045 <
24046 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
24047 	,typename rgb_tag_name
24048 	>
24049 struct convert
24050 	<
24051 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
24052 	,::color::category::rgb< rgb_tag_name >
24053 	> {
24054 public:
24055 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > category_left_type;
24056 	typedef ::color::category::rgb< rgb_tag_name > category_right_type;
24057 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
24058 
24059 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
24060 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
24061 
24062 	typedef typename container_left_trait_type::input_type container_left_input_type;
24063 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
24064 
24065 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
24066 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
24067 
24068 	typedef ::color::constant::yuv::parameter< yuv_tag_name, yuv_reference_number > yuv_parameter_type;
24069 
processcolor::_internal::convert24070 	static void process
24071 	(
24072 		container_left_input_type left
24073 		,container_right_const_input_type right
24074 	) {
24075 		enum {
24076 			red_p = ::color::place::_internal::red<category_right_type>::position_enum
24077 			,green_p = ::color::place::_internal::green<category_right_type>::position_enum
24078 			,blue_p = ::color::place::_internal::blue<category_right_type>::position_enum
24079 		};
24080 		static scalar_type const Wr = yuv_parameter_type::Wr();
24081 		static scalar_type const Wb = yuv_parameter_type::Wb();
24082 		static scalar_type const Wg = yuv_parameter_type::Wg();
24083 		static scalar_type const Umax = yuv_parameter_type::Umax();
24084 		static scalar_type const Vmax = yuv_parameter_type::Vmax();
24085 		scalar_type r = normalize_type::template process<red_p >(container_right_trait_type::template get<red_p >(right));
24086 		scalar_type g = normalize_type::template process<green_p>(container_right_trait_type::template get<green_p>(right));
24087 		scalar_type b = normalize_type::template process<blue_p >(container_right_trait_type::template get<blue_p >(right));
24088 		scalar_type y = Wr * r + Wg * g + Wb * b;
24089 		scalar_type u = ((b - y) / (1 - Wb) + scalar_type(1)) / scalar_type(2);
24090 		scalar_type v = ((r - y) / (1 - Wr) + scalar_type(1)) / scalar_type(2);
24091 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(y));
24092 		container_left_trait_type::template set<1>(left, diverse_type::template process<1>(u));
24093 		container_left_trait_type::template set<2>(left, diverse_type::template process<2>(v));
24094 	}
24095 };
24096 
24097 }
24098 }
24099 
24100 namespace color {
24101 namespace _internal {
24102 
24103 template
24104 <
24105 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
24106 	,typename yiq_tag_name
24107 	>
24108 struct convert
24109 	<
24110 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
24111 	,::color::category::yiq< yiq_tag_name >
24112 	> {
24113 public:
24114 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
24115 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
24116 
24117 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
24118 
24119 	typedef ::color::model< yuv_category_type > yuv_model_type;
24120 	typedef ::color::model< yiq_category_type > yiq_model_type;
24121 
24122 	typedef ::color::rgb< scalar_type > rgb_model_type;
24123 
24124 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
24125 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
24126 
24127 	typedef typename container_left_trait_type::input_type container_left_input_type;
24128 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
24129 
processcolor::_internal::convert24130 	static void process
24131 	(
24132 		container_left_input_type left
24133 		,container_right_const_input_type right
24134 	) {
24135 		left = yuv_model_type(rgb_model_type(yiq_model_type(right))).container();
24136 	}
24137 };
24138 
24139 template
24140 <
24141 	typename yuv_tag_name
24142 	,typename yiq_tag_name
24143 	>
24144 struct convert
24145 	<
24146 	::color::category::yuv< yuv_tag_name, ::color::constant::yuv::BT_601_entity >
24147 	,::color::category::yiq< yiq_tag_name >
24148 	> {
24149 public:
24150 	typedef ::color::category::yuv< yuv_tag_name, ::color::constant::yuv::BT_601_entity > yuv_category_type, category_left_type;
24151 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
24152 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
24153 
24154 	typedef ::color::yuv< scalar_type, ::color::constant::yuv::BT_601_entity> yuv_scalar_type;
24155 	typedef ::color::yiq< scalar_type > yiq_scalar_type;
24156 
24157 	typedef typename yuv_scalar_type::category_type yuv_scalar_category_type;
24158 	typedef typename yiq_scalar_type::category_type yiq_scalar_category_type;
24159 
24160 	typedef ::color::model< yuv_category_type > yuv_model_type;
24161 	typedef ::color::model< yiq_category_type > yiq_model_type;
24162 
24163 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
24164 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
24165 
24166 	typedef ::color::trait::component<category_left_type> component_left_trait_type;
24167 	typedef ::color::trait::component<category_right_type> component_right_trait_type;
24168 
24169 	typedef typename container_left_trait_type::input_type container_left_input_type;
24170 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
24171 
24172 	typedef ::color::_internal::reformat< category_left_type, yuv_scalar_category_type > reformat_yuv_type;
24173 	typedef ::color::_internal::reformat< yiq_scalar_category_type, category_right_type > reformat_yiq_type;
24174 
24175 	typedef ::color::constant::generic< category_left_type > constant_type;
24176 
24177 	enum {
24178 		luma_p = ::color::place::_internal::luma<category_right_type>::position_enum
24179 		, inphase_p = ::color::place::_internal::inphase<category_right_type>::position_enum
24180 		,quadrature_p = ::color::place::_internal::quadrature<category_right_type>::position_enum
24181 	};
24182 
processcolor::_internal::convert24183 	static void process
24184 	(
24185 		container_left_input_type left
24186 		,container_right_const_input_type right
24187 	) {
24188 		static scalar_type sin_33 = sin(33 * constant_type::deg2rad());
24189 		static scalar_type cos_33 = cos(33 * constant_type::deg2rad());
24190 		scalar_type y = reformat_yiq_type::template process<0, luma_p>(container_right_trait_type::template get< luma_p>(right));
24191 		scalar_type i = reformat_yiq_type::template process<1, inphase_p>(container_right_trait_type::template get< inphase_p>(right));
24192 		scalar_type q = reformat_yiq_type::template process<2,quadrature_p>(container_right_trait_type::template get<quadrature_p>(right));
24193 		y = y;
24194 		scalar_type u = - i * sin_33 + q * cos_33;
24195 		scalar_type v = i * cos_33 + q * sin_33;
24196 		container_left_trait_type::template set<0>(left, reformat_yuv_type::template process<0,0>(y));
24197 		container_left_trait_type::template set<1>(left, reformat_yuv_type::template process<1,1>(u));
24198 		container_left_trait_type::template set<2>(left, reformat_yuv_type::template process<2,2>(v));
24199 	}
24200 };
24201 
24202 }
24203 }
24204 namespace color {
24205 namespace _internal {
24206 
24207 template
24208 <
24209 	typename tag_left_name, ::color::constant::yuv::reference_enum left_reference_number
24210 	,typename tag_right_name, ::color::constant::yuv::reference_enum right_reference_number
24211 	>
24212 struct convert
24213 	<
24214 	::color::category::yuv< tag_left_name, left_reference_number >
24215 	,::color::category::yuv< tag_right_name, right_reference_number >
24216 	> {
24217 public:
24218 	typedef ::color::category::yuv< tag_left_name, left_reference_number > category_left_type;
24219 	typedef ::color::category::yuv< tag_right_name, right_reference_number > category_right_type;
24220 
24221 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
24222 
24223 	typedef ::color::model< category_left_type > left_model_type;
24224 	typedef ::color::model< category_right_type > right_model_type;
24225 
24226 	typedef ::color::rgb< scalar_type > rgb_model_type;
24227 
24228 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
24229 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
24230 
24231 	typedef typename container_left_trait_type::input_type container_left_input_type;
24232 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
24233 
processcolor::_internal::convert24234 	static void process
24235 	(
24236 		container_left_input_type left
24237 		,container_right_const_input_type right
24238 	) {
24239 		left = left_model_type(rgb_model_type(right_model_type(right))).container();
24240 	}
24241 };
24242 
24243 template
24244 <
24245 	typename ::color::constant::yuv::reference_enum reference_number
24246 	,typename tag_left_name
24247 	,typename tag_right_name
24248 	>
24249 struct convert
24250 	<
24251 	::color::category::yuv< tag_left_name, reference_number >
24252 	,::color::category::yuv< tag_right_name, reference_number >
24253 	> {
24254 public:
24255 	typedef ::color::category::yuv< tag_left_name, reference_number > category_left_type;
24256 	typedef ::color::category::yuv< tag_right_name, reference_number > category_right_type;
24257 
24258 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
24259 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
24260 
24261 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
24262 
24263 	typedef typename container_left_trait_type::input_type container_left_input_type;
24264 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
24265 
processcolor::_internal::convert24266 	static void process
24267 	(
24268 		container_left_input_type left
24269 		,container_right_const_input_type right
24270 	) {
24271 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
24272 		container_left_trait_type::template set<1>(left, reformat_type::template process<1,1>(container_right_trait_type::template get<1>(right)));
24273 		container_left_trait_type::template set<2>(left, reformat_type::template process<2,2>(container_right_trait_type::template get<2>(right)));
24274 	}
24275 };
24276 
24277 }
24278 }
24279 
24280 namespace color {
24281 namespace akin {
24282 
24283 template< >struct YCgCo< ::color::category::gray_uint8 > {
24284 	typedef ::color::category::YCgCo_uint8 akin_type;
24285 };
24286 template< >struct YCgCo< ::color::category::gray_uint16 > {
24287 	typedef ::color::category::YCgCo_uint16 akin_type;
24288 };
24289 template< >struct YCgCo< ::color::category::gray_uint32 > {
24290 	typedef ::color::category::YCgCo_uint32 akin_type;
24291 };
24292 template< >struct YCgCo< ::color::category::gray_uint64 > {
24293 	typedef ::color::category::YCgCo_uint64 akin_type;
24294 };
24295 template< >struct YCgCo< ::color::category::gray_float > {
24296 	typedef ::color::category::YCgCo_float akin_type;
24297 };
24298 template< >struct YCgCo< ::color::category::gray_double > {
24299 	typedef ::color::category::YCgCo_double akin_type;
24300 };
24301 template< >struct YCgCo< ::color::category::gray_ldouble > {
24302 	typedef ::color::category::YCgCo_ldouble akin_type;
24303 };
24304 
24305 }
24306 }
24307 
24308 namespace color {
24309 namespace akin {
24310 
24311 template< >struct YCgCo< ::color::category::cmy_uint8 > {
24312 	typedef ::color::category::YCgCo_uint8 akin_type;
24313 };
24314 template< >struct YCgCo< ::color::category::cmy_uint16 > {
24315 	typedef ::color::category::YCgCo_uint16 akin_type;
24316 };
24317 template< >struct YCgCo< ::color::category::cmy_uint32 > {
24318 	typedef ::color::category::YCgCo_uint32 akin_type;
24319 };
24320 template< >struct YCgCo< ::color::category::cmy_uint64 > {
24321 	typedef ::color::category::YCgCo_uint64 akin_type;
24322 };
24323 template< >struct YCgCo< ::color::category::cmy_float > {
24324 	typedef ::color::category::YCgCo_float akin_type;
24325 };
24326 template< >struct YCgCo< ::color::category::cmy_double > {
24327 	typedef ::color::category::YCgCo_double akin_type;
24328 };
24329 template< >struct YCgCo< ::color::category::cmy_ldouble > {
24330 	typedef ::color::category::YCgCo_ldouble akin_type;
24331 };
24332 
24333 }
24334 }
24335 
24336 namespace color {
24337 namespace akin {
24338 
24339 template< >struct YCgCo< ::color::category::cmyk_uint8 > {
24340 	typedef ::color::category::YCgCo_uint8 akin_type;
24341 };
24342 template< >struct YCgCo< ::color::category::cmyk_uint16 > {
24343 	typedef ::color::category::YCgCo_uint16 akin_type;
24344 };
24345 template< >struct YCgCo< ::color::category::cmyk_uint32 > {
24346 	typedef ::color::category::YCgCo_uint32 akin_type;
24347 };
24348 template< >struct YCgCo< ::color::category::cmyk_uint64 > {
24349 	typedef ::color::category::YCgCo_uint64 akin_type;
24350 };
24351 template< >struct YCgCo< ::color::category::cmyk_float > {
24352 	typedef ::color::category::YCgCo_float akin_type;
24353 };
24354 template< >struct YCgCo< ::color::category::cmyk_double > {
24355 	typedef ::color::category::YCgCo_double akin_type;
24356 };
24357 template< >struct YCgCo< ::color::category::cmyk_ldouble > {
24358 	typedef ::color::category::YCgCo_ldouble akin_type;
24359 };
24360 
24361 }
24362 }
24363 
24364 namespace color {
24365 namespace akin {
24366 
24367 template< >struct YCgCo< ::color::category::hsl_uint8 > {
24368 	typedef ::color::category::YCgCo_uint8 akin_type;
24369 };
24370 template< >struct YCgCo< ::color::category::hsl_uint16 > {
24371 	typedef ::color::category::YCgCo_uint16 akin_type;
24372 };
24373 template< >struct YCgCo< ::color::category::hsl_uint32 > {
24374 	typedef ::color::category::YCgCo_uint32 akin_type;
24375 };
24376 template< >struct YCgCo< ::color::category::hsl_uint64 > {
24377 	typedef ::color::category::YCgCo_uint64 akin_type;
24378 };
24379 template< >struct YCgCo< ::color::category::hsl_float > {
24380 	typedef ::color::category::YCgCo_float akin_type;
24381 };
24382 template< >struct YCgCo< ::color::category::hsl_double > {
24383 	typedef ::color::category::YCgCo_double akin_type;
24384 };
24385 template< >struct YCgCo< ::color::category::hsl_ldouble > {
24386 	typedef ::color::category::YCgCo_ldouble akin_type;
24387 };
24388 
24389 }
24390 }
24391 
24392 namespace color {
24393 namespace akin {
24394 
24395 template< >struct YCgCo< ::color::category::hsv_uint8 > {
24396 	typedef ::color::category::YCgCo_uint8 akin_type;
24397 };
24398 template< >struct YCgCo< ::color::category::hsv_uint16 > {
24399 	typedef ::color::category::YCgCo_uint16 akin_type;
24400 };
24401 template< >struct YCgCo< ::color::category::hsv_uint32 > {
24402 	typedef ::color::category::YCgCo_uint32 akin_type;
24403 };
24404 template< >struct YCgCo< ::color::category::hsv_uint64 > {
24405 	typedef ::color::category::YCgCo_uint64 akin_type;
24406 };
24407 template< >struct YCgCo< ::color::category::hsv_float > {
24408 	typedef ::color::category::YCgCo_float akin_type;
24409 };
24410 template< >struct YCgCo< ::color::category::hsv_double > {
24411 	typedef ::color::category::YCgCo_double akin_type;
24412 };
24413 template< >struct YCgCo< ::color::category::hsv_ldouble > {
24414 	typedef ::color::category::YCgCo_ldouble akin_type;
24415 };
24416 
24417 }
24418 }
24419 
24420 namespace color {
24421 namespace akin {
24422 
24423 template< >struct YCgCo< ::color::category::hsi_uint8 > {
24424 	typedef ::color::category::YCgCo_uint8 akin_type;
24425 };
24426 template< >struct YCgCo< ::color::category::hsi_uint16 > {
24427 	typedef ::color::category::YCgCo_uint16 akin_type;
24428 };
24429 template< >struct YCgCo< ::color::category::hsi_uint32 > {
24430 	typedef ::color::category::YCgCo_uint32 akin_type;
24431 };
24432 template< >struct YCgCo< ::color::category::hsi_uint64 > {
24433 	typedef ::color::category::YCgCo_uint64 akin_type;
24434 };
24435 template< >struct YCgCo< ::color::category::hsi_float > {
24436 	typedef ::color::category::YCgCo_float akin_type;
24437 };
24438 template< >struct YCgCo< ::color::category::hsi_double > {
24439 	typedef ::color::category::YCgCo_double akin_type;
24440 };
24441 template< >struct YCgCo< ::color::category::hsi_ldouble > {
24442 	typedef ::color::category::YCgCo_ldouble akin_type;
24443 };
24444 
24445 }
24446 }
24447 
24448 namespace color {
24449 namespace akin {
24450 
24451 template
24452 <
24453 	typename tag_name
24454 
24455 	>
24456 struct YCgCo< ::color::category::hwb< tag_name > > {
24457 public:
24458 	typedef ::color::category::YCgCo< tag_name > akin_type;
24459 };
24460 
24461 }
24462 }
24463 
24464 namespace color {
24465 namespace akin {
24466 
24467 template< >struct YCgCo< ::color::category::rgb_uint8 > {
24468 	typedef ::color::category::YCgCo_uint8 akin_type;
24469 };
24470 template< >struct YCgCo< ::color::category::rgb_uint16 > {
24471 	typedef ::color::category::YCgCo_uint16 akin_type;
24472 };
24473 template< >struct YCgCo< ::color::category::rgb_uint32 > {
24474 	typedef ::color::category::YCgCo_uint32 akin_type;
24475 };
24476 template< >struct YCgCo< ::color::category::rgb_uint64 > {
24477 	typedef ::color::category::YCgCo_uint64 akin_type;
24478 };
24479 template< >struct YCgCo< ::color::category::rgb_float > {
24480 	typedef ::color::category::YCgCo_float akin_type;
24481 };
24482 template< >struct YCgCo< ::color::category::rgb_double > {
24483 	typedef ::color::category::YCgCo_double akin_type;
24484 };
24485 template< >struct YCgCo< ::color::category::rgb_ldouble > {
24486 	typedef ::color::category::YCgCo_ldouble akin_type;
24487 };
24488 
24489 }
24490 }
24491 
24492 namespace color {
24493 namespace akin {
24494 
24495 template< >struct YCgCo< ::color::category::yiq_uint8 > {
24496 	typedef ::color::category::YCgCo_uint8 akin_type;
24497 };
24498 template< >struct YCgCo< ::color::category::yiq_uint16 > {
24499 	typedef ::color::category::YCgCo_uint16 akin_type;
24500 };
24501 template< >struct YCgCo< ::color::category::yiq_uint32 > {
24502 	typedef ::color::category::YCgCo_uint32 akin_type;
24503 };
24504 template< >struct YCgCo< ::color::category::yiq_uint64 > {
24505 	typedef ::color::category::YCgCo_uint64 akin_type;
24506 };
24507 template< >struct YCgCo< ::color::category::yiq_float > {
24508 	typedef ::color::category::YCgCo_float akin_type;
24509 };
24510 template< >struct YCgCo< ::color::category::yiq_double > {
24511 	typedef ::color::category::YCgCo_double akin_type;
24512 };
24513 template< >struct YCgCo< ::color::category::yiq_ldouble > {
24514 	typedef ::color::category::YCgCo_ldouble akin_type;
24515 };
24516 
24517 }
24518 }
24519 
24520 namespace color {
24521 namespace akin {
24522 
24523 template< ::color::constant::yuv::reference_enum reference_number >struct YCgCo< ::color::category::yuv_uint8 <reference_number> > {
24524 	typedef ::color::category::YCgCo_uint8 akin_type;
24525 };
24526 template< ::color::constant::yuv::reference_enum reference_number >struct YCgCo< ::color::category::yuv_uint16 <reference_number> > {
24527 	typedef ::color::category::YCgCo_uint16 akin_type;
24528 };
24529 template< ::color::constant::yuv::reference_enum reference_number >struct YCgCo< ::color::category::yuv_uint32 <reference_number> > {
24530 	typedef ::color::category::YCgCo_uint32 akin_type;
24531 };
24532 template< ::color::constant::yuv::reference_enum reference_number >struct YCgCo< ::color::category::yuv_uint64 <reference_number> > {
24533 	typedef ::color::category::YCgCo_uint64 akin_type;
24534 };
24535 template< ::color::constant::yuv::reference_enum reference_number >struct YCgCo< ::color::category::yuv_float <reference_number> > {
24536 	typedef ::color::category::YCgCo_float akin_type;
24537 };
24538 template< ::color::constant::yuv::reference_enum reference_number >struct YCgCo< ::color::category::yuv_double <reference_number> > {
24539 	typedef ::color::category::YCgCo_double akin_type;
24540 };
24541 template< ::color::constant::yuv::reference_enum reference_number >struct YCgCo< ::color::category::yuv_ldouble<reference_number> > {
24542 	typedef ::color::category::YCgCo_ldouble akin_type;
24543 };
24544 
24545 }
24546 }
24547 
24548 namespace color {
24549 namespace akin {
24550 
24551 template< typename tag_name >
24552 struct YCgCo< ::color::category::YCgCo< tag_name > > {
24553 public:
24554 	typedef ::color::category::YCgCo< tag_name > akin_type;
24555 };
24556 
24557 }
24558 }
24559 
24560 namespace color {
24561 namespace akin {
24562 
24563 template< >struct YCgCo< ::color::category::YDbDr_uint8 > {
24564 	typedef ::color::category::YCgCo_uint8 akin_type;
24565 };
24566 template< >struct YCgCo< ::color::category::YDbDr_uint16 > {
24567 	typedef ::color::category::YCgCo_uint16 akin_type;
24568 };
24569 template< >struct YCgCo< ::color::category::YDbDr_uint32 > {
24570 	typedef ::color::category::YCgCo_uint32 akin_type;
24571 };
24572 template< >struct YCgCo< ::color::category::YDbDr_uint64 > {
24573 	typedef ::color::category::YCgCo_uint64 akin_type;
24574 };
24575 template< >struct YCgCo< ::color::category::YDbDr_float > {
24576 	typedef ::color::category::YCgCo_float akin_type;
24577 };
24578 template< >struct YCgCo< ::color::category::YDbDr_double > {
24579 	typedef ::color::category::YCgCo_double akin_type;
24580 };
24581 template< >struct YCgCo< ::color::category::YDbDr_ldouble > {
24582 	typedef ::color::category::YCgCo_ldouble akin_type;
24583 };
24584 
24585 }
24586 }
24587 
24588 namespace color {
24589 namespace akin {
24590 
24591 template< ::color::constant::YPbPr::reference_enum reference_number >struct YCgCo< ::color::category::YPbPr_uint8 <reference_number> > {
24592 	typedef ::color::category::YCgCo_uint8 akin_type;
24593 };
24594 template< ::color::constant::YPbPr::reference_enum reference_number >struct YCgCo< ::color::category::YPbPr_uint16 <reference_number> > {
24595 	typedef ::color::category::YCgCo_uint16 akin_type;
24596 };
24597 template< ::color::constant::YPbPr::reference_enum reference_number >struct YCgCo< ::color::category::YPbPr_uint32 <reference_number> > {
24598 	typedef ::color::category::YCgCo_uint32 akin_type;
24599 };
24600 template< ::color::constant::YPbPr::reference_enum reference_number >struct YCgCo< ::color::category::YPbPr_uint64 <reference_number> > {
24601 	typedef ::color::category::YCgCo_uint64 akin_type;
24602 };
24603 template< ::color::constant::YPbPr::reference_enum reference_number >struct YCgCo< ::color::category::YPbPr_float <reference_number> > {
24604 	typedef ::color::category::YCgCo_float akin_type;
24605 };
24606 template< ::color::constant::YPbPr::reference_enum reference_number >struct YCgCo< ::color::category::YPbPr_double <reference_number> > {
24607 	typedef ::color::category::YCgCo_double akin_type;
24608 };
24609 template< ::color::constant::YPbPr::reference_enum reference_number >struct YCgCo< ::color::category::YPbPr_ldouble<reference_number> > {
24610 	typedef ::color::category::YCgCo_ldouble akin_type;
24611 };
24612 
24613 }
24614 }
24615 
24616 namespace color {
24617 namespace akin {
24618 
24619 template< >struct YCgCo< ::color::category::xyz_uint8 > {
24620 	typedef ::color::category::YCgCo_uint8 akin_type;
24621 };
24622 template< >struct YCgCo< ::color::category::xyz_uint16 > {
24623 	typedef ::color::category::YCgCo_uint16 akin_type;
24624 };
24625 template< >struct YCgCo< ::color::category::xyz_uint32 > {
24626 	typedef ::color::category::YCgCo_uint32 akin_type;
24627 };
24628 template< >struct YCgCo< ::color::category::xyz_uint64 > {
24629 	typedef ::color::category::YCgCo_uint64 akin_type;
24630 };
24631 template< >struct YCgCo< ::color::category::xyz_float > {
24632 	typedef ::color::category::YCgCo_float akin_type;
24633 };
24634 template< >struct YCgCo< ::color::category::xyz_double > {
24635 	typedef ::color::category::YCgCo_double akin_type;
24636 };
24637 template< >struct YCgCo< ::color::category::xyz_ldouble > {
24638 	typedef ::color::category::YCgCo_ldouble akin_type;
24639 };
24640 
24641 }
24642 }
24643 
24644 namespace color {
24645 namespace akin {
24646 
24647 template
24648 <
24649 	typename tag_name, ::color::constant::lab::reference_enum lab_reference_number
24650 	>
24651 struct YCgCo< ::color::category::lab< tag_name, lab_reference_number > > {
24652 public:
24653 	typedef ::color::category::YCgCo< tag_name > akin_type;
24654 };
24655 
24656 }
24657 }
24658 
24659 namespace color {
24660 namespace akin {
24661 
24662 template
24663 <
24664 	typename tag_name
24665 
24666 	>
24667 struct YCgCo< ::color::category::xyy< tag_name > > {
24668 public:
24669 	typedef ::color::category::YCgCo< tag_name > akin_type;
24670 };
24671 
24672 }
24673 }
24674 
24675 namespace color {
24676 namespace akin {
24677 
24678 template
24679 <
24680 	typename tag_name
24681 	,::color::constant::lms::reference_enum reference_number
24682 
24683 	>
24684 struct YCgCo< ::color::category::lms< tag_name, reference_number > > {
24685 public:
24686 	typedef ::color::category::YCgCo< tag_name > akin_type;
24687 };
24688 
24689 }
24690 }
24691 
24692 namespace color {
24693 namespace akin {
24694 
24695 template
24696 <
24697 	typename tag_name
24698 
24699 	>
24700 struct YCgCo< ::color::category::luv< tag_name > > {
24701 public:
24702 	typedef ::color::category::YCgCo< tag_name > akin_type;
24703 };
24704 
24705 }
24706 }
24707 
24708 namespace color {
24709 namespace akin {
24710 
24711 template< >struct YCgCo< ::color::category::LabCH_uint8 > {
24712 	typedef ::color::category::YCgCo_uint8 akin_type;
24713 };
24714 template< >struct YCgCo< ::color::category::LabCH_uint16 > {
24715 	typedef ::color::category::YCgCo_uint16 akin_type;
24716 };
24717 template< >struct YCgCo< ::color::category::LabCH_uint32 > {
24718 	typedef ::color::category::YCgCo_uint32 akin_type;
24719 };
24720 template< >struct YCgCo< ::color::category::LabCH_uint64 > {
24721 	typedef ::color::category::YCgCo_uint64 akin_type;
24722 };
24723 template< >struct YCgCo< ::color::category::LabCH_float > {
24724 	typedef ::color::category::YCgCo_float akin_type;
24725 };
24726 template< >struct YCgCo< ::color::category::LabCH_double > {
24727 	typedef ::color::category::YCgCo_double akin_type;
24728 };
24729 template< >struct YCgCo< ::color::category::LabCH_ldouble > {
24730 	typedef ::color::category::YCgCo_ldouble akin_type;
24731 };
24732 
24733 }
24734 }
24735 
24736 namespace color {
24737 namespace akin {
24738 
24739 template< >struct YCgCo< ::color::category::LuvCH_uint8 > {
24740 	typedef ::color::category::YCgCo_uint8 akin_type;
24741 };
24742 template< >struct YCgCo< ::color::category::LuvCH_uint16 > {
24743 	typedef ::color::category::YCgCo_uint16 akin_type;
24744 };
24745 template< >struct YCgCo< ::color::category::LuvCH_uint32 > {
24746 	typedef ::color::category::YCgCo_uint32 akin_type;
24747 };
24748 template< >struct YCgCo< ::color::category::LuvCH_uint64 > {
24749 	typedef ::color::category::YCgCo_uint64 akin_type;
24750 };
24751 template< >struct YCgCo< ::color::category::LuvCH_float > {
24752 	typedef ::color::category::YCgCo_float akin_type;
24753 };
24754 template< >struct YCgCo< ::color::category::LuvCH_double > {
24755 	typedef ::color::category::YCgCo_double akin_type;
24756 };
24757 template< >struct YCgCo< ::color::category::LuvCH_ldouble > {
24758 	typedef ::color::category::YCgCo_ldouble akin_type;
24759 };
24760 
24761 }
24762 }
24763 
24764 namespace color {
24765 namespace trait {
24766 
24767 template <> struct info< ::color::category::YCgCo_uint8 > {
24768 public:
24769 	enum { implemented_entity = true };
24770 	enum { meaningful_entity = true };
24771 };
24772 template <> struct info< ::color::category::YCgCo_uint16 > {
24773 public:
24774 	enum { implemented_entity = true };
24775 	enum { meaningful_entity = true };
24776 };
24777 template <> struct info< ::color::category::YCgCo_uint32 > {
24778 public:
24779 	enum { implemented_entity = true };
24780 	enum { meaningful_entity = true };
24781 };
24782 template <> struct info< ::color::category::YCgCo_uint64 > {
24783 public:
24784 	enum { implemented_entity = true };
24785 	enum { meaningful_entity = true };
24786 };
24787 template <> struct info< ::color::category::YCgCo_float > {
24788 public:
24789 	enum { implemented_entity = true };
24790 	enum { meaningful_entity = true };
24791 };
24792 template <> struct info< ::color::category::YCgCo_double > {
24793 public:
24794 	enum { implemented_entity = true };
24795 	enum { meaningful_entity = true };
24796 };
24797 template <> struct info< ::color::category::YCgCo_ldouble > {
24798 public:
24799 	enum { implemented_entity = true };
24800 	enum { meaningful_entity = true };
24801 };
24802 
24803 }
24804 }
24805 
24806 namespace color {
24807 namespace _internal {
24808 namespace YCgCo {
24809 namespace bound {
24810 
24811 template< typename index_name, typename scalar_name >
24812 struct scalar {
24813 public:
24814 	typedef scalar_name scalar_type;
24815 	typedef index_name index_type;
24816 
24817 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
24818 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
24819 
24820 	typedef typename trait_type::instance_type instance_type;
24821 	typedef typename trait_type::return_image_type return_image_type;
24822 
24823 	typedef typename index_trait_type::instance_type index_instance_type;
24824 	typedef typename index_trait_type::model_type index_input_const_type;
24825 
24826 	template< index_instance_type index >
maximumcolor::_internal::YCgCo::bound::scalar24827 	static return_image_type maximum() {
24828 		static const instance_type max_list[] = { 1, 0.5, 0.5 };
24829 		return max_list[index];
24830 	}
24831 
maximumcolor::_internal::YCgCo::bound::scalar24832 	static return_image_type maximum(index_input_const_type index) {
24833 		static const instance_type max_list[] = { 1, 0.5, 0.5 };
24834 		return max_list[index];
24835 	}
24836 
24837 	template< index_instance_type index >
minimumcolor::_internal::YCgCo::bound::scalar24838 	static return_image_type minimum() {
24839 		static const instance_type min_list[] = { 0, -0.5, -0.5 };
24840 		return min_list[index];
24841 	}
24842 
minimumcolor::_internal::YCgCo::bound::scalar24843 	static return_image_type minimum(index_input_const_type index) {
24844 		static const instance_type min_list[] = { 0, -0.5, -0.5 };
24845 		return min_list[index];
24846 	}
24847 
24848 	template< index_instance_type index >
rangecolor::_internal::YCgCo::bound::scalar24849 	static return_image_type range() {
24850 		static const instance_type range_list[] = { 1, 1, 1 };
24851 		return range_list[index];
24852 	}
24853 
rangecolor::_internal::YCgCo::bound::scalar24854 	static return_image_type range(index_input_const_type index) {
24855 		static const instance_type range_list[] = { 1, 1, 1 };
24856 		return range_list[index];
24857 	}
24858 };
24859 
24860 }
24861 }
24862 }
24863 }
24864 
24865 namespace color {
24866 namespace trait {
24867 
24868 template< >
24869 struct bound< ::color::category::YCgCo_float >
24870 	: public ::color::_internal::YCgCo::bound::scalar< typename ::color::trait::index< ::color::category::YCgCo_float >::instance_type, float > {
24871 };
24872 
24873 template< >
24874 struct bound< ::color::category::YCgCo_double >
24875 	: public ::color::_internal::YCgCo::bound::scalar< typename ::color::trait::index< ::color::category::YCgCo_double >::instance_type, double > {
24876 };
24877 
24878 template< >
24879 struct bound< ::color::category::YCgCo_ldouble >
24880 	: public ::color::_internal::YCgCo::bound::scalar< typename ::color::trait::index< ::color::category::YCgCo_ldouble >::instance_type, long double > {
24881 };
24882 
24883 }
24884 }
24885 
24886 namespace color {
24887 namespace trait {
24888 
24889 template< >
24890 struct bound< ::color::category::YCgCo_uint8 >
24891 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::YCgCo_uint8 >::instance_type > {
24892 };
24893 
24894 template< >
24895 struct bound< ::color::category::YCgCo_uint16 >
24896 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::YCgCo_uint16 >::instance_type > {
24897 };
24898 
24899 template< >
24900 struct bound< ::color::category::YCgCo_uint32 >
24901 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::YCgCo_uint32 >::instance_type > {
24902 };
24903 
24904 template< >
24905 struct bound< ::color::category::YCgCo_uint64 >
24906 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::YCgCo_uint64 >::instance_type > {
24907 };
24908 
24909 }
24910 }
24911 
24912 namespace color {
24913 namespace trait {
24914 
24915 template< >
24916 struct component< ::color::category::YCgCo_float >
24917 	: public ::color::_internal::utility::component::array< float > {
24918 };
24919 
24920 template< >
24921 struct component< ::color::category::YCgCo_double >
24922 	: public ::color::_internal::utility::component::array< double > {
24923 };
24924 
24925 template< >
24926 struct component< ::color::category::YCgCo_ldouble >
24927 	: public ::color::_internal::utility::component::array< long double > {
24928 };
24929 
24930 }
24931 }
24932 
24933 namespace color {
24934 namespace trait {
24935 
24936 template< >
24937 struct component< ::color::category::YCgCo_uint8 >
24938 	: public ::color::_internal::utility::component::array< std::uint8_t > {
24939 };
24940 
24941 template< >
24942 struct component< ::color::category::YCgCo_uint16 >
24943 	: public ::color::_internal::utility::component::array< std::uint16_t > {
24944 };
24945 
24946 template< >
24947 struct component< ::color::category::YCgCo_uint32 >
24948 	: public ::color::_internal::utility::component::array< std::uint32_t > {
24949 };
24950 
24951 template< >
24952 struct component< ::color::category::YCgCo_uint64 >
24953 	: public ::color::_internal::utility::component::array< std::uint64_t > {
24954 };
24955 
24956 }
24957 }
24958 
24959 namespace color {
24960 namespace trait {
24961 
24962 template< >
24963 struct container< ::color::category::YCgCo_float >
24964 	: public ::color::_internal::utility::container::array< float, 3 > {
24965 };
24966 
24967 template< >
24968 struct container< ::color::category::YCgCo_double >
24969 	: public ::color::_internal::utility::container::array< double, 3 > {
24970 };
24971 
24972 template< >
24973 struct container< ::color::category::YCgCo_ldouble >
24974 	: public ::color::_internal::utility::container::array< long double, 3 > {
24975 };
24976 
24977 }
24978 }
24979 
24980 namespace color {
24981 namespace trait {
24982 
24983 template< >
24984 struct container< ::color::category::YCgCo_uint8 >
24985 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
24986 };
24987 
24988 template< >
24989 struct container< ::color::category::YCgCo_uint16 >
24990 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
24991 };
24992 
24993 template< >
24994 struct container< ::color::category::YCgCo_uint32 >
24995 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
24996 };
24997 
24998 template< >
24999 struct container< ::color::category::YCgCo_uint64 >
25000 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
25001 };
25002 
25003 }
25004 }
25005 
25006 namespace color {
25007 namespace constant {
25008 
25009 template< typename category_name >
25010 struct YCgCo {
25011 public:
25012 	typedef category_name category_type;
25013 
25014 	typedef typename ::color::trait::scalar< category_name >::instance_type scalar_type;
25015 
25016 	typedef ::color::constant::YCgCo<category_type> this_type;
25017 
halfcolor::constant::YCgCo25018 	static scalar_type const half() {
25019 		return 0.5;
25020 	}
onecolor::constant::YCgCo25021 	static scalar_type const one() {
25022 		return 1;
25023 	}
25024 
Cg_mincolor::constant::YCgCo25025 	static scalar_type const Cg_min() {
25026 		return -0.5;
25027 	}
Cg_maxcolor::constant::YCgCo25028 	static scalar_type const Cg_max() {
25029 		return 0.5;
25030 	}
Cg_rangecolor::constant::YCgCo25031 	static scalar_type const Cg_range() {
25032 		return 1;
25033 	}
25034 
Co_mincolor::constant::YCgCo25035 	static scalar_type const Co_min() {
25036 		return -0.5;
25037 	}
Co_maxcolor::constant::YCgCo25038 	static scalar_type const Co_max() {
25039 		return 0.5;
25040 	}
Co_rangecolor::constant::YCgCo25041 	static scalar_type const Co_range() {
25042 		return 1;
25043 	}
25044 
Cg_diversecolor::constant::YCgCo25045 	static scalar_type Cg_diverse(scalar_type const& normal) {
25046 		return this_type::Cg_range() * normal + this_type::Cg_min();
25047 	}
Cg_normalizecolor::constant::YCgCo25048 	static scalar_type Cg_normalize(scalar_type const& divert) {
25049 		return (divert - this_type::Cg_min()) /this_type::Cg_range();
25050 	}
25051 
Co_diversecolor::constant::YCgCo25052 	static scalar_type Co_diverse(scalar_type const& normal) {
25053 		return this_type::Co_range() * normal + this_type::Co_min();
25054 	}
Co_normalizecolor::constant::YCgCo25055 	static scalar_type Co_normalize(scalar_type const& divert) {
25056 		return (divert - this_type::Co_min()) /this_type::Co_range();
25057 	}
25058 
25059 };
25060 
25061 }
25062 }
25063 
25064 namespace color {
25065 
25066 template< typename type_name >
25067 using YCgCo = ::color::model< typename ::color::category::YCgCo< type_name > >;
25068 
25069 }
25070 
25071 namespace color {
25072 namespace place {
25073 namespace _internal {
25074 
25075 template< typename tag_name >
25076 struct luma< ::color::category::YCgCo< tag_name > > {
25077 public:
25078 	typedef ::color::category::YCgCo< tag_name > category_type;
25079 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
25080 
25081 	enum { position_enum = 0 };
25082 	enum { has_enum = true };
25083 
positioncolor::place::_internal::luma25084 	static index_instance_type position() {
25085 		return position_enum;
25086 	}
25087 };
25088 
25089 }
25090 }
25091 }
25092 
25093 namespace color {
25094 namespace get {
25095 
25096 template< typename tag_name >
25097 inline
25098 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::YCgCo<tag_name> >::akin_type >::return_type
gray(::color::model<::color::category::YCgCo<tag_name>> const & color_parameter)25099 gray(::color::model< ::color::category::YCgCo<tag_name> > const& color_parameter) {
25100 	typedef ::color::category::YCgCo< tag_name > category_type;
25101 	typedef typename ::color::akin::gray<category_type>::akin_type akin_type;
25102 	typedef ::color::_internal::reformat< akin_type, category_type > reformat_type;
25103 	return reformat_type::template process<0,0>(color_parameter.template get<0>());
25104 }
25105 
25106 }
25107 }
25108 
25109 namespace color {
25110 namespace get {
25111 
25112 template< typename tag_name >
25113 inline
25114 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YCgCo<tag_name> >::akin_type >::return_type
red(::color::model<::color::category::YCgCo<tag_name>> const & color_parameter)25115 red(::color::model< ::color::category::YCgCo<tag_name> > const& color_parameter) {
25116 	typedef ::color::category::YCgCo< tag_name > category_type;
25117 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
25118 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
25119 	typedef ::color::_internal::diverse< akin_type > diverse_type;
25120 	typedef ::color::_internal::normalize<category_type> normalize_type;
25121 	typedef ::color::constant::YCgCo< category_type > YCgCo_const_type;
25122 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
25123 	scalar_type Y = normalize_type::template process<0>(color_parameter.template get<0>());
25124 	scalar_type Cg = normalize_type::template process<1>(color_parameter.template get<1>());
25125 	scalar_type Co = normalize_type::template process<2>(color_parameter.template get<2>());
25126 	Cg = YCgCo_const_type::Cg_diverse(Cg);
25127 	Co = YCgCo_const_type::Co_diverse(Co);
25128 	scalar_type r = Y - Cg + Co;
25129 	return diverse_type::template process<red_p>(r);
25130 }
25131 
25132 }
25133 }
25134 
25135 namespace color {
25136 namespace get {
25137 
25138 template< typename tag_name >
25139 inline
25140 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YCgCo<tag_name> >::akin_type >::return_type
green(::color::model<::color::category::YCgCo<tag_name>> const & color_parameter)25141 green(::color::model< ::color::category::YCgCo<tag_name> > const& color_parameter) {
25142 	typedef ::color::category::YCgCo<tag_name> category_type;
25143 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
25144 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
25145 	typedef ::color::_internal::diverse< akin_type > diverse_type;
25146 	typedef ::color::_internal::normalize<category_type> normalize_type;
25147 	typedef ::color::constant::YCgCo< category_type > YCgCo_const_type;
25148 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
25149 	scalar_type Y = normalize_type::template process<0>(color_parameter.template get<0>());
25150 	scalar_type Cg = normalize_type::template process<1>(color_parameter.template get<1>());
25151 	scalar_type Co = normalize_type::template process<2>(color_parameter.template get<2>());
25152 	Cg = YCgCo_const_type::Cg_diverse(Cg);
25153 	Co = YCgCo_const_type::Co_diverse(Co);
25154 	scalar_type g = Y + Cg;
25155 	return diverse_type::template process<green_p>(g);
25156 }
25157 
25158 }
25159 }
25160 
25161 namespace color {
25162 namespace get {
25163 
25164 template< typename tag_name >
25165 inline
25166 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YCgCo<tag_name> >::akin_type >::return_type
blue(::color::model<::color::category::YCgCo<tag_name>> const & color_parameter)25167 blue(::color::model< ::color::category::YCgCo<tag_name> > const& color_parameter) {
25168 	typedef ::color::category::YCgCo<tag_name> category_type;
25169 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
25170 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
25171 	typedef ::color::_internal::diverse< akin_type > diverse_type;
25172 	typedef ::color::_internal::normalize<category_type> normalize_type;
25173 	typedef ::color::constant::YCgCo< category_type > YCgCo_const_type;
25174 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
25175 	scalar_type Y = normalize_type::template process<0>(color_parameter.template get<0>());
25176 	scalar_type Cg = normalize_type::template process<1>(color_parameter.template get<1>());
25177 	scalar_type Co = normalize_type::template process<2>(color_parameter.template get<2>());
25178 	Cg = YCgCo_const_type::Cg_diverse(Cg);
25179 	Co = YCgCo_const_type::Co_diverse(Co);
25180 	scalar_type b = Y - Cg - Co;
25181 	return diverse_type::template process<blue_p>(b);
25182 }
25183 
25184 }
25185 }
25186 
25187 namespace color {
25188 namespace set {
25189 
25190 template< typename tag_name >
25191 inline
25192 void
blue(::color::model<::color::category::YCgCo<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::YCgCo<tag_name>>::akin_type>::model_type component_parameter)25193 blue
25194 (
25195 	::color::model< ::color::category::YCgCo< tag_name > > & color_parameter
25196 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YCgCo< tag_name > >::akin_type >::model_type component_parameter
25197 ) {
25198 	typedef ::color::category::YCgCo< tag_name > category_type;
25199 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
25200 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
25201 	::color::model< akin_type > rgb_instance(color_parameter);
25202 	rgb_instance.template set<blue_p > (component_parameter);
25203 	color_parameter = rgb_instance;
25204 }
25205 
25206 }
25207 }
25208 
25209 namespace color {
25210 namespace set {
25211 
25212 template< typename tag_name >
25213 inline
25214 void
green(::color::model<::color::category::YCgCo<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::YCgCo<tag_name>>::akin_type>::model_type component_parameter)25215 green
25216 (
25217 	::color::model< ::color::category::YCgCo< tag_name > > & color_parameter
25218 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YCgCo< tag_name > >::akin_type >::model_type component_parameter
25219 ) {
25220 	typedef ::color::category::YCgCo< tag_name > category_type;
25221 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
25222 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
25223 	::color::model< akin_type > rgb(color_parameter);
25224 	rgb.template set< green_p > (component_parameter);
25225 	color_parameter = rgb;
25226 }
25227 
25228 }
25229 }
25230 
25231 namespace color {
25232 namespace set {
25233 
25234 template< typename tag_name >
25235 inline
25236 void
red(::color::model<::color::category::YCgCo<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::YCgCo<tag_name>>::akin_type>::model_type component_parameter)25237 red
25238 (
25239 	::color::model< ::color::category::YCgCo< tag_name > > & color_parameter
25240 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YCgCo< tag_name > >::akin_type >::model_type component_parameter
25241 ) {
25242 	typedef ::color::category::YCgCo< tag_name > category_type;
25243 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
25244 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
25245 	::color::model< akin_type > rgb(color_parameter);
25246 	rgb.template set<red_p> (component_parameter);
25247 	color_parameter = rgb;
25248 }
25249 
25250 }
25251 }
25252 
25253 namespace color {
25254 namespace set {
25255 
25256 template< typename tag_name >
25257 inline
25258 void
gray(::color::model<::color::category::YCgCo<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::YCgCo<tag_name>>::akin_type>::model_type component_parameter)25259 gray
25260 (
25261 	::color::model< ::color::category::YCgCo< tag_name > > & color_parameter
25262 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::YCgCo< tag_name > >::akin_type >::model_type component_parameter
25263 ) {
25264 	typedef ::color::category::YCgCo< tag_name > category_type;
25265 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
25266 	typedef ::color::_internal::reformat< category_type, akin_type > reformat_type;
25267 	color_parameter.template set<0>(reformat_type::template process<0,0>(component_parameter));
25268 }
25269 
25270 }
25271 }
25272 
25273 namespace color {
25274 namespace _internal {
25275 
25276 template< typename YCgCo_tag_name, typename gray_tag_name >
25277 struct convert
25278 	<
25279 	::color::category::YCgCo< YCgCo_tag_name >
25280 	,::color::category::gray< gray_tag_name >
25281 	> {
25282 public:
25283 	typedef ::color::category::YCgCo< YCgCo_tag_name > category_left_type;
25284 	typedef ::color::category::gray< gray_tag_name > category_right_type;
25285 
25286 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
25287 
25288 	typedef ::color::trait::bound<category_left_type> bound_left_trait_type;
25289 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
25290 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
25291 
25292 	typedef typename container_left_trait_type::input_type container_left_input_type;
25293 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
25294 
25295 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
25296 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
25297 
processcolor::_internal::convert25298 	static void process
25299 	(
25300 		container_left_input_type left
25301 		,container_right_const_input_type right
25302 	) {
25303 		scalar_type g = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
25304 		auto Y = diverse_type::template process<0>(g);
25305 		static auto const Cg = diverse_type::template process<1>(0.5);
25306 		static auto const Co = diverse_type::template process<2>(0.5);
25307 		container_left_trait_type::template set<0>(left, Y);
25308 		container_left_trait_type::template set<1>(left, Cg);
25309 		container_left_trait_type::template set<2>(left, Co);
25310 	}
25311 };
25312 
25313 }
25314 }
25315 
25316 namespace color {
25317 namespace _internal {
25318 
25319 template< typename YCgCo_tag_name, typename cmy_tag_name >
25320 struct convert
25321 	<
25322 	::color::category::YCgCo< YCgCo_tag_name >
25323 	,::color::category::cmy< cmy_tag_name >
25324 	> {
25325 public:
25326 	typedef ::color::category::YCgCo< YCgCo_tag_name > category_left_type;
25327 	typedef ::color::category::cmy< cmy_tag_name > category_right_type;
25328 
25329 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
25330 
25331 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
25332 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
25333 
25334 	typedef typename container_left_trait_type::input_type container_left_input_type;
25335 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
25336 
25337 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
25338 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
25339 
25340 	typedef ::color::constant::YCgCo< category_left_type > YCgCo_const_type;
25341 
25342 	enum {
25343 		cyan_p = ::color::place::_internal::cyan<category_right_type>::position_enum
25344 		,magenta_p = ::color::place::_internal::magenta<category_right_type>::position_enum
25345 		,yellow_p = ::color::place::_internal::yellow<category_right_type>::position_enum
25346 	};
25347 
processcolor::_internal::convert25348 	static void process
25349 	(
25350 		container_left_input_type left
25351 		,container_right_const_input_type right
25352 	) {
25353 		scalar_type r = scalar_type(1) - normalize_type::template process<cyan_p >(container_right_trait_type::template get<cyan_p >(right));
25354 		scalar_type g = scalar_type(1) - normalize_type::template process<magenta_p >(container_right_trait_type::template get<magenta_p >(right));
25355 		scalar_type b = scalar_type(1) - normalize_type::template process<yellow_p >(container_right_trait_type::template get<yellow_p >(right));
25356 		scalar_type Y = 0.25 * r + 0.5 * g + 0.25 * b;
25357 		scalar_type Cg = -0.25 * r + 0.5 * g - 0.25 * b;
25358 		scalar_type Co = 0.5 * r + 0.0 * g - 0.5 * b;
25359 		Cg = YCgCo_const_type::Cg_normalize(Cg);
25360 		Co = YCgCo_const_type::Co_normalize(Co);
25361 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(Y));
25362 		container_left_trait_type::template set<1>(left, diverse_type::template process<1>(Cg));
25363 		container_left_trait_type::template set<2>(left, diverse_type::template process<2>(Co));
25364 	}
25365 };
25366 
25367 }
25368 }
25369 
25370 namespace color {
25371 namespace _internal {
25372 
25373 template
25374 <
25375 	typename YCgCo_tag_name
25376 	,typename cmyk_tag_name
25377 	>
25378 struct convert
25379 	<
25380 	::color::category::YCgCo< YCgCo_tag_name >
25381 	,::color::category::cmyk< cmyk_tag_name >
25382 	> {
25383 public:
25384 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
25385 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
25386 
25387 	typedef typename ::color::trait::scalar< YCgCo_category_type >::instance_type scalar_type;
25388 
25389 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
25390 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
25391 
25392 	typedef ::color::rgb< scalar_type > rgb_model_type;
25393 
25394 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
25395 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
25396 
25397 	typedef typename container_left_trait_type::input_type container_left_input_type;
25398 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
25399 
processcolor::_internal::convert25400 	static void process
25401 	(
25402 		container_left_input_type left
25403 		,container_right_const_input_type right
25404 	) {
25405 		left = YCgCo_model_type(rgb_model_type(cmyk_model_type(right))).container();
25406 	}
25407 };
25408 
25409 }
25410 }
25411 
25412 namespace color {
25413 namespace _internal {
25414 
25415 template
25416 <
25417 	typename YCgCo_tag_name
25418 	,typename hsl_tag_name
25419 	>
25420 struct convert
25421 	<
25422 	::color::category::YCgCo< YCgCo_tag_name >
25423 	,::color::category::hsl< hsl_tag_name >
25424 	> {
25425 public:
25426 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
25427 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
25428 
25429 	typedef typename ::color::trait::scalar< YCgCo_category_type >::instance_type scalar_type;
25430 
25431 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
25432 	typedef ::color::model< hsl_category_type > hsl_model_type;
25433 
25434 	typedef ::color::rgb< scalar_type > rgb_model_type;
25435 
25436 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
25437 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
25438 
25439 	typedef typename container_left_trait_type::input_type container_left_input_type;
25440 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
25441 
processcolor::_internal::convert25442 	static void process
25443 	(
25444 		container_left_input_type left
25445 		,container_right_const_input_type right
25446 	) {
25447 		left = YCgCo_model_type(rgb_model_type(hsl_model_type(right))).container();
25448 	}
25449 };
25450 
25451 }
25452 }
25453 namespace color {
25454 namespace _internal {
25455 
25456 template
25457 <
25458 	typename YCgCo_tag_name
25459 	,typename hsv_tag_name
25460 	>
25461 struct convert
25462 	<
25463 	::color::category::YCgCo< YCgCo_tag_name >
25464 	,::color::category::hsv< hsv_tag_name >
25465 	> {
25466 public:
25467 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
25468 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
25469 
25470 	typedef typename ::color::trait::scalar< YCgCo_category_type >::instance_type scalar_type;
25471 
25472 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
25473 	typedef ::color::model< hsv_category_type > hsv_model_type;
25474 
25475 	typedef ::color::rgb< scalar_type > rgb_model_type;
25476 
25477 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
25478 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
25479 
25480 	typedef typename container_left_trait_type::input_type container_left_input_type;
25481 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
25482 
processcolor::_internal::convert25483 	static void process
25484 	(
25485 		container_left_input_type left
25486 		,container_right_const_input_type right
25487 	) {
25488 		left = YCgCo_model_type(rgb_model_type(hsv_model_type(right))).container();
25489 	}
25490 };
25491 
25492 }
25493 }
25494 
25495 namespace color {
25496 namespace _internal {
25497 
25498 template
25499 <
25500 	typename YCgCo_tag_name
25501 	,typename hsi_tag_name
25502 	>
25503 struct convert
25504 	<
25505 	::color::category::YCgCo< YCgCo_tag_name >
25506 	,::color::category::hsi< hsi_tag_name >
25507 	> {
25508 public:
25509 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
25510 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
25511 
25512 	typedef typename ::color::trait::scalar< YCgCo_category_type >::instance_type scalar_type;
25513 
25514 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
25515 	typedef ::color::model< hsi_category_type > hsi_model_type;
25516 
25517 	typedef ::color::rgb< scalar_type > rgb_model_type;
25518 
25519 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
25520 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
25521 
25522 	typedef typename container_left_trait_type::input_type container_left_input_type;
25523 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
25524 
processcolor::_internal::convert25525 	static void process
25526 	(
25527 		container_left_input_type left
25528 		,container_right_const_input_type right
25529 	) {
25530 		left = YCgCo_model_type(rgb_model_type(hsi_model_type(right))).container();
25531 	}
25532 };
25533 
25534 }
25535 }
25536 
25537 namespace color {
25538 namespace _internal {
25539 
25540 template
25541 <
25542 	typename YCgCo_tag_name
25543 	,typename hwb_tag_name
25544 	>
25545 struct convert
25546 	<
25547 	::color::category::YCgCo< YCgCo_tag_name >
25548 	,::color::category::hwb< hwb_tag_name >
25549 	> {
25550 public:
25551 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
25552 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
25553 
25554 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
25555 
25556 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
25557 	typedef ::color::model< hwb_category_type > hwb_model_type;
25558 
25559 	typedef ::color::rgb< scalar_type > rgb_model_type;
25560 	typedef ::color::hsv< scalar_type > hsv_model_type;
25561 
25562 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
25563 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
25564 
25565 	typedef typename container_left_trait_type::input_type container_left_input_type;
25566 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
25567 
processcolor::_internal::convert25568 	static void process
25569 	(
25570 		container_left_input_type left
25571 		,container_right_const_input_type right
25572 	) {
25573 		left = YCgCo_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right)))).container();
25574 	}
25575 };
25576 
25577 }
25578 }
25579 
25580 namespace color {
25581 namespace _internal {
25582 
25583 template< typename YCgCo_tag_name, typename rgb_tag_name >
25584 struct convert
25585 	<
25586 	::color::category::YCgCo< YCgCo_tag_name >
25587 	,::color::category::rgb< rgb_tag_name >
25588 	> {
25589 public:
25590 	typedef ::color::category::YCgCo< YCgCo_tag_name > category_left_type;
25591 	typedef ::color::category::rgb< rgb_tag_name > category_right_type;
25592 
25593 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
25594 
25595 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
25596 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
25597 
25598 	typedef typename container_left_trait_type::input_type container_left_input_type;
25599 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
25600 
25601 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
25602 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
25603 
25604 	typedef ::color::constant::YCgCo< category_left_type > YCgCo_const_type;
25605 
25606 	enum {
25607 		red_p = ::color::place::_internal::red<category_right_type>::position_enum
25608 		,green_p = ::color::place::_internal::green<category_right_type>::position_enum
25609 		,blue_p = ::color::place::_internal::blue<category_right_type>::position_enum
25610 	};
25611 
processcolor::_internal::convert25612 	static void process
25613 	(
25614 		container_left_input_type left
25615 		,container_right_const_input_type right
25616 	) {
25617 		scalar_type r = normalize_type::template process<red_p >(container_right_trait_type::template get<red_p >(right));
25618 		scalar_type g = normalize_type::template process<green_p>(container_right_trait_type::template get<green_p>(right));
25619 		scalar_type b = normalize_type::template process<blue_p >(container_right_trait_type::template get<blue_p >(right));
25620 		scalar_type Y = 0.25 * r + 0.5 * g + 0.25 * b;
25621 		scalar_type Cg = -0.25 * r + 0.5 * g - 0.25 * b;
25622 		scalar_type Co = 0.5 * r + 0.0 * g - 0.5 * b;
25623 		Cg = YCgCo_const_type::Cg_normalize(Cg);
25624 		Co = YCgCo_const_type::Co_normalize(Co);
25625 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(Y));
25626 		container_left_trait_type::template set<1>(left, diverse_type::template process<1>(Cg));
25627 		container_left_trait_type::template set<2>(left, diverse_type::template process<2>(Co));
25628 	}
25629 };
25630 
25631 }
25632 }
25633 
25634 namespace color {
25635 namespace _internal {
25636 
25637 template
25638 <
25639 	typename YCgCo_tag_name
25640 	,typename yiq_tag_name
25641 	>
25642 struct convert
25643 	<
25644 	::color::category::YCgCo< YCgCo_tag_name >
25645 	,::color::category::yiq< yiq_tag_name >
25646 	> {
25647 public:
25648 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
25649 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
25650 
25651 	typedef typename ::color::trait::scalar< YCgCo_category_type >::instance_type scalar_type;
25652 
25653 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
25654 	typedef ::color::model< yiq_category_type > yiq_model_type;
25655 
25656 	typedef ::color::rgb< scalar_type > rgb_model_type;
25657 
25658 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
25659 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
25660 
25661 	typedef typename container_left_trait_type::input_type container_left_input_type;
25662 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
25663 
processcolor::_internal::convert25664 	static void process
25665 	(
25666 		container_left_input_type left
25667 		,container_right_const_input_type right
25668 	) {
25669 		left = YCgCo_model_type(rgb_model_type(yiq_model_type(right))).container();
25670 	}
25671 };
25672 
25673 }
25674 }
25675 namespace color {
25676 namespace _internal {
25677 
25678 template
25679 <
25680 	typename YCgCo_tag_name
25681 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
25682 	>
25683 struct convert
25684 	<
25685 	::color::category::YCgCo< YCgCo_tag_name >
25686 	,::color::category::yuv< yuv_tag_name, yuv_reference_number >
25687 	> {
25688 public:
25689 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
25690 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_right_type;
25691 
25692 	typedef typename ::color::trait::scalar< YCgCo_category_type >::instance_type scalar_type;
25693 
25694 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
25695 	typedef ::color::model< yuv_category_type > yuv_model_type;
25696 
25697 	typedef ::color::rgb< scalar_type > rgb_model_type;
25698 
25699 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
25700 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
25701 
25702 	typedef typename container_left_trait_type::input_type container_left_input_type;
25703 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
25704 
processcolor::_internal::convert25705 	static void process
25706 	(
25707 		container_left_input_type left
25708 		,container_right_const_input_type right
25709 	) {
25710 		left = YCgCo_model_type(rgb_model_type(yuv_model_type(right))).container();
25711 	}
25712 };
25713 
25714 }
25715 }
25716 
25717 namespace color {
25718 namespace _internal {
25719 
25720 template< typename tag_left_name, typename tag_right_name >
25721 struct convert
25722 	<
25723 	::color::category::YCgCo< tag_left_name >
25724 	,::color::category::YCgCo< tag_right_name>
25725 	> {
25726 public:
25727 	typedef ::color::category::YCgCo< tag_left_name > category_left_type;
25728 	typedef ::color::category::YCgCo< tag_right_name> category_right_type;
25729 
25730 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
25731 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
25732 
25733 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
25734 
25735 	typedef typename container_left_trait_type::input_type container_left_input_type;
25736 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
25737 
processcolor::_internal::convert25738 	static void process
25739 	(
25740 		container_left_input_type left
25741 		,container_right_const_input_type right
25742 	) {
25743 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
25744 		container_left_trait_type::template set<1>(left, reformat_type::template process<1,1>(container_right_trait_type::template get<1>(right)));
25745 		container_left_trait_type::template set<2>(left, reformat_type::template process<2,2>(container_right_trait_type::template get<2>(right)));
25746 	}
25747 };
25748 }
25749 }
25750 
25751 namespace color {
25752 namespace akin {
25753 
25754 template< >struct YDbDr< ::color::category::gray_uint8 > {
25755 	typedef ::color::category::YDbDr_uint8 akin_type;
25756 };
25757 template< >struct YDbDr< ::color::category::gray_uint16 > {
25758 	typedef ::color::category::YDbDr_uint16 akin_type;
25759 };
25760 template< >struct YDbDr< ::color::category::gray_uint32 > {
25761 	typedef ::color::category::YDbDr_uint32 akin_type;
25762 };
25763 template< >struct YDbDr< ::color::category::gray_uint64 > {
25764 	typedef ::color::category::YDbDr_uint64 akin_type;
25765 };
25766 template< >struct YDbDr< ::color::category::gray_float > {
25767 	typedef ::color::category::YDbDr_float akin_type;
25768 };
25769 template< >struct YDbDr< ::color::category::gray_double > {
25770 	typedef ::color::category::YDbDr_double akin_type;
25771 };
25772 template< >struct YDbDr< ::color::category::gray_ldouble > {
25773 	typedef ::color::category::YDbDr_ldouble akin_type;
25774 };
25775 
25776 }
25777 }
25778 
25779 namespace color {
25780 namespace akin {
25781 
25782 template< >struct YDbDr< ::color::category::cmy_uint8 > {
25783 	typedef ::color::category::YDbDr_uint8 akin_type;
25784 };
25785 template< >struct YDbDr< ::color::category::cmy_uint16 > {
25786 	typedef ::color::category::YDbDr_uint16 akin_type;
25787 };
25788 template< >struct YDbDr< ::color::category::cmy_uint32 > {
25789 	typedef ::color::category::YDbDr_uint32 akin_type;
25790 };
25791 template< >struct YDbDr< ::color::category::cmy_uint64 > {
25792 	typedef ::color::category::YDbDr_uint64 akin_type;
25793 };
25794 template< >struct YDbDr< ::color::category::cmy_float > {
25795 	typedef ::color::category::YDbDr_float akin_type;
25796 };
25797 template< >struct YDbDr< ::color::category::cmy_double > {
25798 	typedef ::color::category::YDbDr_double akin_type;
25799 };
25800 template< >struct YDbDr< ::color::category::cmy_ldouble > {
25801 	typedef ::color::category::YDbDr_ldouble akin_type;
25802 };
25803 
25804 }
25805 }
25806 
25807 namespace color {
25808 namespace akin {
25809 
25810 template< >struct YDbDr< ::color::category::cmyk_uint8 > {
25811 	typedef ::color::category::YDbDr_uint8 akin_type;
25812 };
25813 template< >struct YDbDr< ::color::category::cmyk_uint16 > {
25814 	typedef ::color::category::YDbDr_uint16 akin_type;
25815 };
25816 template< >struct YDbDr< ::color::category::cmyk_uint32 > {
25817 	typedef ::color::category::YDbDr_uint32 akin_type;
25818 };
25819 template< >struct YDbDr< ::color::category::cmyk_uint64 > {
25820 	typedef ::color::category::YDbDr_uint64 akin_type;
25821 };
25822 template< >struct YDbDr< ::color::category::cmyk_float > {
25823 	typedef ::color::category::YDbDr_float akin_type;
25824 };
25825 template< >struct YDbDr< ::color::category::cmyk_double > {
25826 	typedef ::color::category::YDbDr_double akin_type;
25827 };
25828 template< >struct YDbDr< ::color::category::cmyk_ldouble > {
25829 	typedef ::color::category::YDbDr_ldouble akin_type;
25830 };
25831 
25832 }
25833 }
25834 
25835 namespace color {
25836 namespace akin {
25837 
25838 template< >struct YDbDr< ::color::category::hsl_uint8 > {
25839 	typedef ::color::category::YDbDr_uint8 akin_type;
25840 };
25841 template< >struct YDbDr< ::color::category::hsl_uint16 > {
25842 	typedef ::color::category::YDbDr_uint16 akin_type;
25843 };
25844 template< >struct YDbDr< ::color::category::hsl_uint32 > {
25845 	typedef ::color::category::YDbDr_uint32 akin_type;
25846 };
25847 template< >struct YDbDr< ::color::category::hsl_uint64 > {
25848 	typedef ::color::category::YDbDr_uint64 akin_type;
25849 };
25850 template< >struct YDbDr< ::color::category::hsl_float > {
25851 	typedef ::color::category::YDbDr_float akin_type;
25852 };
25853 template< >struct YDbDr< ::color::category::hsl_double > {
25854 	typedef ::color::category::YDbDr_double akin_type;
25855 };
25856 template< >struct YDbDr< ::color::category::hsl_ldouble > {
25857 	typedef ::color::category::YDbDr_ldouble akin_type;
25858 };
25859 
25860 }
25861 }
25862 
25863 namespace color {
25864 namespace akin {
25865 
25866 template< >struct YDbDr< ::color::category::hsv_uint8 > {
25867 	typedef ::color::category::YDbDr_uint8 akin_type;
25868 };
25869 template< >struct YDbDr< ::color::category::hsv_uint16 > {
25870 	typedef ::color::category::YDbDr_uint16 akin_type;
25871 };
25872 template< >struct YDbDr< ::color::category::hsv_uint32 > {
25873 	typedef ::color::category::YDbDr_uint32 akin_type;
25874 };
25875 template< >struct YDbDr< ::color::category::hsv_uint64 > {
25876 	typedef ::color::category::YDbDr_uint64 akin_type;
25877 };
25878 template< >struct YDbDr< ::color::category::hsv_float > {
25879 	typedef ::color::category::YDbDr_float akin_type;
25880 };
25881 template< >struct YDbDr< ::color::category::hsv_double > {
25882 	typedef ::color::category::YDbDr_double akin_type;
25883 };
25884 template< >struct YDbDr< ::color::category::hsv_ldouble > {
25885 	typedef ::color::category::YDbDr_ldouble akin_type;
25886 };
25887 
25888 }
25889 }
25890 
25891 namespace color {
25892 namespace akin {
25893 
25894 template< >struct YDbDr< ::color::category::hsi_uint8 > {
25895 	typedef ::color::category::YDbDr_uint8 akin_type;
25896 };
25897 template< >struct YDbDr< ::color::category::hsi_uint16 > {
25898 	typedef ::color::category::YDbDr_uint16 akin_type;
25899 };
25900 template< >struct YDbDr< ::color::category::hsi_uint32 > {
25901 	typedef ::color::category::YDbDr_uint32 akin_type;
25902 };
25903 template< >struct YDbDr< ::color::category::hsi_uint64 > {
25904 	typedef ::color::category::YDbDr_uint64 akin_type;
25905 };
25906 template< >struct YDbDr< ::color::category::hsi_float > {
25907 	typedef ::color::category::YDbDr_float akin_type;
25908 };
25909 template< >struct YDbDr< ::color::category::hsi_double > {
25910 	typedef ::color::category::YDbDr_double akin_type;
25911 };
25912 template< >struct YDbDr< ::color::category::hsi_ldouble > {
25913 	typedef ::color::category::YDbDr_ldouble akin_type;
25914 };
25915 
25916 }
25917 }
25918 
25919 namespace color {
25920 namespace akin {
25921 
25922 template
25923 <
25924 	typename tag_name
25925 
25926 	>
25927 struct YDbDr< ::color::category::hwb< tag_name > > {
25928 public:
25929 	typedef ::color::category::YDbDr< tag_name > akin_type;
25930 };
25931 
25932 }
25933 }
25934 
25935 namespace color {
25936 namespace akin {
25937 
25938 template< >struct YDbDr< ::color::category::rgb_uint8 > {
25939 	typedef ::color::category::YDbDr_uint8 akin_type;
25940 };
25941 template< >struct YDbDr< ::color::category::rgb_uint16 > {
25942 	typedef ::color::category::YDbDr_uint16 akin_type;
25943 };
25944 template< >struct YDbDr< ::color::category::rgb_uint32 > {
25945 	typedef ::color::category::YDbDr_uint32 akin_type;
25946 };
25947 template< >struct YDbDr< ::color::category::rgb_uint64 > {
25948 	typedef ::color::category::YDbDr_uint64 akin_type;
25949 };
25950 template< >struct YDbDr< ::color::category::rgb_float > {
25951 	typedef ::color::category::YDbDr_float akin_type;
25952 };
25953 template< >struct YDbDr< ::color::category::rgb_double > {
25954 	typedef ::color::category::YDbDr_double akin_type;
25955 };
25956 template< >struct YDbDr< ::color::category::rgb_ldouble > {
25957 	typedef ::color::category::YDbDr_ldouble akin_type;
25958 };
25959 
25960 }
25961 }
25962 
25963 namespace color {
25964 namespace akin {
25965 
25966 template< >struct YDbDr< ::color::category::yiq_uint8 > {
25967 	typedef ::color::category::YDbDr_uint8 akin_type;
25968 };
25969 template< >struct YDbDr< ::color::category::yiq_uint16 > {
25970 	typedef ::color::category::YDbDr_uint16 akin_type;
25971 };
25972 template< >struct YDbDr< ::color::category::yiq_uint32 > {
25973 	typedef ::color::category::YDbDr_uint32 akin_type;
25974 };
25975 template< >struct YDbDr< ::color::category::yiq_uint64 > {
25976 	typedef ::color::category::YDbDr_uint64 akin_type;
25977 };
25978 template< >struct YDbDr< ::color::category::yiq_float > {
25979 	typedef ::color::category::YDbDr_float akin_type;
25980 };
25981 template< >struct YDbDr< ::color::category::yiq_double > {
25982 	typedef ::color::category::YDbDr_double akin_type;
25983 };
25984 template< >struct YDbDr< ::color::category::yiq_ldouble > {
25985 	typedef ::color::category::YDbDr_ldouble akin_type;
25986 };
25987 
25988 }
25989 }
25990 
25991 namespace color {
25992 namespace akin {
25993 
25994 template< ::color::constant::yuv::reference_enum reference_number >struct YDbDr< ::color::category::yuv_uint8 <reference_number> > {
25995 	typedef ::color::category::YDbDr_uint8 akin_type;
25996 };
25997 template< ::color::constant::yuv::reference_enum reference_number >struct YDbDr< ::color::category::yuv_uint16 <reference_number> > {
25998 	typedef ::color::category::YDbDr_uint16 akin_type;
25999 };
26000 template< ::color::constant::yuv::reference_enum reference_number >struct YDbDr< ::color::category::yuv_uint32 <reference_number> > {
26001 	typedef ::color::category::YDbDr_uint32 akin_type;
26002 };
26003 template< ::color::constant::yuv::reference_enum reference_number >struct YDbDr< ::color::category::yuv_uint64 <reference_number> > {
26004 	typedef ::color::category::YDbDr_uint64 akin_type;
26005 };
26006 template< ::color::constant::yuv::reference_enum reference_number >struct YDbDr< ::color::category::yuv_float <reference_number> > {
26007 	typedef ::color::category::YDbDr_float akin_type;
26008 };
26009 template< ::color::constant::yuv::reference_enum reference_number >struct YDbDr< ::color::category::yuv_double <reference_number> > {
26010 	typedef ::color::category::YDbDr_double akin_type;
26011 };
26012 template< ::color::constant::yuv::reference_enum reference_number >struct YDbDr< ::color::category::yuv_ldouble<reference_number> > {
26013 	typedef ::color::category::YDbDr_ldouble akin_type;
26014 };
26015 
26016 }
26017 }
26018 
26019 namespace color {
26020 namespace akin {
26021 
26022 template< >struct YDbDr< ::color::category::YCgCo_uint8 > {
26023 	typedef ::color::category::YDbDr_uint8 akin_type;
26024 };
26025 template< >struct YDbDr< ::color::category::YCgCo_uint16 > {
26026 	typedef ::color::category::YDbDr_uint16 akin_type;
26027 };
26028 template< >struct YDbDr< ::color::category::YCgCo_uint32 > {
26029 	typedef ::color::category::YDbDr_uint32 akin_type;
26030 };
26031 template< >struct YDbDr< ::color::category::YCgCo_uint64 > {
26032 	typedef ::color::category::YDbDr_uint64 akin_type;
26033 };
26034 template< >struct YDbDr< ::color::category::YCgCo_float > {
26035 	typedef ::color::category::YDbDr_float akin_type;
26036 };
26037 template< >struct YDbDr< ::color::category::YCgCo_double > {
26038 	typedef ::color::category::YDbDr_double akin_type;
26039 };
26040 template< >struct YDbDr< ::color::category::YCgCo_ldouble > {
26041 	typedef ::color::category::YDbDr_ldouble akin_type;
26042 };
26043 
26044 }
26045 }
26046 
26047 namespace color {
26048 namespace akin {
26049 
26050 template< typename tag_name >
26051 struct YDbDr< ::color::category::YDbDr< tag_name > > {
26052 public:
26053 	typedef ::color::category::YDbDr< tag_name > akin_type;
26054 };
26055 
26056 }
26057 }
26058 
26059 namespace color {
26060 namespace akin {
26061 
26062 template< ::color::constant::YPbPr::reference_enum reference_number >struct YDbDr< ::color::category::YPbPr_uint8 <reference_number> > {
26063 	typedef ::color::category::YDbDr_uint8 akin_type;
26064 };
26065 template< ::color::constant::YPbPr::reference_enum reference_number >struct YDbDr< ::color::category::YPbPr_uint16 <reference_number> > {
26066 	typedef ::color::category::YDbDr_uint16 akin_type;
26067 };
26068 template< ::color::constant::YPbPr::reference_enum reference_number >struct YDbDr< ::color::category::YPbPr_uint32 <reference_number> > {
26069 	typedef ::color::category::YDbDr_uint32 akin_type;
26070 };
26071 template< ::color::constant::YPbPr::reference_enum reference_number >struct YDbDr< ::color::category::YPbPr_uint64 <reference_number> > {
26072 	typedef ::color::category::YDbDr_uint64 akin_type;
26073 };
26074 template< ::color::constant::YPbPr::reference_enum reference_number >struct YDbDr< ::color::category::YPbPr_float <reference_number> > {
26075 	typedef ::color::category::YDbDr_float akin_type;
26076 };
26077 template< ::color::constant::YPbPr::reference_enum reference_number >struct YDbDr< ::color::category::YPbPr_double <reference_number> > {
26078 	typedef ::color::category::YDbDr_double akin_type;
26079 };
26080 template< ::color::constant::YPbPr::reference_enum reference_number >struct YDbDr< ::color::category::YPbPr_ldouble<reference_number> > {
26081 	typedef ::color::category::YDbDr_ldouble akin_type;
26082 };
26083 
26084 }
26085 }
26086 
26087 namespace color {
26088 namespace akin {
26089 
26090 template< >struct YDbDr< ::color::category::xyz_uint8 > {
26091 	typedef ::color::category::YDbDr_uint8 akin_type;
26092 };
26093 template< >struct YDbDr< ::color::category::xyz_uint16 > {
26094 	typedef ::color::category::YDbDr_uint16 akin_type;
26095 };
26096 template< >struct YDbDr< ::color::category::xyz_uint32 > {
26097 	typedef ::color::category::YDbDr_uint32 akin_type;
26098 };
26099 template< >struct YDbDr< ::color::category::xyz_uint64 > {
26100 	typedef ::color::category::YDbDr_uint64 akin_type;
26101 };
26102 template< >struct YDbDr< ::color::category::xyz_float > {
26103 	typedef ::color::category::YDbDr_float akin_type;
26104 };
26105 template< >struct YDbDr< ::color::category::xyz_double > {
26106 	typedef ::color::category::YDbDr_double akin_type;
26107 };
26108 template< >struct YDbDr< ::color::category::xyz_ldouble > {
26109 	typedef ::color::category::YDbDr_ldouble akin_type;
26110 };
26111 
26112 }
26113 }
26114 
26115 namespace color {
26116 namespace akin {
26117 
26118 template
26119 <
26120 	typename tag_name, ::color::constant::lab::reference_enum lab_reference_number
26121 	>
26122 struct YDbDr< ::color::category::lab< tag_name, lab_reference_number > > {
26123 public:
26124 	typedef ::color::category::YDbDr< tag_name > akin_type;
26125 };
26126 
26127 }
26128 }
26129 
26130 namespace color {
26131 namespace akin {
26132 
26133 template
26134 <
26135 	typename tag_name
26136 
26137 	>
26138 struct YDbDr< ::color::category::xyy< tag_name > > {
26139 public:
26140 	typedef ::color::category::YDbDr< tag_name > akin_type;
26141 };
26142 
26143 }
26144 }
26145 
26146 namespace color {
26147 namespace akin {
26148 
26149 template
26150 <
26151 	typename tag_name
26152 	,::color::constant::lms::reference_enum reference_number
26153 
26154 	>
26155 struct YDbDr< ::color::category::lms< tag_name, reference_number > > {
26156 public:
26157 	typedef ::color::category::YDbDr< tag_name > akin_type;
26158 };
26159 
26160 }
26161 }
26162 
26163 namespace color {
26164 namespace akin {
26165 
26166 template
26167 <
26168 	typename tag_name
26169 
26170 	>
26171 struct YDbDr< ::color::category::luv< tag_name > > {
26172 public:
26173 	typedef ::color::category::YDbDr< tag_name > akin_type;
26174 };
26175 
26176 }
26177 }
26178 
26179 namespace color {
26180 namespace akin {
26181 
26182 template< >struct YDbDr< ::color::category::LabCH_uint8 > {
26183 	typedef ::color::category::YDbDr_uint8 akin_type;
26184 };
26185 template< >struct YDbDr< ::color::category::LabCH_uint16 > {
26186 	typedef ::color::category::YDbDr_uint16 akin_type;
26187 };
26188 template< >struct YDbDr< ::color::category::LabCH_uint32 > {
26189 	typedef ::color::category::YDbDr_uint32 akin_type;
26190 };
26191 template< >struct YDbDr< ::color::category::LabCH_uint64 > {
26192 	typedef ::color::category::YDbDr_uint64 akin_type;
26193 };
26194 template< >struct YDbDr< ::color::category::LabCH_float > {
26195 	typedef ::color::category::YDbDr_float akin_type;
26196 };
26197 template< >struct YDbDr< ::color::category::LabCH_double > {
26198 	typedef ::color::category::YDbDr_double akin_type;
26199 };
26200 template< >struct YDbDr< ::color::category::LabCH_ldouble > {
26201 	typedef ::color::category::YDbDr_ldouble akin_type;
26202 };
26203 
26204 }
26205 }
26206 
26207 namespace color {
26208 namespace akin {
26209 
26210 template< >struct YDbDr< ::color::category::LuvCH_uint8 > {
26211 	typedef ::color::category::YDbDr_uint8 akin_type;
26212 };
26213 template< >struct YDbDr< ::color::category::LuvCH_uint16 > {
26214 	typedef ::color::category::YDbDr_uint16 akin_type;
26215 };
26216 template< >struct YDbDr< ::color::category::LuvCH_uint32 > {
26217 	typedef ::color::category::YDbDr_uint32 akin_type;
26218 };
26219 template< >struct YDbDr< ::color::category::LuvCH_uint64 > {
26220 	typedef ::color::category::YDbDr_uint64 akin_type;
26221 };
26222 template< >struct YDbDr< ::color::category::LuvCH_float > {
26223 	typedef ::color::category::YDbDr_float akin_type;
26224 };
26225 template< >struct YDbDr< ::color::category::LuvCH_double > {
26226 	typedef ::color::category::YDbDr_double akin_type;
26227 };
26228 template< >struct YDbDr< ::color::category::LuvCH_ldouble > {
26229 	typedef ::color::category::YDbDr_ldouble akin_type;
26230 };
26231 
26232 }
26233 }
26234 
26235 namespace color {
26236 namespace trait {
26237 
26238 template <> struct info< ::color::category::YDbDr_uint8 > {
26239 public:
26240 	enum { implemented_entity = true };
26241 	enum { meaningful_entity = true };
26242 };
26243 template <> struct info< ::color::category::YDbDr_uint16 > {
26244 public:
26245 	enum { implemented_entity = true };
26246 	enum { meaningful_entity = true };
26247 };
26248 template <> struct info< ::color::category::YDbDr_uint32 > {
26249 public:
26250 	enum { implemented_entity = true };
26251 	enum { meaningful_entity = true };
26252 };
26253 template <> struct info< ::color::category::YDbDr_uint64 > {
26254 public:
26255 	enum { implemented_entity = true };
26256 	enum { meaningful_entity = true };
26257 };
26258 template <> struct info< ::color::category::YDbDr_float > {
26259 public:
26260 	enum { implemented_entity = true };
26261 	enum { meaningful_entity = true };
26262 };
26263 template <> struct info< ::color::category::YDbDr_double > {
26264 public:
26265 	enum { implemented_entity = true };
26266 	enum { meaningful_entity = true };
26267 };
26268 template <> struct info< ::color::category::YDbDr_ldouble > {
26269 public:
26270 	enum { implemented_entity = true };
26271 	enum { meaningful_entity = true };
26272 };
26273 
26274 }
26275 }
26276 
26277 namespace color {
26278 namespace _internal {
26279 namespace YDbDr {
26280 namespace bound {
26281 
26282 template< typename index_name, typename scalar_name >
26283 struct scalar {
26284 public:
26285 	typedef scalar_name scalar_type;
26286 	typedef index_name index_type;
26287 
26288 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
26289 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
26290 
26291 	typedef typename trait_type::instance_type instance_type;
26292 	typedef typename trait_type::return_image_type return_image_type;
26293 
26294 	typedef typename index_trait_type::instance_type index_instance_type;
26295 	typedef typename index_trait_type::model_type index_input_const_type;
26296 
26297 	template< index_instance_type index >
maximumcolor::_internal::YDbDr::bound::scalar26298 	static return_image_type maximum() {
26299 		static const instance_type max_list[] = { 1, scalar_type(1.333), scalar_type(1.333) };
26300 		return max_list[index];
26301 	}
26302 
maximumcolor::_internal::YDbDr::bound::scalar26303 	static return_image_type maximum(index_input_const_type index) {
26304 		static const instance_type max_list[] = { 1, scalar_type(1.333), scalar_type(1.333) };
26305 		return max_list[index];
26306 	}
26307 
26308 	template< index_instance_type index >
minimumcolor::_internal::YDbDr::bound::scalar26309 	static return_image_type minimum() {
26310 		static const instance_type min_list[] = { 0, scalar_type(-1.333), scalar_type(-1.333) };
26311 		return min_list[index];
26312 	}
26313 
minimumcolor::_internal::YDbDr::bound::scalar26314 	static return_image_type minimum(index_input_const_type index) {
26315 		static const instance_type min_list[] = { 0, scalar_type(-1.333), scalar_type(-1.333) };
26316 		return min_list[index];
26317 	}
26318 
26319 	template< index_instance_type index >
rangecolor::_internal::YDbDr::bound::scalar26320 	static return_image_type range() {
26321 		static const instance_type range_list[] = { 1, scalar_type(2.666), scalar_type(2.666) };
26322 		return range_list[index];
26323 	}
26324 
rangecolor::_internal::YDbDr::bound::scalar26325 	static return_image_type range(index_input_const_type index) {
26326 		static const instance_type range_list[] = { 1, scalar_type(2.666), scalar_type(2.666) };
26327 		return range_list[index];
26328 	}
26329 };
26330 
26331 }
26332 }
26333 }
26334 }
26335 
26336 namespace color {
26337 namespace trait {
26338 
26339 template< >
26340 struct bound< ::color::category::YDbDr_float >
26341 	: public ::color::_internal::YDbDr::bound::scalar< typename ::color::trait::index< ::color::category::YDbDr_float >::instance_type, float > {
26342 };
26343 
26344 template< >
26345 struct bound< ::color::category::YDbDr_double >
26346 	: public ::color::_internal::YDbDr::bound::scalar< typename ::color::trait::index< ::color::category::YDbDr_double >::instance_type, double > {
26347 };
26348 
26349 template< >
26350 struct bound< ::color::category::YDbDr_ldouble >
26351 	: public ::color::_internal::YDbDr::bound::scalar< typename ::color::trait::index< ::color::category::YDbDr_ldouble >::instance_type, long double > {
26352 };
26353 
26354 }
26355 }
26356 
26357 namespace color {
26358 namespace trait {
26359 
26360 template< >
26361 struct bound< ::color::category::YDbDr_uint8 >
26362 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::YDbDr_uint8 >::instance_type > {
26363 };
26364 
26365 template< >
26366 struct bound< ::color::category::YDbDr_uint16 >
26367 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::YDbDr_uint16 >::instance_type > {
26368 };
26369 
26370 template< >
26371 struct bound< ::color::category::YDbDr_uint32 >
26372 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::YDbDr_uint32 >::instance_type > {
26373 };
26374 
26375 template< >
26376 struct bound< ::color::category::YDbDr_uint64 >
26377 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::YDbDr_uint64 >::instance_type > {
26378 };
26379 
26380 }
26381 }
26382 
26383 namespace color {
26384 namespace trait {
26385 
26386 template< >
26387 struct component< ::color::category::YDbDr_float >
26388 	: public ::color::_internal::utility::component::array< float > {
26389 };
26390 
26391 template< >
26392 struct component< ::color::category::YDbDr_double >
26393 	: public ::color::_internal::utility::component::array< double > {
26394 };
26395 
26396 template< >
26397 struct component< ::color::category::YDbDr_ldouble >
26398 	: public ::color::_internal::utility::component::array< long double > {
26399 };
26400 
26401 }
26402 }
26403 
26404 namespace color {
26405 namespace trait {
26406 
26407 template< >
26408 struct component< ::color::category::YDbDr_uint8 >
26409 	: public ::color::_internal::utility::component::array< std::uint8_t > {
26410 };
26411 
26412 template< >
26413 struct component< ::color::category::YDbDr_uint16 >
26414 	: public ::color::_internal::utility::component::array< std::uint16_t > {
26415 };
26416 
26417 template< >
26418 struct component< ::color::category::YDbDr_uint32 >
26419 	: public ::color::_internal::utility::component::array< std::uint32_t > {
26420 };
26421 
26422 template< >
26423 struct component< ::color::category::YDbDr_uint64 >
26424 	: public ::color::_internal::utility::component::array< std::uint64_t > {
26425 };
26426 
26427 }
26428 }
26429 
26430 namespace color {
26431 namespace trait {
26432 
26433 template< >
26434 struct container< ::color::category::YDbDr_float >
26435 	: public ::color::_internal::utility::container::array< float, 3 > {
26436 };
26437 
26438 template< >
26439 struct container< ::color::category::YDbDr_double >
26440 	: public ::color::_internal::utility::container::array< double, 3 > {
26441 };
26442 
26443 template< >
26444 struct container< ::color::category::YDbDr_ldouble >
26445 	: public ::color::_internal::utility::container::array< long double, 3 > {
26446 };
26447 
26448 }
26449 }
26450 
26451 namespace color {
26452 namespace trait {
26453 
26454 template< >
26455 struct container< ::color::category::YDbDr_uint8 >
26456 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
26457 };
26458 
26459 template< >
26460 struct container< ::color::category::YDbDr_uint16 >
26461 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
26462 };
26463 
26464 template< >
26465 struct container< ::color::category::YDbDr_uint32 >
26466 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
26467 };
26468 
26469 template< >
26470 struct container< ::color::category::YDbDr_uint64 >
26471 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
26472 };
26473 
26474 }
26475 }
26476 
26477 namespace color {
26478 namespace constant {
26479 
26480 template< typename category_name >
26481 struct YDbDr {
26482 public:
26483 	typedef category_name category_type;
26484 
26485 	typedef typename ::color::trait::scalar< category_name >::instance_type scalar_type;
26486 
26487 	typedef ::color::constant::YDbDr<category_type> this_type;
26488 
onecolor::constant::YDbDr26489 	static scalar_type const one() {
26490 		return 1;
26491 	}
26492 
Wrcolor::constant::YDbDr26493 	static scalar_type const Wr() {
26494 		return 0.298839;
26495 	}
Wbcolor::constant::YDbDr26496 	static scalar_type const Wb() {
26497 		return 0.114350;
26498 	}
Wgcolor::constant::YDbDr26499 	static scalar_type const Wg() {
26500 		return this_type::one() - this_type::Wr()-this_type::Wb();
26501 	}
Umaxcolor::constant::YDbDr26502 	static scalar_type const Umax() {
26503 		return 0.436;
26504 	}
Vmaxcolor::constant::YDbDr26505 	static scalar_type const Vmax() {
26506 		return 0.615;
26507 	}
26508 
DB_scalecolor::constant::YDbDr26509 	static scalar_type const DB_scale() {
26510 		return +3.059;
26511 	}
DR_scalecolor::constant::YDbDr26512 	static scalar_type const DR_scale() {
26513 		return -2.169;
26514 	}
26515 
DB_mincolor::constant::YDbDr26516 	static scalar_type const DB_min() {
26517 		return - this_type::Umax() * this_type::DR_scale();
26518 	}
DB_maxcolor::constant::YDbDr26519 	static scalar_type const DB_max() {
26520 		return this_type::Umax() * this_type::DR_scale();
26521 	}
DB_rangecolor::constant::YDbDr26522 	static scalar_type const DB_range() {
26523 		return this_type::DB_max() - this_type::DB_min();
26524 	}
26525 
DR_mincolor::constant::YDbDr26526 	static scalar_type const DR_min() {
26527 		return this_type::Umax() * this_type::DR_scale();
26528 	}
DR_maxcolor::constant::YDbDr26529 	static scalar_type const DR_max() {
26530 		return - this_type::Umax() * this_type::DR_scale();
26531 	}
DR_rangecolor::constant::YDbDr26532 	static scalar_type const DR_range() {
26533 		return this_type::DR_max() - this_type::DR_min();
26534 	}
26535 
DB_diversecolor::constant::YDbDr26536 	static scalar_type DB_diverse(scalar_type const& normal) {
26537 		return this_type::DB_range() * normal + this_type::DB_min();
26538 	}
DB_normalizecolor::constant::YDbDr26539 	static scalar_type DB_normalize(scalar_type const& divert) {
26540 		return (divert - this_type::DB_min()) /this_type::DB_range();
26541 	}
26542 
DR_diversecolor::constant::YDbDr26543 	static scalar_type DR_diverse(scalar_type const& normal) {
26544 		return this_type::DR_range() * normal + this_type::DR_min();
26545 	}
DR_normalizecolor::constant::YDbDr26546 	static scalar_type DR_normalize(scalar_type const& divert) {
26547 		return (divert - this_type::DR_min()) /this_type::DR_range();
26548 	}
26549 };
26550 
26551 }
26552 }
26553 
26554 namespace color {
26555 
26556 template< typename type_name >
26557 using YDbDr = ::color::model< typename ::color::category::YDbDr< type_name > >;
26558 
26559 }
26560 
26561 namespace color {
26562 namespace place {
26563 namespace _internal {
26564 
26565 template< typename tag_name >
26566 struct luma< ::color::category::YDbDr< tag_name > > {
26567 public:
26568 	typedef ::color::category::YDbDr< tag_name > category_type;
26569 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
26570 
26571 	enum { position_enum = 0 };
26572 	enum { has_enum = true };
26573 
positioncolor::place::_internal::luma26574 	static index_instance_type position() {
26575 		return position_enum;
26576 	}
26577 };
26578 
26579 }
26580 }
26581 }
26582 
26583 namespace color {
26584 namespace get {
26585 
26586 template< typename tag_name >
26587 inline
26588 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::YDbDr<tag_name> >::akin_type >::return_type
gray(::color::model<::color::category::YDbDr<tag_name>> const & color_parameter)26589 gray(::color::model< ::color::category::YDbDr<tag_name> > const& color_parameter) {
26590 	typedef ::color::category::YDbDr< tag_name > category_type;
26591 	typedef typename ::color::akin::gray<category_type>::akin_type akin_type;
26592 	typedef ::color::_internal::reformat< akin_type, category_type > reformat_type;
26593 	return reformat_type::template process<0,0>(color_parameter.template get<0>());
26594 }
26595 
26596 }
26597 }
26598 
26599 namespace color {
26600 namespace get {
26601 
26602 template< typename tag_name >
26603 inline
26604 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YDbDr<tag_name> >::akin_type >::return_type
red(::color::model<::color::category::YDbDr<tag_name>> const & color_parameter)26605 red(::color::model< ::color::category::YDbDr<tag_name> > const& color_parameter) {
26606 	typedef ::color::category::YDbDr< tag_name > category_type;
26607 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
26608 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
26609 	return ::color::model< akin_type >(color_parameter).template get<red_p>();
26610 }
26611 
26612 }
26613 }
26614 
26615 namespace color {
26616 namespace get {
26617 
26618 template< typename tag_name >
26619 inline
26620 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YDbDr<tag_name> >::akin_type >::return_type
green(::color::model<::color::category::YDbDr<tag_name>> const & color_parameter)26621 green(::color::model< ::color::category::YDbDr<tag_name> > const& color_parameter) {
26622 	typedef ::color::category::YDbDr<tag_name> category_type;
26623 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
26624 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
26625 	return ::color::model< akin_type >(color_parameter).template get<green_p>();
26626 }
26627 
26628 }
26629 }
26630 
26631 namespace color {
26632 namespace get {
26633 
26634 template< typename tag_name >
26635 inline
26636 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YDbDr<tag_name> >::akin_type >::return_type
blue(::color::model<::color::category::YDbDr<tag_name>> const & color_parameter)26637 blue(::color::model< ::color::category::YDbDr<tag_name> > const& color_parameter) {
26638 	typedef ::color::category::YDbDr<tag_name> category_type;
26639 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
26640 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
26641 	return ::color::model< akin_type >(color_parameter).template get<blue_p>();
26642 }
26643 
26644 }
26645 }
26646 
26647 namespace color {
26648 namespace set {
26649 
26650 template< typename tag_name >
26651 inline
26652 void
blue(::color::model<::color::category::YDbDr<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::YDbDr<tag_name>>::akin_type>::model_type component_parameter)26653 blue
26654 (
26655 	::color::model< ::color::category::YDbDr< tag_name > > & color_parameter
26656 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YDbDr< tag_name > >::akin_type >::model_type component_parameter
26657 ) {
26658 	typedef ::color::category::YDbDr< tag_name > category_type;
26659 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
26660 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
26661 	::color::model< akin_type > rgb_instance(color_parameter);
26662 	rgb_instance.template set<blue_p > (component_parameter);
26663 	color_parameter = rgb_instance;
26664 }
26665 
26666 }
26667 }
26668 
26669 namespace color {
26670 namespace set {
26671 
26672 template< typename tag_name >
26673 inline
26674 void
green(::color::model<::color::category::YDbDr<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::YDbDr<tag_name>>::akin_type>::model_type component_parameter)26675 green
26676 (
26677 	::color::model< ::color::category::YDbDr< tag_name > > & color_parameter
26678 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YDbDr< tag_name > >::akin_type >::model_type component_parameter
26679 ) {
26680 	typedef ::color::category::YDbDr< tag_name > category_type;
26681 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
26682 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
26683 	::color::model< akin_type > rgb(color_parameter);
26684 	rgb.template set< green_p > (component_parameter);
26685 	color_parameter = rgb;
26686 }
26687 
26688 }
26689 }
26690 
26691 namespace color {
26692 namespace set {
26693 
26694 template< typename tag_name >
26695 inline
26696 void
red(::color::model<::color::category::YDbDr<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::YDbDr<tag_name>>::akin_type>::model_type component_parameter)26697 red
26698 (
26699 	::color::model< ::color::category::YDbDr< tag_name > > & color_parameter
26700 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YDbDr< tag_name > >::akin_type >::model_type component_parameter
26701 ) {
26702 	typedef ::color::category::YDbDr< tag_name > category_type;
26703 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
26704 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
26705 	::color::model< akin_type > rgb(color_parameter);
26706 	rgb.template set<red_p> (component_parameter);
26707 	color_parameter = rgb;
26708 }
26709 
26710 }
26711 }
26712 
26713 namespace color {
26714 namespace set {
26715 
26716 template< typename tag_name >
26717 inline
26718 void
gray(::color::model<::color::category::YDbDr<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::YDbDr<tag_name>>::akin_type>::model_type component_parameter)26719 gray
26720 (
26721 	::color::model< ::color::category::YDbDr< tag_name > > & color_parameter
26722 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::YDbDr< tag_name > >::akin_type >::model_type component_parameter
26723 ) {
26724 	typedef ::color::category::YDbDr< tag_name > category_type;
26725 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
26726 	typedef ::color::_internal::reformat< category_type, akin_type > reformat_type;
26727 	color_parameter.template set<0>(reformat_type::template process<0,0>(component_parameter));
26728 }
26729 
26730 }
26731 }
26732 
26733 namespace color {
26734 namespace _internal {
26735 
26736 template< typename YDbDr_tag_name, typename gray_tag_name >
26737 struct convert
26738 	<
26739 	::color::category::YDbDr< YDbDr_tag_name >
26740 	,::color::category::gray< gray_tag_name >
26741 	> {
26742 public:
26743 	typedef ::color::category::YDbDr< YDbDr_tag_name > category_left_type;
26744 	typedef ::color::category::gray< gray_tag_name > category_right_type;
26745 
26746 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
26747 
26748 	typedef ::color::trait::bound<category_left_type> bound_left_trait_type;
26749 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
26750 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
26751 
26752 	typedef typename container_left_trait_type::input_type container_left_input_type;
26753 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
26754 
26755 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
26756 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
26757 
processcolor::_internal::convert26758 	static void process
26759 	(
26760 		container_left_input_type left
26761 		,container_right_const_input_type right
26762 	) {
26763 		scalar_type g = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
26764 		auto Y = diverse_type::template process<0>(g);
26765 		static auto const Db = diverse_type::template process<1>(0.5);
26766 		static auto const Dr = diverse_type::template process<2>(0.5);
26767 		container_left_trait_type::template set<0>(left, Y);
26768 		container_left_trait_type::template set<1>(left, Db);
26769 		container_left_trait_type::template set<2>(left, Dr);
26770 	}
26771 };
26772 
26773 }
26774 }
26775 
26776 namespace color {
26777 namespace _internal {
26778 
26779 template< typename YDbDr_tag_name, typename cmy_tag_name >
26780 struct convert
26781 	<
26782 	::color::category::YDbDr< YDbDr_tag_name >
26783 	,::color::category::cmy< cmy_tag_name >
26784 	> {
26785 public:
26786 	typedef ::color::category::YDbDr< YDbDr_tag_name > category_left_type;
26787 	typedef ::color::category::cmy< cmy_tag_name > category_right_type;
26788 
26789 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
26790 
26791 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
26792 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
26793 
26794 	typedef typename container_left_trait_type::input_type container_left_input_type;
26795 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
26796 
26797 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
26798 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
26799 
26800 	typedef ::color::constant::YDbDr< category_left_type > YDbDr_const_type;
26801 
26802 	enum {
26803 		cyan_p = ::color::place::_internal::cyan<category_right_type>::position_enum
26804 		,magenta_p = ::color::place::_internal::magenta<category_right_type>::position_enum
26805 		, yellow_p = ::color::place::_internal::yellow<category_right_type>::position_enum
26806 	};
26807 
processcolor::_internal::convert26808 	static void process
26809 	(
26810 		container_left_input_type left
26811 		,container_right_const_input_type right
26812 	) {
26813 		static scalar_type const Wr = YDbDr_const_type::Wr();
26814 		static scalar_type const Wb = YDbDr_const_type::Wb();
26815 		static scalar_type const Wg = YDbDr_const_type::Wg();
26816 		static scalar_type const Umax = YDbDr_const_type::Umax();
26817 		static scalar_type const Vmax = YDbDr_const_type::Vmax();
26818 		scalar_type r = scalar_type(1) - normalize_type::template process< cyan_p>(container_right_trait_type::template get< cyan_p>(right));
26819 		scalar_type g = scalar_type(1) - normalize_type::template process<magenta_p>(container_right_trait_type::template get<magenta_p>(right));
26820 		scalar_type b = scalar_type(1) - normalize_type::template process< yellow_p>(container_right_trait_type::template get< yellow_p>(right));
26821 		scalar_type Y = Wr * r + Wg * g + Wb * b;
26822 		scalar_type u = Umax * (b - Y)/(1- Wb);
26823 		scalar_type v = Vmax * (r - Y)/(1- Wr);
26824 		scalar_type Db = YDbDr_const_type::DB_scale() * u;
26825 		scalar_type Dr = YDbDr_const_type::DR_scale() * v;
26826 		Db = YDbDr_const_type::DB_normalize(Db);
26827 		Dr = YDbDr_const_type::DR_normalize(Dr);
26828 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(Y));
26829 		container_left_trait_type::template set<1>(left, diverse_type::template process<1>(Db));
26830 		container_left_trait_type::template set<2>(left, diverse_type::template process<2>(Dr));
26831 	}
26832 };
26833 
26834 }
26835 }
26836 
26837 namespace color {
26838 namespace _internal {
26839 
26840 template< typename YDbDr_tag_name, typename cmyk_tag_name >
26841 struct convert
26842 	<
26843 	::color::category::YDbDr< YDbDr_tag_name >
26844 	,::color::category::cmyk< cmyk_tag_name >
26845 	> {
26846 public:
26847 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
26848 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
26849 
26850 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
26851 
26852 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
26853 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
26854 
26855 	typedef ::color::rgb< scalar_type > rgb_model_type;
26856 
26857 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
26858 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
26859 
26860 	typedef typename container_left_trait_type::input_type container_left_input_type;
26861 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
26862 
processcolor::_internal::convert26863 	static void process
26864 	(
26865 		container_left_input_type left
26866 		,container_right_const_input_type right
26867 	) {
26868 		left = YDbDr_model_type(rgb_model_type(cmyk_model_type(right))).container();
26869 	}
26870 };
26871 
26872 }
26873 }
26874 
26875 namespace color {
26876 namespace _internal {
26877 
26878 template< typename YDbDr_tag_name, typename hsl_tag_name >
26879 struct convert
26880 	<
26881 	::color::category::YDbDr< YDbDr_tag_name >
26882 	,::color::category::hsl< hsl_tag_name >
26883 	> {
26884 public:
26885 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
26886 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
26887 
26888 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
26889 
26890 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
26891 	typedef ::color::model< hsl_category_type > hsl_model_type;
26892 
26893 	typedef ::color::rgb< scalar_type > rgb_model_type;
26894 
26895 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
26896 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
26897 
26898 	typedef typename container_left_trait_type::input_type container_left_input_type;
26899 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
26900 
processcolor::_internal::convert26901 	static void process
26902 	(
26903 		container_left_input_type left
26904 		,container_right_const_input_type right
26905 	) {
26906 		left = YDbDr_model_type(rgb_model_type(hsl_model_type(right))).container();
26907 	}
26908 };
26909 
26910 }
26911 }
26912 
26913 namespace color {
26914 namespace _internal {
26915 
26916 template< typename YDbDr_tag_name, typename hsv_tag_name >
26917 struct convert
26918 	<
26919 	::color::category::YDbDr< YDbDr_tag_name >
26920 	,::color::category::hsv< hsv_tag_name >
26921 	> {
26922 public:
26923 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
26924 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
26925 
26926 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
26927 
26928 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
26929 	typedef ::color::model< hsv_category_type > hsv_model_type;
26930 
26931 	typedef ::color::rgb< scalar_type > rgb_model_type;
26932 
26933 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
26934 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
26935 
26936 	typedef typename container_left_trait_type::input_type container_left_input_type;
26937 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
26938 
processcolor::_internal::convert26939 	static void process
26940 	(
26941 		container_left_input_type left
26942 		,container_right_const_input_type right
26943 	) {
26944 		left = YDbDr_model_type(rgb_model_type(hsv_model_type(right))).container();
26945 	}
26946 };
26947 
26948 }
26949 }
26950 
26951 namespace color {
26952 namespace _internal {
26953 
26954 template< typename YDbDr_tag_name, typename hsi_tag_name >
26955 struct convert
26956 	<
26957 	::color::category::YDbDr< YDbDr_tag_name >
26958 	,::color::category::hsi< hsi_tag_name >
26959 	> {
26960 public:
26961 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
26962 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
26963 
26964 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
26965 
26966 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
26967 	typedef ::color::model< hsi_category_type > hsi_model_type;
26968 
26969 	typedef ::color::rgb< scalar_type > rgb_model_type;
26970 
26971 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
26972 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
26973 
26974 	typedef typename container_left_trait_type::input_type container_left_input_type;
26975 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
26976 
processcolor::_internal::convert26977 	static void process
26978 	(
26979 		container_left_input_type left
26980 		,container_right_const_input_type right
26981 	) {
26982 		left = YDbDr_model_type(rgb_model_type(hsi_model_type(right))).container();
26983 	}
26984 };
26985 
26986 }
26987 }
26988 
26989 namespace color {
26990 namespace _internal {
26991 
26992 template
26993 <
26994 	typename YDbDr_tag_name
26995 	,typename hwb_tag_name
26996 	>
26997 struct convert
26998 	<
26999 	::color::category::YDbDr< YDbDr_tag_name >
27000 	,::color::category::hwb< hwb_tag_name >
27001 	> {
27002 public:
27003 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
27004 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
27005 
27006 	typedef typename ::color::trait::scalar< YDbDr_category_type >::instance_type scalar_type;
27007 
27008 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
27009 	typedef ::color::model< hwb_category_type > hwb_model_type;
27010 
27011 	typedef ::color::rgb< scalar_type > rgb_model_type;
27012 	typedef ::color::hsv< scalar_type > hsv_model_type;
27013 
27014 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
27015 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
27016 
27017 	typedef typename container_left_trait_type::input_type container_left_input_type;
27018 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
27019 
processcolor::_internal::convert27020 	static void process
27021 	(
27022 		container_left_input_type left
27023 		,container_right_const_input_type right
27024 	) {
27025 		left = YDbDr_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right)))).container();
27026 	}
27027 };
27028 
27029 }
27030 }
27031 
27032 namespace color {
27033 namespace _internal {
27034 
27035 template< typename YDbDr_tag_name, typename rgb_tag_name >
27036 struct convert
27037 	<
27038 	::color::category::YDbDr< YDbDr_tag_name >
27039 	,::color::category::rgb< rgb_tag_name >
27040 	> {
27041 public:
27042 	typedef ::color::category::YDbDr< YDbDr_tag_name > category_left_type;
27043 	typedef ::color::category::rgb< rgb_tag_name > category_right_type;
27044 
27045 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
27046 
27047 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
27048 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
27049 
27050 	typedef typename container_left_trait_type::input_type container_left_input_type;
27051 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
27052 
27053 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
27054 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
27055 
27056 	typedef ::color::constant::YDbDr< category_left_type > YDbDr_const_type;
27057 
27058 	enum {
27059 		red_p = ::color::place::_internal::red<category_right_type>::position_enum
27060 		,green_p = ::color::place::_internal::green<category_right_type>::position_enum
27061 		,blue_p = ::color::place::_internal::blue<category_right_type>::position_enum
27062 	};
27063 
processcolor::_internal::convert27064 	static void process
27065 	(
27066 		container_left_input_type left
27067 		,container_right_const_input_type right
27068 	) {
27069 		static scalar_type const Wr = YDbDr_const_type::Wr();
27070 		static scalar_type const Wb = YDbDr_const_type::Wb();
27071 		static scalar_type const Wg = YDbDr_const_type::Wg();
27072 		static scalar_type const Umax = YDbDr_const_type::Umax();
27073 		static scalar_type const Vmax = YDbDr_const_type::Vmax();
27074 		scalar_type r = normalize_type::template process<red_p >(container_right_trait_type::template get<red_p >(right));
27075 		scalar_type g = normalize_type::template process<green_p>(container_right_trait_type::template get<green_p>(right));
27076 		scalar_type b = normalize_type::template process<blue_p >(container_right_trait_type::template get<blue_p >(right));
27077 		scalar_type Y = Wr * r + Wg * g + Wb * b;
27078 		scalar_type u = Umax * (b - Y)/(1- Wb);
27079 		scalar_type v = Vmax * (r - Y)/(1- Wr);
27080 		scalar_type Db = YDbDr_const_type::DB_scale() * u;
27081 		scalar_type Dr = YDbDr_const_type::DR_scale() * v;
27082 		Db = YDbDr_const_type::DB_normalize(Db);
27083 		Dr = YDbDr_const_type::DR_normalize(Dr);
27084 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(Y));
27085 		container_left_trait_type::template set<1>(left, diverse_type::template process<1>(Db));
27086 		container_left_trait_type::template set<2>(left, diverse_type::template process<2>(Dr));
27087 	}
27088 };
27089 
27090 }
27091 }
27092 
27093 namespace color {
27094 namespace _internal {
27095 
27096 template< typename YDbDr_tag_name, typename yiq_tag_name >
27097 struct convert
27098 	<
27099 	::color::category::YDbDr< YDbDr_tag_name >
27100 	,::color::category::yiq< yiq_tag_name >
27101 	> {
27102 public:
27103 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
27104 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
27105 
27106 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
27107 
27108 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
27109 	typedef ::color::model< yiq_category_type > yiq_model_type;
27110 
27111 	typedef ::color::rgb< scalar_type > rgb_model_type;
27112 
27113 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
27114 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
27115 
27116 	typedef typename container_left_trait_type::input_type container_left_input_type;
27117 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
27118 
processcolor::_internal::convert27119 	static void process
27120 	(
27121 		container_left_input_type left
27122 		,container_right_const_input_type right
27123 	) {
27124 		left = YDbDr_model_type(rgb_model_type(yiq_model_type(right))).container();
27125 	}
27126 };
27127 
27128 }
27129 }
27130 
27131 namespace color {
27132 namespace _internal {
27133 
27134 template
27135 <
27136 	typename YDbDr_tag_name
27137 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
27138 	>
27139 struct convert
27140 	<
27141 	::color::category::YDbDr< YDbDr_tag_name >
27142 	,::color::category::yuv< yuv_tag_name, yuv_reference_number >
27143 	> {
27144 public:
27145 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
27146 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_right_type;
27147 
27148 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
27149 
27150 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
27151 	typedef ::color::model< yuv_category_type > yuv_model_type;
27152 
27153 	typedef ::color::rgb< scalar_type > rgb_model_type;
27154 
27155 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
27156 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
27157 
27158 	typedef typename container_left_trait_type::input_type container_left_input_type;
27159 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
27160 
processcolor::_internal::convert27161 	static void process
27162 	(
27163 		container_left_input_type left
27164 		,container_right_const_input_type right
27165 	) {
27166 		left = YDbDr_model_type(rgb_model_type(yuv_model_type(right))).container();
27167 	}
27168 };
27169 
27170 }
27171 }
27172 
27173 namespace color {
27174 namespace _internal {
27175 
27176 template< typename YDbDr_tag_name, typename YCgCo_tag_name >
27177 struct convert
27178 	<
27179 	::color::category::YDbDr< YDbDr_tag_name >
27180 	,::color::category::YCgCo< YCgCo_tag_name >
27181 	> {
27182 public:
27183 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
27184 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
27185 
27186 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
27187 
27188 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
27189 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
27190 
27191 	typedef ::color::rgb< scalar_type > rgb_model_type;
27192 
27193 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
27194 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
27195 
27196 	typedef typename container_left_trait_type::input_type container_left_input_type;
27197 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
27198 
processcolor::_internal::convert27199 	static void process
27200 	(
27201 		container_left_input_type left
27202 		,container_right_const_input_type right
27203 	) {
27204 		left = YDbDr_model_type(rgb_model_type(YCgCo_model_type(right))).container();
27205 	}
27206 };
27207 
27208 }
27209 }
27210 
27211 namespace color {
27212 namespace _internal {
27213 
27214 template< typename tag_left_name, typename tag_right_name >
27215 struct convert
27216 	<
27217 	::color::category::YDbDr< tag_left_name >
27218 	,::color::category::YDbDr< tag_right_name>
27219 	> {
27220 public:
27221 	typedef ::color::category::YDbDr< tag_left_name > category_left_type;
27222 	typedef ::color::category::YDbDr< tag_right_name> category_right_type;
27223 
27224 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
27225 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
27226 
27227 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
27228 
27229 	typedef typename container_left_trait_type::input_type container_left_input_type;
27230 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
27231 
processcolor::_internal::convert27232 	static void process
27233 	(
27234 		container_left_input_type left
27235 		,container_right_const_input_type right
27236 	) {
27237 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
27238 		container_left_trait_type::template set<1>(left, reformat_type::template process<1,1>(container_right_trait_type::template get<1>(right)));
27239 		container_left_trait_type::template set<2>(left, reformat_type::template process<2,2>(container_right_trait_type::template get<2>(right)));
27240 	}
27241 };
27242 }
27243 }
27244 
27245 namespace color {
27246 namespace akin {
27247 
27248 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::gray_uint8, reference_number > {
27249 	typedef ::color::category::YPbPr_uint8 <reference_number> akin_type;
27250 };
27251 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::gray_uint16, reference_number > {
27252 	typedef ::color::category::YPbPr_uint16 <reference_number> akin_type;
27253 };
27254 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::gray_uint32, reference_number > {
27255 	typedef ::color::category::YPbPr_uint32 <reference_number> akin_type;
27256 };
27257 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::gray_uint64, reference_number > {
27258 	typedef ::color::category::YPbPr_uint64 <reference_number> akin_type;
27259 };
27260 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::gray_float, reference_number > {
27261 	typedef ::color::category::YPbPr_float <reference_number> akin_type;
27262 };
27263 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::gray_double, reference_number > {
27264 	typedef ::color::category::YPbPr_double <reference_number> akin_type;
27265 };
27266 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::gray_ldouble, reference_number > {
27267 	typedef ::color::category::YPbPr_ldouble<reference_number> akin_type;
27268 };
27269 
27270 }
27271 }
27272 
27273 namespace color {
27274 namespace akin {
27275 
27276 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::cmy_uint8, reference_number > {
27277 	typedef ::color::category::YPbPr_uint8 < reference_number> akin_type;
27278 };
27279 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::cmy_uint16, reference_number > {
27280 	typedef ::color::category::YPbPr_uint16 < reference_number> akin_type;
27281 };
27282 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::cmy_uint32, reference_number > {
27283 	typedef ::color::category::YPbPr_uint32 < reference_number> akin_type;
27284 };
27285 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::cmy_uint64, reference_number > {
27286 	typedef ::color::category::YPbPr_uint64 < reference_number> akin_type;
27287 };
27288 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::cmy_float, reference_number > {
27289 	typedef ::color::category::YPbPr_float < reference_number> akin_type;
27290 };
27291 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::cmy_double, reference_number > {
27292 	typedef ::color::category::YPbPr_double < reference_number> akin_type;
27293 };
27294 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::cmy_ldouble, reference_number > {
27295 	typedef ::color::category::YPbPr_ldouble< reference_number> akin_type;
27296 };
27297 
27298 }
27299 }
27300 
27301 namespace color {
27302 namespace akin {
27303 
27304 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::cmyk_uint8, reference_number > {
27305 	typedef ::color::category::YPbPr_uint8 <reference_number> akin_type;
27306 };
27307 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::cmyk_uint16, reference_number > {
27308 	typedef ::color::category::YPbPr_uint16 <reference_number> akin_type;
27309 };
27310 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::cmyk_uint32, reference_number > {
27311 	typedef ::color::category::YPbPr_uint32 <reference_number> akin_type;
27312 };
27313 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::cmyk_uint64, reference_number > {
27314 	typedef ::color::category::YPbPr_uint64 <reference_number> akin_type;
27315 };
27316 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::cmyk_float, reference_number > {
27317 	typedef ::color::category::YPbPr_float <reference_number> akin_type;
27318 };
27319 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::cmyk_double, reference_number > {
27320 	typedef ::color::category::YPbPr_double <reference_number> akin_type;
27321 };
27322 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::cmyk_ldouble, reference_number > {
27323 	typedef ::color::category::YPbPr_ldouble<reference_number> akin_type;
27324 };
27325 
27326 }
27327 }
27328 
27329 namespace color {
27330 namespace akin {
27331 
27332 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsl_uint8, reference_number > {
27333 	typedef ::color::category::YPbPr_uint8 <reference_number> akin_type;
27334 };
27335 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsl_uint16, reference_number > {
27336 	typedef ::color::category::YPbPr_uint16 <reference_number> akin_type;
27337 };
27338 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsl_uint32, reference_number > {
27339 	typedef ::color::category::YPbPr_uint32 <reference_number> akin_type;
27340 };
27341 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsl_uint64, reference_number > {
27342 	typedef ::color::category::YPbPr_uint64 <reference_number> akin_type;
27343 };
27344 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsl_float, reference_number > {
27345 	typedef ::color::category::YPbPr_float <reference_number> akin_type;
27346 };
27347 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsl_double, reference_number > {
27348 	typedef ::color::category::YPbPr_double <reference_number> akin_type;
27349 };
27350 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsl_ldouble, reference_number > {
27351 	typedef ::color::category::YPbPr_ldouble<reference_number> akin_type;
27352 };
27353 
27354 }
27355 }
27356 
27357 namespace color {
27358 namespace akin {
27359 
27360 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsv_uint8, reference_number > {
27361 	typedef ::color::category::YPbPr_uint8 <reference_number> akin_type;
27362 };
27363 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsv_uint16, reference_number > {
27364 	typedef ::color::category::YPbPr_uint16 <reference_number> akin_type;
27365 };
27366 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsv_uint32, reference_number > {
27367 	typedef ::color::category::YPbPr_uint32 <reference_number> akin_type;
27368 };
27369 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsv_uint64, reference_number > {
27370 	typedef ::color::category::YPbPr_uint64 <reference_number> akin_type;
27371 };
27372 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsv_float, reference_number > {
27373 	typedef ::color::category::YPbPr_float <reference_number> akin_type;
27374 };
27375 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsv_double, reference_number > {
27376 	typedef ::color::category::YPbPr_double <reference_number> akin_type;
27377 };
27378 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsv_ldouble, reference_number > {
27379 	typedef ::color::category::YPbPr_ldouble<reference_number> akin_type;
27380 };
27381 
27382 }
27383 }
27384 
27385 namespace color {
27386 namespace akin {
27387 
27388 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsi_uint8, reference_number > {
27389 	typedef ::color::category::YPbPr_uint8 <reference_number> akin_type;
27390 };
27391 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsi_uint16, reference_number > {
27392 	typedef ::color::category::YPbPr_uint16 <reference_number> akin_type;
27393 };
27394 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsi_uint32, reference_number > {
27395 	typedef ::color::category::YPbPr_uint32 <reference_number> akin_type;
27396 };
27397 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsi_uint64, reference_number > {
27398 	typedef ::color::category::YPbPr_uint64 <reference_number> akin_type;
27399 };
27400 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsi_float, reference_number > {
27401 	typedef ::color::category::YPbPr_float <reference_number> akin_type;
27402 };
27403 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsi_double, reference_number > {
27404 	typedef ::color::category::YPbPr_double <reference_number> akin_type;
27405 };
27406 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hsi_ldouble, reference_number > {
27407 	typedef ::color::category::YPbPr_ldouble<reference_number> akin_type;
27408 };
27409 
27410 }
27411 }
27412 
27413 namespace color {
27414 namespace akin {
27415 
27416 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hwb_uint8, reference_number > {
27417 	typedef ::color::category::YPbPr_uint8 < reference_number> akin_type;
27418 };
27419 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hwb_uint16, reference_number > {
27420 	typedef ::color::category::YPbPr_uint16 < reference_number> akin_type;
27421 };
27422 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hwb_uint32, reference_number > {
27423 	typedef ::color::category::YPbPr_uint32 < reference_number> akin_type;
27424 };
27425 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hwb_uint64, reference_number > {
27426 	typedef ::color::category::YPbPr_uint64 < reference_number> akin_type;
27427 };
27428 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hwb_float, reference_number > {
27429 	typedef ::color::category::YPbPr_float < reference_number> akin_type;
27430 };
27431 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hwb_double, reference_number > {
27432 	typedef ::color::category::YPbPr_double < reference_number> akin_type;
27433 };
27434 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::hwb_ldouble, reference_number > {
27435 	typedef ::color::category::YPbPr_ldouble< reference_number> akin_type;
27436 };
27437 
27438 }
27439 }
27440 
27441 namespace color {
27442 namespace akin {
27443 
27444 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::rgb_uint8, reference_number > {
27445 	typedef ::color::category::YPbPr_uint8 <reference_number> akin_type;
27446 };
27447 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::rgb_uint16, reference_number > {
27448 	typedef ::color::category::YPbPr_uint16 <reference_number> akin_type;
27449 };
27450 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::rgb_uint32, reference_number > {
27451 	typedef ::color::category::YPbPr_uint32 <reference_number> akin_type;
27452 };
27453 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::rgb_uint64, reference_number > {
27454 	typedef ::color::category::YPbPr_uint64 <reference_number> akin_type;
27455 };
27456 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::rgb_float, reference_number > {
27457 	typedef ::color::category::YPbPr_float <reference_number> akin_type;
27458 };
27459 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::rgb_double, reference_number > {
27460 	typedef ::color::category::YPbPr_double <reference_number> akin_type;
27461 };
27462 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::rgb_ldouble, reference_number > {
27463 	typedef ::color::category::YPbPr_ldouble<reference_number> akin_type;
27464 };
27465 
27466 }
27467 }
27468 
27469 namespace color {
27470 namespace akin {
27471 
27472 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::yiq_uint8, reference_number > {
27473 	typedef ::color::category::YPbPr_uint8 <reference_number> akin_type;
27474 };
27475 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::yiq_uint16, reference_number > {
27476 	typedef ::color::category::YPbPr_uint16 <reference_number> akin_type;
27477 };
27478 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::yiq_uint32, reference_number > {
27479 	typedef ::color::category::YPbPr_uint32 <reference_number> akin_type;
27480 };
27481 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::yiq_uint64, reference_number > {
27482 	typedef ::color::category::YPbPr_uint64 <reference_number> akin_type;
27483 };
27484 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::yiq_float, reference_number > {
27485 	typedef ::color::category::YPbPr_float <reference_number> akin_type;
27486 };
27487 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::yiq_double, reference_number > {
27488 	typedef ::color::category::YPbPr_double <reference_number> akin_type;
27489 };
27490 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::yiq_ldouble, reference_number > {
27491 	typedef ::color::category::YPbPr_ldouble<reference_number> akin_type;
27492 };
27493 
27494 }
27495 }
27496 
27497 namespace color {
27498 namespace akin {
27499 
27500 template
27501 <
27502 	typename tag_name
27503 	,typename ::color::constant::YPbPr::reference_enum YPbPr_reference_number
27504 	,typename ::color::constant::yuv::reference_enum yuv_reference_number
27505 	>
27506 struct YPbPr< ::color::category::yuv< tag_name, yuv_reference_number >, YPbPr_reference_number > {
27507 public:
27508 	typedef ::color::category::YPbPr< tag_name, YPbPr_reference_number > akin_type;
27509 };
27510 
27511 }
27512 }
27513 
27514 namespace color {
27515 namespace akin {
27516 
27517 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::YCgCo_uint8, reference_number > {
27518 	typedef ::color::category::YPbPr_uint8 <reference_number> akin_type;
27519 };
27520 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::YCgCo_uint16, reference_number > {
27521 	typedef ::color::category::YPbPr_uint16 <reference_number> akin_type;
27522 };
27523 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::YCgCo_uint32, reference_number > {
27524 	typedef ::color::category::YPbPr_uint32 <reference_number> akin_type;
27525 };
27526 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::YCgCo_uint64, reference_number > {
27527 	typedef ::color::category::YPbPr_uint64 <reference_number> akin_type;
27528 };
27529 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::YCgCo_float, reference_number > {
27530 	typedef ::color::category::YPbPr_float <reference_number> akin_type;
27531 };
27532 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::YCgCo_double, reference_number > {
27533 	typedef ::color::category::YPbPr_double <reference_number> akin_type;
27534 };
27535 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::YCgCo_ldouble, reference_number > {
27536 	typedef ::color::category::YPbPr_ldouble<reference_number> akin_type;
27537 };
27538 
27539 }
27540 }
27541 
27542 namespace color {
27543 namespace akin {
27544 
27545 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::YDbDr_uint8, reference_number > {
27546 	typedef ::color::category::YPbPr_uint8 <reference_number> akin_type;
27547 };
27548 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::YDbDr_uint16, reference_number > {
27549 	typedef ::color::category::YPbPr_uint16 <reference_number> akin_type;
27550 };
27551 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::YDbDr_uint32, reference_number > {
27552 	typedef ::color::category::YPbPr_uint32 <reference_number> akin_type;
27553 };
27554 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::YDbDr_uint64, reference_number > {
27555 	typedef ::color::category::YPbPr_uint64 <reference_number> akin_type;
27556 };
27557 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::YDbDr_float, reference_number > {
27558 	typedef ::color::category::YPbPr_float <reference_number> akin_type;
27559 };
27560 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::YDbDr_double, reference_number > {
27561 	typedef ::color::category::YPbPr_double <reference_number> akin_type;
27562 };
27563 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::YDbDr_ldouble, reference_number > {
27564 	typedef ::color::category::YPbPr_ldouble<reference_number> akin_type;
27565 };
27566 
27567 }
27568 }
27569 
27570 namespace color {
27571 namespace akin {
27572 
27573 template< typename tag_name, ::color::constant::YPbPr::reference_enum reference_number >
27574 struct YPbPr< ::color::category::YPbPr< tag_name, reference_number >, reference_number > {
27575 public:
27576 	typedef ::color::category::YPbPr< tag_name, reference_number > akin_type;
27577 };
27578 
27579 }
27580 }
27581 
27582 namespace color {
27583 namespace akin {
27584 
27585 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::xyz_uint8, reference_number > {
27586 	typedef ::color::category::YPbPr_uint8 <reference_number> akin_type;
27587 };
27588 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::xyz_uint16, reference_number > {
27589 	typedef ::color::category::YPbPr_uint16 <reference_number> akin_type;
27590 };
27591 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::xyz_uint32, reference_number > {
27592 	typedef ::color::category::YPbPr_uint32 <reference_number> akin_type;
27593 };
27594 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::xyz_uint64, reference_number > {
27595 	typedef ::color::category::YPbPr_uint64 <reference_number> akin_type;
27596 };
27597 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::xyz_float, reference_number > {
27598 	typedef ::color::category::YPbPr_float <reference_number> akin_type;
27599 };
27600 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::xyz_double, reference_number > {
27601 	typedef ::color::category::YPbPr_double <reference_number> akin_type;
27602 };
27603 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::xyz_ldouble, reference_number > {
27604 	typedef ::color::category::YPbPr_ldouble<reference_number> akin_type;
27605 };
27606 
27607 }
27608 }
27609 
27610 namespace color {
27611 namespace akin {
27612 
27613 template
27614 <
27615 	typename tag_name
27616 	,::color::constant::YPbPr::reference_enum YPbPr_reference_number
27617 	,::color::constant::lab::reference_enum lab_reference_number
27618 	>
27619 struct YPbPr< ::color::category::lab< tag_name, lab_reference_number >, YPbPr_reference_number > {
27620 public:
27621 	typedef ::color::category::YPbPr< tag_name, YPbPr_reference_number > akin_type;
27622 };
27623 
27624 }
27625 }
27626 
27627 namespace color {
27628 namespace akin {
27629 
27630 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::xyy_uint8, reference_number > {
27631 	typedef ::color::category::YPbPr_uint8 <reference_number> akin_type;
27632 };
27633 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::xyy_uint16, reference_number > {
27634 	typedef ::color::category::YPbPr_uint16 <reference_number> akin_type;
27635 };
27636 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::xyy_uint32, reference_number > {
27637 	typedef ::color::category::YPbPr_uint32 <reference_number> akin_type;
27638 };
27639 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::xyy_uint64, reference_number > {
27640 	typedef ::color::category::YPbPr_uint64 <reference_number> akin_type;
27641 };
27642 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::xyy_float, reference_number > {
27643 	typedef ::color::category::YPbPr_float <reference_number> akin_type;
27644 };
27645 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::xyy_double, reference_number > {
27646 	typedef ::color::category::YPbPr_double <reference_number> akin_type;
27647 };
27648 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::xyy_ldouble, reference_number > {
27649 	typedef ::color::category::YPbPr_ldouble<reference_number> akin_type;
27650 };
27651 
27652 }
27653 }
27654 
27655 namespace color {
27656 namespace akin {
27657 
27658 template
27659 <
27660 	typename tag_name
27661 	,::color::constant::YPbPr::reference_enum YPbPr_reference_number
27662 	,::color::constant::lms::reference_enum lms_reference_number
27663 	>
27664 struct YPbPr< ::color::category::lms< tag_name, lms_reference_number >, YPbPr_reference_number > {
27665 public:
27666 	typedef ::color::category::YPbPr< tag_name, YPbPr_reference_number > akin_type;
27667 };
27668 
27669 }
27670 }
27671 
27672 namespace color {
27673 namespace akin {
27674 
27675 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::luv_uint8, reference_number > {
27676 	typedef ::color::category::YPbPr_uint8 <reference_number> akin_type;
27677 };
27678 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::luv_uint16, reference_number > {
27679 	typedef ::color::category::YPbPr_uint16 <reference_number> akin_type;
27680 };
27681 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::luv_uint32, reference_number > {
27682 	typedef ::color::category::YPbPr_uint32 <reference_number> akin_type;
27683 };
27684 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::luv_uint64, reference_number > {
27685 	typedef ::color::category::YPbPr_uint64 <reference_number> akin_type;
27686 };
27687 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::luv_float, reference_number > {
27688 	typedef ::color::category::YPbPr_float <reference_number> akin_type;
27689 };
27690 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::luv_double, reference_number > {
27691 	typedef ::color::category::YPbPr_double <reference_number> akin_type;
27692 };
27693 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::luv_ldouble, reference_number > {
27694 	typedef ::color::category::YPbPr_ldouble<reference_number> akin_type;
27695 };
27696 
27697 }
27698 }
27699 
27700 namespace color {
27701 namespace akin {
27702 
27703 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::LabCH_uint8, reference_number > {
27704 	typedef ::color::category::YPbPr_uint8 < reference_number> akin_type;
27705 };
27706 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::LabCH_uint16, reference_number > {
27707 	typedef ::color::category::YPbPr_uint16 < reference_number> akin_type;
27708 };
27709 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::LabCH_uint32, reference_number > {
27710 	typedef ::color::category::YPbPr_uint32 < reference_number> akin_type;
27711 };
27712 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::LabCH_uint64, reference_number > {
27713 	typedef ::color::category::YPbPr_uint64 < reference_number> akin_type;
27714 };
27715 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::LabCH_float, reference_number > {
27716 	typedef ::color::category::YPbPr_float < reference_number> akin_type;
27717 };
27718 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::LabCH_double, reference_number > {
27719 	typedef ::color::category::YPbPr_double < reference_number> akin_type;
27720 };
27721 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::LabCH_ldouble, reference_number > {
27722 	typedef ::color::category::YPbPr_ldouble< reference_number> akin_type;
27723 };
27724 
27725 }
27726 }
27727 
27728 namespace color {
27729 namespace akin {
27730 
27731 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::LuvCH_uint8, reference_number > {
27732 	typedef ::color::category::YPbPr_uint8 < reference_number> akin_type;
27733 };
27734 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::LuvCH_uint16, reference_number > {
27735 	typedef ::color::category::YPbPr_uint16 < reference_number> akin_type;
27736 };
27737 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::LuvCH_uint32, reference_number > {
27738 	typedef ::color::category::YPbPr_uint32 < reference_number> akin_type;
27739 };
27740 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::LuvCH_uint64, reference_number > {
27741 	typedef ::color::category::YPbPr_uint64 < reference_number> akin_type;
27742 };
27743 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::LuvCH_float, reference_number > {
27744 	typedef ::color::category::YPbPr_float < reference_number> akin_type;
27745 };
27746 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::LuvCH_double, reference_number > {
27747 	typedef ::color::category::YPbPr_double < reference_number> akin_type;
27748 };
27749 template< ::color::constant::YPbPr::reference_enum reference_number >struct YPbPr< ::color::category::LuvCH_ldouble, reference_number > {
27750 	typedef ::color::category::YPbPr_ldouble< reference_number> akin_type;
27751 };
27752 
27753 }
27754 }
27755 
27756 namespace color {
27757 namespace trait {
27758 
27759 template < ::color::constant::YPbPr::reference_enum reference_number > struct info< ::color::category::YPbPr_uint8 <reference_number> > {
27760 public:
27761 	enum { implemented_entity = true };
27762 	enum { meaningful_entity = true };
27763 };
27764 template < ::color::constant::YPbPr::reference_enum reference_number > struct info< ::color::category::YPbPr_uint16 <reference_number> > {
27765 public:
27766 	enum { implemented_entity = true };
27767 	enum { meaningful_entity = true };
27768 };
27769 template < ::color::constant::YPbPr::reference_enum reference_number > struct info< ::color::category::YPbPr_uint32 <reference_number> > {
27770 public:
27771 	enum { implemented_entity = true };
27772 	enum { meaningful_entity = true };
27773 };
27774 template < ::color::constant::YPbPr::reference_enum reference_number > struct info< ::color::category::YPbPr_uint64 <reference_number> > {
27775 public:
27776 	enum { implemented_entity = true };
27777 	enum { meaningful_entity = true };
27778 };
27779 template < ::color::constant::YPbPr::reference_enum reference_number > struct info< ::color::category::YPbPr_float <reference_number> > {
27780 public:
27781 	enum { implemented_entity = true };
27782 	enum { meaningful_entity = true };
27783 };
27784 template < ::color::constant::YPbPr::reference_enum reference_number > struct info< ::color::category::YPbPr_double <reference_number> > {
27785 public:
27786 	enum { implemented_entity = true };
27787 	enum { meaningful_entity = true };
27788 };
27789 template < ::color::constant::YPbPr::reference_enum reference_number > struct info< ::color::category::YPbPr_ldouble<reference_number> > {
27790 public:
27791 	enum { implemented_entity = true };
27792 	enum { meaningful_entity = true };
27793 };
27794 
27795 }
27796 }
27797 
27798 namespace color {
27799 namespace _internal {
27800 namespace YPbPr {
27801 namespace bound {
27802 
27803 template< typename index_name, typename scalar_name >
27804 struct scalar {
27805 public:
27806 	typedef scalar_name scalar_type;
27807 	typedef index_name index_type;
27808 
27809 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
27810 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
27811 
27812 	typedef typename trait_type::instance_type instance_type;
27813 	typedef typename trait_type::return_image_type return_image_type;
27814 
27815 	typedef typename index_trait_type::instance_type index_instance_type;
27816 	typedef typename index_trait_type::model_type index_input_const_type;
27817 
27818 	template< index_instance_type index >
maximumcolor::_internal::YPbPr::bound::scalar27819 	static return_image_type maximum() {
27820 		static const instance_type max_list[] = { 1, 0.5, 0.5 };
27821 		return max_list[index];
27822 	}
27823 
maximumcolor::_internal::YPbPr::bound::scalar27824 	static return_image_type maximum(index_input_const_type index) {
27825 		static const instance_type max_list[] = { 1, 0.5, 0.5 };
27826 		return max_list[index];
27827 	}
27828 
27829 	template< index_instance_type index >
minimumcolor::_internal::YPbPr::bound::scalar27830 	static return_image_type minimum() {
27831 		static const instance_type min_list[] = { 0, -0.5, -0.5 };
27832 		return min_list[index];
27833 	}
27834 
minimumcolor::_internal::YPbPr::bound::scalar27835 	static return_image_type minimum(index_input_const_type index) {
27836 		static const instance_type min_list[] = { 0, -0.5, -0.5 };
27837 		return min_list[index];
27838 	}
27839 
27840 	template< index_instance_type index >
rangecolor::_internal::YPbPr::bound::scalar27841 	static return_image_type range() {
27842 		static const instance_type range_list[] = { 1, 1, 1 };
27843 		return range_list[index];
27844 	}
27845 
rangecolor::_internal::YPbPr::bound::scalar27846 	static return_image_type range(index_input_const_type index) {
27847 		static const instance_type range_list[] = { 1, 1, 1 };
27848 		return range_list[index];
27849 	}
27850 };
27851 
27852 }
27853 }
27854 }
27855 }
27856 
27857 namespace color {
27858 namespace trait {
27859 
27860 template< ::color::constant::YPbPr::reference_enum reference_number >
27861 struct bound< ::color::category::YPbPr_float< reference_number > >
27862 	: public ::color::_internal::YPbPr::bound::scalar< typename ::color::trait::index< ::color::category::YPbPr_float<reference_number> >::instance_type, float > {
27863 };
27864 
27865 template< ::color::constant::YPbPr::reference_enum reference_number >
27866 struct bound< ::color::category::YPbPr_double<reference_number> >
27867 	: public ::color::_internal::YPbPr::bound::scalar< typename ::color::trait::index< ::color::category::YPbPr_double<reference_number> >::instance_type, double > {
27868 };
27869 
27870 template< ::color::constant::YPbPr::reference_enum reference_number >
27871 struct bound< ::color::category::YPbPr_ldouble<reference_number> >
27872 	: public ::color::_internal::YPbPr::bound::scalar< typename ::color::trait::index< ::color::category::YPbPr_ldouble<reference_number> >::instance_type, long double > {
27873 };
27874 
27875 }
27876 }
27877 
27878 namespace color {
27879 namespace trait {
27880 
27881 template< ::color::constant::YPbPr::reference_enum reference_number >
27882 struct bound< ::color::category::YPbPr_uint8<reference_number> >
27883 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::YPbPr_uint8<reference_number> >::instance_type > {
27884 };
27885 
27886 template< ::color::constant::YPbPr::reference_enum reference_number >
27887 struct bound< ::color::category::YPbPr_uint16<reference_number> >
27888 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::YPbPr_uint16<reference_number> >::instance_type > {
27889 };
27890 
27891 template< ::color::constant::YPbPr::reference_enum reference_number >
27892 struct bound< ::color::category::YPbPr_uint32<reference_number> >
27893 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::YPbPr_uint32<reference_number> >::instance_type > {
27894 };
27895 
27896 template< ::color::constant::YPbPr::reference_enum reference_number >
27897 struct bound< ::color::category::YPbPr_uint64<reference_number> >
27898 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::YPbPr_uint64<reference_number> >::instance_type > {
27899 };
27900 
27901 }
27902 }
27903 
27904 namespace color {
27905 namespace trait {
27906 
27907 template< ::color::constant::YPbPr::reference_enum reference_number >
27908 struct component< ::color::category::YPbPr_float<reference_number> >
27909 	: public ::color::_internal::utility::component::array< float > {
27910 };
27911 
27912 template< ::color::constant::YPbPr::reference_enum reference_number >
27913 struct component< ::color::category::YPbPr_double<reference_number> >
27914 	: public ::color::_internal::utility::component::array< double > {
27915 };
27916 
27917 template< ::color::constant::YPbPr::reference_enum reference_number >
27918 struct component< ::color::category::YPbPr_ldouble<reference_number> >
27919 	: public ::color::_internal::utility::component::array< long double > {
27920 };
27921 
27922 }
27923 }
27924 
27925 namespace color {
27926 namespace trait {
27927 
27928 template< ::color::constant::YPbPr::reference_enum reference_number >
27929 struct component< ::color::category::YPbPr_uint8<reference_number> >
27930 	: public ::color::_internal::utility::component::array< std::uint8_t > {
27931 };
27932 
27933 template< ::color::constant::YPbPr::reference_enum reference_number >
27934 struct component< ::color::category::YPbPr_uint16<reference_number> >
27935 	: public ::color::_internal::utility::component::array< std::uint16_t > {
27936 };
27937 
27938 template< ::color::constant::YPbPr::reference_enum reference_number >
27939 struct component< ::color::category::YPbPr_uint32<reference_number> >
27940 	: public ::color::_internal::utility::component::array< std::uint32_t > {
27941 };
27942 
27943 template< ::color::constant::YPbPr::reference_enum reference_number >
27944 struct component< ::color::category::YPbPr_uint64<reference_number> >
27945 	: public ::color::_internal::utility::component::array< std::uint64_t > {
27946 };
27947 
27948 }
27949 }
27950 
27951 namespace color {
27952 namespace trait {
27953 
27954 template< ::color::constant::YPbPr::reference_enum reference_number >
27955 struct container< ::color::category::YPbPr_float<reference_number> >
27956 	: public ::color::_internal::utility::container::array< float, 3 > {
27957 };
27958 
27959 template< ::color::constant::YPbPr::reference_enum reference_number >
27960 struct container< ::color::category::YPbPr_double<reference_number> >
27961 	: public ::color::_internal::utility::container::array< double, 3 > {
27962 };
27963 
27964 template< ::color::constant::YPbPr::reference_enum reference_number >
27965 struct container< ::color::category::YPbPr_ldouble<reference_number> >
27966 	: public ::color::_internal::utility::container::array< long double, 3 > {
27967 };
27968 
27969 }
27970 }
27971 
27972 namespace color {
27973 namespace trait {
27974 
27975 template< ::color::constant::YPbPr::reference_enum reference_number >
27976 struct container< ::color::category::YPbPr_uint8<reference_number> >
27977 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
27978 };
27979 
27980 template< ::color::constant::YPbPr::reference_enum reference_number >
27981 struct container< ::color::category::YPbPr_uint16<reference_number> >
27982 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
27983 };
27984 
27985 template< ::color::constant::YPbPr::reference_enum reference_number >
27986 struct container< ::color::category::YPbPr_uint32<reference_number> >
27987 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
27988 };
27989 
27990 template< ::color::constant::YPbPr::reference_enum reference_number >
27991 struct container< ::color::category::YPbPr_uint64<reference_number> >
27992 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
27993 };
27994 
27995 }
27996 }
27997 
27998 namespace color {
27999 namespace constant {
28000 namespace YPbPr {
28001 
28002 namespace _internal {
28003 template< typename scalar_name, ::color::constant::YPbPr::reference_enum reference_number >
28004 struct base {
28005 	typedef scalar_name scalar_type;
CRedcolor::constant::YPbPr::_internal::base28006 	static scalar_type const CRed() {
28007 		return 0.0;
28008 	}
CGreencolor::constant::YPbPr::_internal::base28009 	static scalar_type const CGreen() {
28010 		return 0.0;
28011 	}
CBluecolor::constant::YPbPr::_internal::base28012 	static scalar_type const CBlue() {
28013 		return 0.0;
28014 	}
28015 
28016 };
28017 
28018 template< typename scalar_name >
28019 struct base< scalar_name, ::color::constant::YPbPr::BT_601_entity > {
28020 	typedef scalar_name scalar_type;
28021 	typedef ::color::constant::YPbPr::_internal::base< scalar_name, ::color::constant::YPbPr::BT_601_entity > this_type, base_type;
28022 
CRedcolor::constant::YPbPr::_internal::base28023 	static scalar_type const CRed() {
28024 		return 0.298839 ;
28025 	}
CGreencolor::constant::YPbPr::_internal::base28026 	static scalar_type const CGreen() {
28027 		return 1 - base_type::CRed() - base_type::CBlue();
28028 	}
CBluecolor::constant::YPbPr::_internal::base28029 	static scalar_type const CBlue() {
28030 		return 0.114350 ;
28031 	}
28032 };
28033 
28034 template< typename scalar_name >
28035 struct base< scalar_name, ::color::constant::YPbPr::BT_709_entity > {
28036 	typedef scalar_name scalar_type;
28037 	typedef ::color::constant::YPbPr::_internal::base< scalar_name, ::color::constant::YPbPr::BT_709_entity > this_type, base_type;
28038 
CRedcolor::constant::YPbPr::_internal::base28039 	static scalar_type const CRed() {
28040 		return 0.2126729;
28041 	}
CGreencolor::constant::YPbPr::_internal::base28042 	static scalar_type const CGreen() {
28043 		return 1 - base_type::CRed() - base_type::CBlue();
28044 	}
CBluecolor::constant::YPbPr::_internal::base28045 	static scalar_type const CBlue() {
28046 		return 0.0721750;
28047 	}
28048 };
28049 
28050 template< typename scalar_name >
28051 struct base< scalar_name, ::color::constant::YPbPr::BT_2020_entity > {
28052 	typedef scalar_name scalar_type;
28053 	typedef ::color::constant::YPbPr::_internal::base< scalar_name, ::color::constant::YPbPr::BT_2020_entity > this_type, base_type;
28054 
CRedcolor::constant::YPbPr::_internal::base28055 	static scalar_type const CRed() {
28056 		return 0.2627;
28057 	}
CGreencolor::constant::YPbPr::_internal::base28058 	static scalar_type const CGreen() {
28059 		return 1 - base_type::CRed() - base_type::CBlue();
28060 	}
CBluecolor::constant::YPbPr::_internal::base28061 	static scalar_type const CBlue() {
28062 		return 0.0593;
28063 	}
28064 };
28065 }
28066 
28067 template< typename tag_name, ::color::constant::YPbPr::reference_enum reference_number >
28068 struct parameter
28069 	: public ::color::constant::YPbPr::_internal::base< typename ::color::trait::scalar< ::color::category::YPbPr<tag_name,reference_number> >::instance_type, reference_number > {
28070 public:
28071 	typedef ::color::category::YPbPr<tag_name,reference_number > category_type;
28072 
28073 	typedef typename ::color::trait::scalar< category_type >::instance_type scalar_type;
28074 
28075 	typedef ::color::constant::YPbPr::parameter<category_type,reference_number> this_type;
28076 
Pb_mincolor::constant::YPbPr::parameter28077 	static scalar_type const Pb_min() {
28078 		return -0.5;
28079 	}
Pb_maxcolor::constant::YPbPr::parameter28080 	static scalar_type const Pb_max() {
28081 		return 0.5;
28082 	}
Pb_rangecolor::constant::YPbPr::parameter28083 	static scalar_type const Pb_range() {
28084 		return 1.0;
28085 	}
28086 
Pr_mincolor::constant::YPbPr::parameter28087 	static scalar_type const Pr_min() {
28088 		return -0.5;
28089 	}
Pr_maxcolor::constant::YPbPr::parameter28090 	static scalar_type const Pr_max() {
28091 		return 0.5;
28092 	}
Pr_rangecolor::constant::YPbPr::parameter28093 	static scalar_type const Pr_range() {
28094 		return 1.0;
28095 	}
28096 
a11color::constant::YPbPr::parameter28097 	static scalar_type const a11() {
28098 		return 1;
28099 	}
a12color::constant::YPbPr::parameter28100 	static scalar_type const a12() {
28101 		return 0;
28102 	}
a13color::constant::YPbPr::parameter28103 	static scalar_type const a13() {
28104 		return 2*(1- this_type::CRed());
28105 	}
a21color::constant::YPbPr::parameter28106 	static scalar_type const a21() {
28107 		return 1;
28108 	}
a22color::constant::YPbPr::parameter28109 	static scalar_type const a22() {
28110 		return 2 * this_type::CBlue()*(this_type::CBlue() - 1) / this_type::CGreen();
28111 	}
a23color::constant::YPbPr::parameter28112 	static scalar_type const a23() {
28113 		return 2 * this_type::CRed() *(this_type::CRed() - 1) / this_type::CGreen();
28114 	}
a31color::constant::YPbPr::parameter28115 	static scalar_type const a31() {
28116 		return 1;
28117 	}
a32color::constant::YPbPr::parameter28118 	static scalar_type const a32() {
28119 		return 2*(1- this_type::CBlue());
28120 	}
a33color::constant::YPbPr::parameter28121 	static scalar_type const a33() {
28122 		return 0;
28123 	}
28124 
b11color::constant::YPbPr::parameter28125 	static scalar_type const b11() {
28126 		return this_type::CRed();
28127 	}
b12color::constant::YPbPr::parameter28128 	static scalar_type const b12() {
28129 		return this_type::CGreen();
28130 	}
b13color::constant::YPbPr::parameter28131 	static scalar_type const b13() {
28132 		return this_type::CBlue();
28133 	}
b21color::constant::YPbPr::parameter28134 	static scalar_type const b21() {
28135 		return - this_type::CRed()/(1- this_type::CBlue()) / 2;
28136 	}
b22color::constant::YPbPr::parameter28137 	static scalar_type const b22() {
28138 		return - this_type::CGreen()/(1- this_type::CBlue()) / 2;
28139 	}
b23color::constant::YPbPr::parameter28140 	static scalar_type const b23() {
28141 		return 0.5;
28142 	}
b31color::constant::YPbPr::parameter28143 	static scalar_type const b31() {
28144 		return 0.5;
28145 	}
b32color::constant::YPbPr::parameter28146 	static scalar_type const b32() {
28147 		return - this_type::CGreen()/(1- this_type::CRed()) / 2;
28148 	}
b33color::constant::YPbPr::parameter28149 	static scalar_type const b33() {
28150 		return - this_type::CBlue()/(1- this_type::CRed()) / 2;
28151 	}
28152 
Pb_normalizecolor::constant::YPbPr::parameter28153 	static scalar_type Pb_normalize(scalar_type const& divert) {
28154 		return (divert - this_type::Pb_min()) /this_type::Pb_range();
28155 	}
Pb_diversecolor::constant::YPbPr::parameter28156 	static scalar_type Pb_diverse(scalar_type const& normal) {
28157 		return this_type::Pb_range() * normal + this_type::Pb_min();
28158 	}
28159 
Pr_diversecolor::constant::YPbPr::parameter28160 	static scalar_type Pr_diverse(scalar_type const& normal) {
28161 		return this_type::Pr_range() * normal + this_type::Pr_min();
28162 	}
Pr_normalizecolor::constant::YPbPr::parameter28163 	static scalar_type Pr_normalize(scalar_type const& divert) {
28164 		return (divert - this_type::Pr_min()) /this_type::Pr_range();
28165 	}
28166 
28167 };
28168 
28169 }
28170 }
28171 }
28172 
28173 namespace color {
28174 
28175 template< typename type_name, ::color::constant::YPbPr::reference_enum reference_number = ::color::constant::YPbPr::BT_709_entity >
28176 using YPbPr = ::color::model< ::color::category::YPbPr< type_name, reference_number > >;
28177 
28178 }
28179 
28180 namespace color {
28181 namespace place {
28182 namespace _internal {
28183 
28184 template< typename tag_name, ::color::constant::YPbPr::reference_enum reference_number >
28185 struct luma< ::color::category::YPbPr< tag_name, reference_number > > {
28186 public:
28187 	typedef ::color::category::YPbPr< tag_name, reference_number > category_type;
28188 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
28189 
28190 	enum { position_enum = 0 };
28191 	enum { has_enum = true };
28192 
positioncolor::place::_internal::luma28193 	static index_instance_type position() {
28194 		return position_enum;
28195 	}
28196 };
28197 
28198 }
28199 }
28200 }
28201 
28202 namespace color {
28203 namespace get {
28204 
28205 template< typename tag_name, ::color::constant::YPbPr::reference_enum reference_number >
28206 inline
28207 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::YPbPr<tag_name,reference_number> >::akin_type >::return_type
gray(::color::model<::color::category::YPbPr<tag_name,reference_number>> const & color_parameter)28208 gray(::color::model< ::color::category::YPbPr<tag_name,reference_number> > const& color_parameter) {
28209 	typedef ::color::category::YPbPr< tag_name, reference_number > category_type;
28210 	typedef typename ::color::akin::gray<category_type>::akin_type akin_type;
28211 	typedef ::color::_internal::reformat< akin_type, category_type > reformat_type;
28212 	return reformat_type::template process<0,0>(color_parameter.template get<0>());
28213 }
28214 
28215 }
28216 }
28217 
28218 namespace color {
28219 namespace get {
28220 
28221 template< typename tag_name, ::color::constant::YPbPr::reference_enum reference_number >
28222 inline
28223 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YPbPr<tag_name,reference_number> >::akin_type >::return_type
red(::color::model<::color::category::YPbPr<tag_name,reference_number>> const & color_parameter)28224 red(::color::model< ::color::category::YPbPr< tag_name, reference_number> > const& color_parameter) {
28225 	typedef ::color::category::YPbPr< tag_name,reference_number > category_type;
28226 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
28227 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
28228 	return ::color::model< akin_type >(color_parameter).template get<red_p>();
28229 }
28230 
28231 }
28232 }
28233 
28234 namespace color {
28235 namespace get {
28236 
28237 template< typename tag_name, ::color::constant::YPbPr::reference_enum reference_number >
28238 inline
28239 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YPbPr<tag_name,reference_number> >::akin_type >::return_type
green(::color::model<::color::category::YPbPr<tag_name,reference_number>> const & color_parameter)28240 green(::color::model< ::color::category::YPbPr<tag_name,reference_number> > const& color_parameter) {
28241 	typedef ::color::category::YPbPr<tag_name,reference_number> category_type;
28242 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
28243 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
28244 	return ::color::model< akin_type >(color_parameter).template get<green_p>();
28245 }
28246 
28247 }
28248 }
28249 
28250 namespace color {
28251 namespace get {
28252 
28253 template< typename tag_name, ::color::constant::YPbPr::reference_enum reference_number >
28254 inline
28255 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YPbPr<tag_name,reference_number> >::akin_type >::return_type
blue(::color::model<::color::category::YPbPr<tag_name,reference_number>> const & color_parameter)28256 blue(::color::model< ::color::category::YPbPr<tag_name,reference_number> > const& color_parameter) {
28257 	typedef ::color::category::YPbPr<tag_name,reference_number> category_type;
28258 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
28259 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
28260 	return ::color::model< akin_type >(color_parameter).template get<blue_p>();
28261 }
28262 
28263 }
28264 }
28265 
28266 namespace color {
28267 namespace set {
28268 
28269 template< typename tag_name, ::color::constant::YPbPr::reference_enum reference_number >
28270 inline
28271 void
blue(::color::model<::color::category::YPbPr<tag_name,reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::YPbPr<tag_name,reference_number>>::akin_type>::model_type component_parameter)28272 blue
28273 (
28274 	::color::model< ::color::category::YPbPr<tag_name,reference_number> > & color_parameter
28275 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YPbPr<tag_name,reference_number> >::akin_type >::model_type component_parameter
28276 ) {
28277 	typedef ::color::category::YPbPr<tag_name,reference_number> category_type;
28278 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
28279 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
28280 	::color::model< akin_type > rgb_instance(color_parameter);
28281 	rgb_instance.template set<blue_p > (component_parameter);
28282 	color_parameter = rgb_instance;
28283 }
28284 
28285 }
28286 }
28287 
28288 namespace color {
28289 namespace set {
28290 
28291 template< typename tag_name, ::color::constant::YPbPr::reference_enum reference_number >
28292 inline
28293 void
green(::color::model<::color::category::YPbPr<tag_name,reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::YPbPr<tag_name,reference_number>>::akin_type>::model_type component_parameter)28294 green
28295 (
28296 	::color::model< ::color::category::YPbPr<tag_name,reference_number> > & color_parameter
28297 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YPbPr<tag_name,reference_number> >::akin_type >::model_type component_parameter
28298 ) {
28299 	typedef ::color::category::YPbPr<tag_name,reference_number> category_type;
28300 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
28301 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
28302 	::color::model< akin_type > rgb(color_parameter);
28303 	rgb.template set< green_p > (component_parameter);
28304 	color_parameter = rgb;
28305 }
28306 
28307 }
28308 }
28309 
28310 namespace color {
28311 namespace set {
28312 
28313 template< typename tag_name, ::color::constant::YPbPr::reference_enum reference_number >
28314 inline
28315 void
red(::color::model<::color::category::YPbPr<tag_name,reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::YPbPr<tag_name,reference_number>>::akin_type>::model_type component_parameter)28316 red
28317 (
28318 	::color::model< ::color::category::YPbPr<tag_name,reference_number> > & color_parameter
28319 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::YPbPr<tag_name,reference_number> >::akin_type >::model_type component_parameter
28320 ) {
28321 	typedef ::color::category::YPbPr<tag_name,reference_number> category_type;
28322 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
28323 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
28324 	::color::model< akin_type > rgb(color_parameter);
28325 	rgb.template set<red_p> (component_parameter);
28326 	color_parameter = rgb;
28327 }
28328 
28329 }
28330 }
28331 
28332 namespace color {
28333 namespace set {
28334 
28335 template< typename tag_name, ::color::constant::YPbPr::reference_enum reference_number >
28336 inline
28337 void
gray(::color::model<::color::category::YPbPr<tag_name,reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::YPbPr<tag_name,reference_number>>::akin_type>::model_type component_parameter)28338 gray
28339 (
28340 	::color::model< ::color::category::YPbPr<tag_name,reference_number> > & color_parameter
28341 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::YPbPr<tag_name,reference_number> >::akin_type >::model_type component_parameter
28342 ) {
28343 	typedef ::color::category::YPbPr<tag_name,reference_number> category_type;
28344 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
28345 	typedef ::color::_internal::reformat< category_type, akin_type > reformat_type;
28346 	color_parameter.template set<0>(reformat_type::template process<0,0>(component_parameter));
28347 }
28348 
28349 }
28350 }
28351 
28352 namespace color {
28353 namespace _internal {
28354 
28355 template
28356 <
28357 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
28358 	,typename gray_tag_name
28359 	>
28360 struct convert
28361 	<
28362 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
28363 	,::color::category::gray< gray_tag_name >
28364 	> {
28365 public:
28366 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > category_left_type;
28367 	typedef ::color::category::gray< gray_tag_name > category_right_type;
28368 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
28369 
28370 	typedef ::color::trait::bound<category_left_type> bound_left_trait_type;
28371 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
28372 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
28373 
28374 	typedef typename container_left_trait_type::input_type container_left_input_type;
28375 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
28376 
28377 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
28378 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
28379 
processcolor::_internal::convert28380 	static void process
28381 	(
28382 		container_left_input_type left
28383 		,container_right_const_input_type right
28384 	) {
28385 		scalar_type g = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
28386 		auto Y = diverse_type::template process<0>(g);
28387 		static auto const Pb = diverse_type::template process<1>(0.5);
28388 		static auto const Pr = diverse_type::template process<2>(0.5);
28389 		container_left_trait_type::template set<0>(left, Y);
28390 		container_left_trait_type::template set<1>(left, Pb);
28391 		container_left_trait_type::template set<2>(left, Pr);
28392 	}
28393 };
28394 
28395 }
28396 }
28397 
28398 namespace color {
28399 namespace _internal {
28400 
28401 template
28402 <
28403 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
28404 	,typename cmy_tag_name
28405 	>
28406 struct convert
28407 	<
28408 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
28409 	,::color::category::cmy< cmy_tag_name >
28410 	> {
28411 public:
28412 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > category_left_type;
28413 	typedef ::color::category::cmy< cmy_tag_name > category_right_type;
28414 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
28415 
28416 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
28417 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
28418 
28419 	typedef typename container_left_trait_type::input_type container_left_input_type;
28420 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
28421 
28422 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
28423 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
28424 
28425 	typedef ::color::constant::YPbPr::parameter< YPbPr_tag_name, YPbPr_reference_number > YPbPr_parameter_type;
28426 
28427 	enum {
28428 		cyan_p = ::color::place::_internal::cyan<category_right_type>::position_enum
28429 		,magenta_p = ::color::place::_internal::magenta<category_right_type>::position_enum
28430 		,yellow_p = ::color::place::_internal::yellow<category_right_type>::position_enum
28431 	};
28432 
processcolor::_internal::convert28433 	static void process
28434 	(
28435 		container_left_input_type left
28436 		,container_right_const_input_type right
28437 	) {
28438 		scalar_type r = scalar_type(1) - normalize_type::template process<cyan_p >(container_right_trait_type::template get<cyan_p >(right));
28439 		scalar_type g = scalar_type(1) - normalize_type::template process<magenta_p >(container_right_trait_type::template get<magenta_p >(right));
28440 		scalar_type b = scalar_type(1) - normalize_type::template process<yellow_p >(container_right_trait_type::template get<yellow_p >(right));
28441 		scalar_type Y = YPbPr_parameter_type::b11() * r + YPbPr_parameter_type::b12() * g + YPbPr_parameter_type::b13() * b ;
28442 		scalar_type Pb = YPbPr_parameter_type::b21() * r + YPbPr_parameter_type::b22() * g + YPbPr_parameter_type::b23() * b ;
28443 		scalar_type Pr = YPbPr_parameter_type::b31() * r + YPbPr_parameter_type::b32() * g + YPbPr_parameter_type::b33() * b ;
28444 		Pb = YPbPr_parameter_type::Pb_normalize(Pb);
28445 		Pr = YPbPr_parameter_type::Pr_normalize(Pr);
28446 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(Y));
28447 		container_left_trait_type::template set<1>(left, diverse_type::template process<1>(Pb));
28448 		container_left_trait_type::template set<2>(left, diverse_type::template process<2>(Pr));
28449 	}
28450 };
28451 
28452 }
28453 }
28454 
28455 namespace color {
28456 namespace _internal {
28457 
28458 template
28459 <
28460 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
28461 	,typename cmyk_tag_name
28462 	>
28463 struct convert
28464 	<
28465 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
28466 	,::color::category::cmyk< cmyk_tag_name >
28467 	> {
28468 public:
28469 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_left_type;
28470 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
28471 
28472 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
28473 
28474 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
28475 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
28476 
28477 	typedef ::color::rgb< scalar_type > rgb_model_type;
28478 
28479 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
28480 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
28481 
28482 	typedef typename container_left_trait_type::input_type container_left_input_type;
28483 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
28484 
processcolor::_internal::convert28485 	static void process
28486 	(
28487 		container_left_input_type left
28488 		,container_right_const_input_type right
28489 	) {
28490 		left = YPbPr_model_type(rgb_model_type(cmyk_model_type(right))).container();
28491 	}
28492 };
28493 
28494 }
28495 }
28496 
28497 namespace color {
28498 namespace _internal {
28499 
28500 template
28501 <
28502 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
28503 	,typename hsl_tag_name
28504 	>
28505 struct convert
28506 	<
28507 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
28508 	,::color::category::hsl< hsl_tag_name >
28509 	> {
28510 public:
28511 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_left_type;
28512 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
28513 
28514 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
28515 
28516 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
28517 	typedef ::color::model< hsl_category_type > hsl_model_type;
28518 
28519 	typedef ::color::rgb< scalar_type > rgb_model_type;
28520 
28521 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
28522 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
28523 
28524 	typedef typename container_left_trait_type::input_type container_left_input_type;
28525 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
28526 
processcolor::_internal::convert28527 	static void process
28528 	(
28529 		container_left_input_type left
28530 		,container_right_const_input_type right
28531 	) {
28532 		left = YPbPr_model_type(rgb_model_type(hsl_model_type(right))).container();
28533 	}
28534 };
28535 
28536 }
28537 }
28538 
28539 namespace color {
28540 namespace _internal {
28541 
28542 template
28543 <
28544 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
28545 	,typename hsv_tag_name
28546 	>
28547 struct convert
28548 	<
28549 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
28550 	,::color::category::hsv< hsv_tag_name >
28551 	> {
28552 public:
28553 	typedef ::color::category::YPbPr< YPbPr_tag_name,YPbPr_reference_number > YPbPr_category_type, category_left_type;
28554 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
28555 
28556 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
28557 
28558 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
28559 	typedef ::color::model< hsv_category_type > hsv_model_type;
28560 
28561 	typedef ::color::rgb< scalar_type > rgb_model_type;
28562 
28563 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
28564 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
28565 
28566 	typedef typename container_left_trait_type::input_type container_left_input_type;
28567 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
28568 
processcolor::_internal::convert28569 	static void process
28570 	(
28571 		container_left_input_type left
28572 		,container_right_const_input_type right
28573 	) {
28574 		left = YPbPr_model_type(rgb_model_type(hsv_model_type(right))).container();
28575 	}
28576 };
28577 
28578 }
28579 }
28580 
28581 namespace color {
28582 namespace _internal {
28583 
28584 template
28585 <
28586 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
28587 	,typename hsi_tag_name
28588 	>
28589 struct convert
28590 	<
28591 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
28592 	,::color::category::hsi< hsi_tag_name >
28593 	> {
28594 public:
28595 	typedef ::color::category::YPbPr< YPbPr_tag_name,YPbPr_reference_number > YPbPr_category_type, category_left_type;
28596 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
28597 
28598 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
28599 
28600 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
28601 	typedef ::color::model< hsi_category_type > hsi_model_type;
28602 
28603 	typedef ::color::rgb< scalar_type > rgb_model_type;
28604 
28605 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
28606 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
28607 
28608 	typedef typename container_left_trait_type::input_type container_left_input_type;
28609 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
28610 
processcolor::_internal::convert28611 	static void process
28612 	(
28613 		container_left_input_type left
28614 		,container_right_const_input_type right
28615 	) {
28616 		left = YPbPr_model_type(rgb_model_type(hsi_model_type(right))).container();
28617 	}
28618 };
28619 
28620 }
28621 }
28622 
28623 namespace color {
28624 namespace _internal {
28625 
28626 template
28627 <
28628 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum reference_number
28629 	,typename hwb_tag_name
28630 	>
28631 struct convert
28632 	<
28633 	::color::category::YPbPr< YPbPr_tag_name, reference_number >
28634 	,::color::category::hwb< hwb_tag_name >
28635 	> {
28636 public:
28637 	typedef ::color::category::YPbPr< YPbPr_tag_name, reference_number > YPbPr_category_type, category_left_type;
28638 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
28639 
28640 	typedef typename ::color::trait::scalar< YPbPr_category_type >::instance_type scalar_type;
28641 
28642 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
28643 	typedef ::color::model< hwb_category_type > hwb_model_type;
28644 
28645 	typedef ::color::rgb< scalar_type > rgb_model_type;
28646 	typedef ::color::hsv< scalar_type > hsv_model_type;
28647 
28648 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
28649 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
28650 
28651 	typedef typename container_left_trait_type::input_type container_left_input_type;
28652 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
28653 
processcolor::_internal::convert28654 	static void process
28655 	(
28656 		container_left_input_type left
28657 		,container_right_const_input_type right
28658 	) {
28659 		left = YPbPr_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right)))).container();
28660 	}
28661 };
28662 
28663 }
28664 }
28665 
28666 namespace color {
28667 namespace _internal {
28668 
28669 template
28670 <
28671 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
28672 	,typename rgb_tag_name
28673 	>
28674 struct convert
28675 	<
28676 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
28677 	,::color::category::rgb< rgb_tag_name >
28678 	> {
28679 public:
28680 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > category_left_type;
28681 	typedef ::color::category::rgb< rgb_tag_name > category_right_type;
28682 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
28683 
28684 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
28685 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
28686 
28687 	typedef typename container_left_trait_type::input_type container_left_input_type;
28688 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
28689 
28690 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
28691 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
28692 
28693 	typedef ::color::constant::YPbPr::parameter< YPbPr_tag_name, YPbPr_reference_number > YPbPr_parameter_type;
28694 
28695 	enum {
28696 		red_p = ::color::place::_internal::red<category_right_type>::position_enum
28697 		,green_p = ::color::place::_internal::green<category_right_type>::position_enum
28698 		,blue_p = ::color::place::_internal::blue<category_right_type>::position_enum
28699 	};
28700 
processcolor::_internal::convert28701 	static void process
28702 	(
28703 		container_left_input_type left
28704 		,container_right_const_input_type right
28705 	) {
28706 		scalar_type r = normalize_type::template process<red_p >(container_right_trait_type::template get<red_p >(right));
28707 		scalar_type g = normalize_type::template process<green_p>(container_right_trait_type::template get<green_p>(right));
28708 		scalar_type b = normalize_type::template process<blue_p >(container_right_trait_type::template get<blue_p >(right));
28709 		scalar_type Y = YPbPr_parameter_type::b11() * r + YPbPr_parameter_type::b12() * g + YPbPr_parameter_type::b13() * b;
28710 		scalar_type Pb = YPbPr_parameter_type::b21() * r + YPbPr_parameter_type::b22() * g + YPbPr_parameter_type::b23() * b;
28711 		scalar_type Pr = YPbPr_parameter_type::b31() * r + YPbPr_parameter_type::b32() * g + YPbPr_parameter_type::b33() * b;
28712 		Pb = YPbPr_parameter_type::Pb_normalize(Pb);
28713 		Pr = YPbPr_parameter_type::Pr_normalize(Pr);
28714 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(Y));
28715 		container_left_trait_type::template set<1>(left, diverse_type::template process<1>(Pb));
28716 		container_left_trait_type::template set<2>(left, diverse_type::template process<2>(Pr));
28717 	}
28718 };
28719 
28720 }
28721 }
28722 
28723 namespace color {
28724 namespace _internal {
28725 
28726 template
28727 <
28728 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
28729 	,typename yiq_tag_name
28730 	>
28731 struct convert
28732 	<
28733 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
28734 	,::color::category::yiq< yiq_tag_name >
28735 	> {
28736 public:
28737 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_left_type;
28738 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
28739 
28740 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
28741 
28742 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
28743 	typedef ::color::model< yiq_category_type > yiq_model_type;
28744 
28745 	typedef ::color::rgb< scalar_type > rgb_model_type;
28746 
28747 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
28748 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
28749 
28750 	typedef typename container_left_trait_type::input_type container_left_input_type;
28751 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
28752 
processcolor::_internal::convert28753 	static void process
28754 	(
28755 		container_left_input_type left
28756 		,container_right_const_input_type right
28757 	) {
28758 		left = YPbPr_model_type(rgb_model_type(yiq_model_type(right))).container();
28759 	}
28760 };
28761 
28762 }
28763 }
28764 
28765 namespace color {
28766 namespace _internal {
28767 
28768 template
28769 <
28770 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
28771 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
28772 	>
28773 struct convert
28774 	<
28775 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
28776 	,::color::category::yuv< yuv_tag_name, yuv_reference_number >
28777 	> {
28778 public:
28779 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_left_type;
28780 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_right_type;
28781 
28782 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
28783 
28784 	typedef ::color::model< category_left_type > left_model_type;
28785 	typedef ::color::model< category_right_type > right_model_type;
28786 
28787 	typedef ::color::rgb< scalar_type > rgb_model_type;
28788 
28789 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
28790 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
28791 
28792 	typedef typename container_left_trait_type::input_type container_left_input_type;
28793 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
28794 
processcolor::_internal::convert28795 	static void process
28796 	(
28797 		container_left_input_type left
28798 		,container_right_const_input_type right
28799 	) {
28800 		left = left_model_type(rgb_model_type(right_model_type(right))).container();
28801 	}
28802 };
28803 
28804 }
28805 }
28806 
28807 namespace color {
28808 namespace _internal {
28809 
28810 template
28811 <
28812 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
28813 	,typename YCgCo_tag_name
28814 	>
28815 struct convert
28816 	<
28817 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
28818 	,::color::category::YCgCo< YCgCo_tag_name >
28819 	> {
28820 public:
28821 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_left_type;
28822 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
28823 
28824 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
28825 
28826 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
28827 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
28828 
28829 	typedef ::color::rgb< scalar_type > rgb_model_type;
28830 
28831 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
28832 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
28833 
28834 	typedef typename container_left_trait_type::input_type container_left_input_type;
28835 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
28836 
processcolor::_internal::convert28837 	static void process
28838 	(
28839 		container_left_input_type left
28840 		,container_right_const_input_type right
28841 	) {
28842 		left = YPbPr_model_type(rgb_model_type(YCgCo_model_type(right))).container();
28843 	}
28844 };
28845 
28846 }
28847 }
28848 
28849 namespace color {
28850 namespace _internal {
28851 
28852 template
28853 <
28854 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
28855 	,typename YDbDr_tag_name
28856 	>
28857 struct convert
28858 	<
28859 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
28860 	,::color::category::YDbDr< YDbDr_tag_name >
28861 	> {
28862 public:
28863 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_left_type;
28864 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
28865 
28866 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
28867 
28868 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
28869 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
28870 
28871 	typedef ::color::rgb< scalar_type > rgb_model_type;
28872 
28873 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
28874 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
28875 
28876 	typedef typename container_left_trait_type::input_type container_left_input_type;
28877 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
28878 
processcolor::_internal::convert28879 	static void process
28880 	(
28881 		container_left_input_type left
28882 		,container_right_const_input_type right
28883 	) {
28884 		left = YPbPr_model_type(rgb_model_type(YDbDr_model_type(right))).container();
28885 	}
28886 };
28887 
28888 }
28889 }
28890 
28891 namespace color {
28892 namespace _internal {
28893 
28894 template
28895 <
28896 	typename tag_left_name, ::color::constant::YPbPr::reference_enum left_reference_number
28897 	,typename tag_right_name, ::color::constant::YPbPr::reference_enum right_reference_number
28898 	>
28899 struct convert
28900 	<
28901 	::color::category::YPbPr< tag_left_name, left_reference_number >
28902 	,::color::category::YPbPr< tag_right_name, right_reference_number >
28903 	> {
28904 public:
28905 	typedef ::color::category::YPbPr< tag_left_name, left_reference_number > category_left_type;
28906 	typedef ::color::category::YPbPr< tag_right_name, right_reference_number > category_right_type;
28907 
28908 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
28909 
28910 	typedef ::color::model< category_left_type > left_model_type;
28911 	typedef ::color::model< category_right_type > right_model_type;
28912 
28913 	typedef ::color::rgb< scalar_type > rgb_model_type;
28914 
28915 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
28916 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
28917 
28918 	typedef typename container_left_trait_type::input_type container_left_input_type;
28919 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
28920 
processcolor::_internal::convert28921 	static void process
28922 	(
28923 		container_left_input_type left
28924 		,container_right_const_input_type right
28925 	) {
28926 		left = left_model_type(rgb_model_type(right_model_type(right))).container();
28927 	}
28928 };
28929 
28930 template
28931 <
28932 	::color::constant::YPbPr::reference_enum reference_number
28933 	,typename tag_left_name
28934 	,typename tag_right_name
28935 	>
28936 struct convert
28937 	<
28938 	::color::category::YPbPr< tag_left_name, reference_number >
28939 	,::color::category::YPbPr< tag_right_name, reference_number >
28940 	> {
28941 public:
28942 	typedef ::color::category::YPbPr< tag_left_name, reference_number > category_left_type;
28943 	typedef ::color::category::YPbPr< tag_right_name, reference_number > category_right_type;
28944 
28945 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
28946 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
28947 
28948 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
28949 
28950 	typedef typename container_left_trait_type::input_type container_left_input_type;
28951 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
28952 
processcolor::_internal::convert28953 	static void process
28954 	(
28955 		container_left_input_type left
28956 		,container_right_const_input_type right
28957 	) {
28958 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
28959 		container_left_trait_type::template set<1>(left, reformat_type::template process<1,1>(container_right_trait_type::template get<1>(right)));
28960 		container_left_trait_type::template set<2>(left, reformat_type::template process<2,2>(container_right_trait_type::template get<2>(right)));
28961 	}
28962 };
28963 
28964 }
28965 }
28966 
28967 namespace color {
28968 namespace akin {
28969 
28970 template< >struct xyz< ::color::category::gray_uint8 > {
28971 	typedef ::color::category::xyz_uint8 akin_type;
28972 };
28973 template< >struct xyz< ::color::category::gray_uint16 > {
28974 	typedef ::color::category::xyz_uint16 akin_type;
28975 };
28976 template< >struct xyz< ::color::category::gray_uint32 > {
28977 	typedef ::color::category::xyz_uint32 akin_type;
28978 };
28979 template< >struct xyz< ::color::category::gray_uint64 > {
28980 	typedef ::color::category::xyz_uint64 akin_type;
28981 };
28982 template< >struct xyz< ::color::category::gray_float > {
28983 	typedef ::color::category::xyz_float akin_type;
28984 };
28985 template< >struct xyz< ::color::category::gray_double > {
28986 	typedef ::color::category::xyz_double akin_type;
28987 };
28988 template< >struct xyz< ::color::category::gray_ldouble > {
28989 	typedef ::color::category::xyz_ldouble akin_type;
28990 };
28991 
28992 }
28993 }
28994 
28995 namespace color {
28996 namespace akin {
28997 
28998 template< >struct xyz< ::color::category::cmy_uint8 > {
28999 	typedef ::color::category::xyz_uint8 akin_type;
29000 };
29001 template< >struct xyz< ::color::category::cmy_uint16 > {
29002 	typedef ::color::category::xyz_uint16 akin_type;
29003 };
29004 template< >struct xyz< ::color::category::cmy_uint32 > {
29005 	typedef ::color::category::xyz_uint32 akin_type;
29006 };
29007 template< >struct xyz< ::color::category::cmy_uint64 > {
29008 	typedef ::color::category::xyz_uint64 akin_type;
29009 };
29010 template< >struct xyz< ::color::category::cmy_float > {
29011 	typedef ::color::category::xyz_float akin_type;
29012 };
29013 template< >struct xyz< ::color::category::cmy_double > {
29014 	typedef ::color::category::xyz_double akin_type;
29015 };
29016 template< >struct xyz< ::color::category::cmy_ldouble > {
29017 	typedef ::color::category::xyz_ldouble akin_type;
29018 };
29019 
29020 }
29021 }
29022 
29023 namespace color {
29024 namespace akin {
29025 
29026 template< >struct xyz< ::color::category::cmyk_uint8 > {
29027 	typedef ::color::category::xyz_uint8 akin_type;
29028 };
29029 template< >struct xyz< ::color::category::cmyk_uint16 > {
29030 	typedef ::color::category::xyz_uint16 akin_type;
29031 };
29032 template< >struct xyz< ::color::category::cmyk_uint32 > {
29033 	typedef ::color::category::xyz_uint32 akin_type;
29034 };
29035 template< >struct xyz< ::color::category::cmyk_uint64 > {
29036 	typedef ::color::category::xyz_uint64 akin_type;
29037 };
29038 template< >struct xyz< ::color::category::cmyk_float > {
29039 	typedef ::color::category::xyz_float akin_type;
29040 };
29041 template< >struct xyz< ::color::category::cmyk_double > {
29042 	typedef ::color::category::xyz_double akin_type;
29043 };
29044 template< >struct xyz< ::color::category::cmyk_ldouble > {
29045 	typedef ::color::category::xyz_ldouble akin_type;
29046 };
29047 
29048 }
29049 }
29050 
29051 namespace color {
29052 namespace akin {
29053 
29054 template< >struct xyz< ::color::category::hsl_uint8 > {
29055 	typedef ::color::category::xyz_uint8 akin_type;
29056 };
29057 template< >struct xyz< ::color::category::hsl_uint16 > {
29058 	typedef ::color::category::xyz_uint16 akin_type;
29059 };
29060 template< >struct xyz< ::color::category::hsl_uint32 > {
29061 	typedef ::color::category::xyz_uint32 akin_type;
29062 };
29063 template< >struct xyz< ::color::category::hsl_uint64 > {
29064 	typedef ::color::category::xyz_uint64 akin_type;
29065 };
29066 template< >struct xyz< ::color::category::hsl_float > {
29067 	typedef ::color::category::xyz_float akin_type;
29068 };
29069 template< >struct xyz< ::color::category::hsl_double > {
29070 	typedef ::color::category::xyz_double akin_type;
29071 };
29072 template< >struct xyz< ::color::category::hsl_ldouble > {
29073 	typedef ::color::category::xyz_ldouble akin_type;
29074 };
29075 
29076 }
29077 }
29078 
29079 namespace color {
29080 namespace akin {
29081 
29082 template< >struct xyz< ::color::category::hsv_uint8 > {
29083 	typedef ::color::category::xyz_uint8 akin_type;
29084 };
29085 template< >struct xyz< ::color::category::hsv_uint16 > {
29086 	typedef ::color::category::xyz_uint16 akin_type;
29087 };
29088 template< >struct xyz< ::color::category::hsv_uint32 > {
29089 	typedef ::color::category::xyz_uint32 akin_type;
29090 };
29091 template< >struct xyz< ::color::category::hsv_uint64 > {
29092 	typedef ::color::category::xyz_uint64 akin_type;
29093 };
29094 template< >struct xyz< ::color::category::hsv_float > {
29095 	typedef ::color::category::xyz_float akin_type;
29096 };
29097 template< >struct xyz< ::color::category::hsv_double > {
29098 	typedef ::color::category::xyz_double akin_type;
29099 };
29100 template< >struct xyz< ::color::category::hsv_ldouble > {
29101 	typedef ::color::category::xyz_ldouble akin_type;
29102 };
29103 
29104 }
29105 }
29106 
29107 namespace color {
29108 namespace akin {
29109 
29110 template< >struct xyz< ::color::category::hsi_uint8 > {
29111 	typedef ::color::category::xyz_uint8 akin_type;
29112 };
29113 template< >struct xyz< ::color::category::hsi_uint16 > {
29114 	typedef ::color::category::xyz_uint16 akin_type;
29115 };
29116 template< >struct xyz< ::color::category::hsi_uint32 > {
29117 	typedef ::color::category::xyz_uint32 akin_type;
29118 };
29119 template< >struct xyz< ::color::category::hsi_uint64 > {
29120 	typedef ::color::category::xyz_uint64 akin_type;
29121 };
29122 template< >struct xyz< ::color::category::hsi_float > {
29123 	typedef ::color::category::xyz_float akin_type;
29124 };
29125 template< >struct xyz< ::color::category::hsi_double > {
29126 	typedef ::color::category::xyz_double akin_type;
29127 };
29128 template< >struct xyz< ::color::category::hsi_ldouble > {
29129 	typedef ::color::category::xyz_ldouble akin_type;
29130 };
29131 
29132 }
29133 }
29134 
29135 namespace color {
29136 namespace akin {
29137 
29138 template
29139 <
29140 	typename tag_name
29141 
29142 	>
29143 struct xyz< ::color::category::hwb< tag_name > > {
29144 public:
29145 	typedef ::color::category::xyz< tag_name > akin_type;
29146 };
29147 
29148 }
29149 }
29150 
29151 namespace color {
29152 namespace akin {
29153 
29154 template< >struct xyz< ::color::category::rgb_uint8 > {
29155 	typedef ::color::category::xyz_uint8 akin_type;
29156 };
29157 template< >struct xyz< ::color::category::rgb_uint16 > {
29158 	typedef ::color::category::xyz_uint16 akin_type;
29159 };
29160 template< >struct xyz< ::color::category::rgb_uint32 > {
29161 	typedef ::color::category::xyz_uint32 akin_type;
29162 };
29163 template< >struct xyz< ::color::category::rgb_uint64 > {
29164 	typedef ::color::category::xyz_uint64 akin_type;
29165 };
29166 template< >struct xyz< ::color::category::rgb_float > {
29167 	typedef ::color::category::xyz_float akin_type;
29168 };
29169 template< >struct xyz< ::color::category::rgb_double > {
29170 	typedef ::color::category::xyz_double akin_type;
29171 };
29172 template< >struct xyz< ::color::category::rgb_ldouble > {
29173 	typedef ::color::category::xyz_ldouble akin_type;
29174 };
29175 
29176 }
29177 }
29178 
29179 namespace color {
29180 namespace akin {
29181 
29182 template< >struct xyz< ::color::category::yiq_uint8 > {
29183 	typedef ::color::category::xyz_uint8 akin_type;
29184 };
29185 template< >struct xyz< ::color::category::yiq_uint16 > {
29186 	typedef ::color::category::xyz_uint16 akin_type;
29187 };
29188 template< >struct xyz< ::color::category::yiq_uint32 > {
29189 	typedef ::color::category::xyz_uint32 akin_type;
29190 };
29191 template< >struct xyz< ::color::category::yiq_uint64 > {
29192 	typedef ::color::category::xyz_uint64 akin_type;
29193 };
29194 template< >struct xyz< ::color::category::yiq_float > {
29195 	typedef ::color::category::xyz_float akin_type;
29196 };
29197 template< >struct xyz< ::color::category::yiq_double > {
29198 	typedef ::color::category::xyz_double akin_type;
29199 };
29200 template< >struct xyz< ::color::category::yiq_ldouble > {
29201 	typedef ::color::category::xyz_ldouble akin_type;
29202 };
29203 
29204 }
29205 }
29206 
29207 namespace color {
29208 namespace akin {
29209 
29210 template< ::color::constant::yuv::reference_enum reference_number >struct xyz< ::color::category::yuv_uint8 <reference_number> > {
29211 	typedef ::color::category::xyz_uint8 akin_type;
29212 };
29213 template< ::color::constant::yuv::reference_enum reference_number >struct xyz< ::color::category::yuv_uint16 <reference_number> > {
29214 	typedef ::color::category::xyz_uint16 akin_type;
29215 };
29216 template< ::color::constant::yuv::reference_enum reference_number >struct xyz< ::color::category::yuv_uint32 <reference_number> > {
29217 	typedef ::color::category::xyz_uint32 akin_type;
29218 };
29219 template< ::color::constant::yuv::reference_enum reference_number >struct xyz< ::color::category::yuv_uint64 <reference_number> > {
29220 	typedef ::color::category::xyz_uint64 akin_type;
29221 };
29222 template< ::color::constant::yuv::reference_enum reference_number >struct xyz< ::color::category::yuv_float <reference_number> > {
29223 	typedef ::color::category::xyz_float akin_type;
29224 };
29225 template< ::color::constant::yuv::reference_enum reference_number >struct xyz< ::color::category::yuv_double <reference_number> > {
29226 	typedef ::color::category::xyz_double akin_type;
29227 };
29228 template< ::color::constant::yuv::reference_enum reference_number >struct xyz< ::color::category::yuv_ldouble<reference_number> > {
29229 	typedef ::color::category::xyz_ldouble akin_type;
29230 };
29231 
29232 }
29233 }
29234 
29235 namespace color {
29236 namespace akin {
29237 
29238 template< >struct xyz< ::color::category::YCgCo_uint8 > {
29239 	typedef ::color::category::xyz_uint8 akin_type;
29240 };
29241 template< >struct xyz< ::color::category::YCgCo_uint16 > {
29242 	typedef ::color::category::xyz_uint16 akin_type;
29243 };
29244 template< >struct xyz< ::color::category::YCgCo_uint32 > {
29245 	typedef ::color::category::xyz_uint32 akin_type;
29246 };
29247 template< >struct xyz< ::color::category::YCgCo_uint64 > {
29248 	typedef ::color::category::xyz_uint64 akin_type;
29249 };
29250 template< >struct xyz< ::color::category::YCgCo_float > {
29251 	typedef ::color::category::xyz_float akin_type;
29252 };
29253 template< >struct xyz< ::color::category::YCgCo_double > {
29254 	typedef ::color::category::xyz_double akin_type;
29255 };
29256 template< >struct xyz< ::color::category::YCgCo_ldouble > {
29257 	typedef ::color::category::xyz_ldouble akin_type;
29258 };
29259 
29260 }
29261 }
29262 
29263 namespace color {
29264 namespace akin {
29265 
29266 template< >struct xyz< ::color::category::YDbDr_uint8 > {
29267 	typedef ::color::category::xyz_uint8 akin_type;
29268 };
29269 template< >struct xyz< ::color::category::YDbDr_uint16 > {
29270 	typedef ::color::category::xyz_uint16 akin_type;
29271 };
29272 template< >struct xyz< ::color::category::YDbDr_uint32 > {
29273 	typedef ::color::category::xyz_uint32 akin_type;
29274 };
29275 template< >struct xyz< ::color::category::YDbDr_uint64 > {
29276 	typedef ::color::category::xyz_uint64 akin_type;
29277 };
29278 template< >struct xyz< ::color::category::YDbDr_float > {
29279 	typedef ::color::category::xyz_float akin_type;
29280 };
29281 template< >struct xyz< ::color::category::YDbDr_double > {
29282 	typedef ::color::category::xyz_double akin_type;
29283 };
29284 template< >struct xyz< ::color::category::YDbDr_ldouble > {
29285 	typedef ::color::category::xyz_ldouble akin_type;
29286 };
29287 
29288 }
29289 }
29290 
29291 namespace color {
29292 namespace akin {
29293 
29294 template< ::color::constant::YPbPr::reference_enum reference_number >struct xyz< ::color::category::YPbPr_uint8 <reference_number> > {
29295 	typedef ::color::category::xyz_uint8 akin_type;
29296 };
29297 template< ::color::constant::YPbPr::reference_enum reference_number >struct xyz< ::color::category::YPbPr_uint16 <reference_number> > {
29298 	typedef ::color::category::xyz_uint16 akin_type;
29299 };
29300 template< ::color::constant::YPbPr::reference_enum reference_number >struct xyz< ::color::category::YPbPr_uint32 <reference_number> > {
29301 	typedef ::color::category::xyz_uint32 akin_type;
29302 };
29303 template< ::color::constant::YPbPr::reference_enum reference_number >struct xyz< ::color::category::YPbPr_uint64 <reference_number> > {
29304 	typedef ::color::category::xyz_uint64 akin_type;
29305 };
29306 template< ::color::constant::YPbPr::reference_enum reference_number >struct xyz< ::color::category::YPbPr_float <reference_number> > {
29307 	typedef ::color::category::xyz_float akin_type;
29308 };
29309 template< ::color::constant::YPbPr::reference_enum reference_number >struct xyz< ::color::category::YPbPr_double <reference_number> > {
29310 	typedef ::color::category::xyz_double akin_type;
29311 };
29312 template< ::color::constant::YPbPr::reference_enum reference_number >struct xyz< ::color::category::YPbPr_ldouble<reference_number> > {
29313 	typedef ::color::category::xyz_ldouble akin_type;
29314 };
29315 
29316 }
29317 }
29318 
29319 namespace color {
29320 namespace akin {
29321 
29322 template< typename tag_name >
29323 struct xyz< ::color::category::xyz< tag_name > > {
29324 public:
29325 	typedef ::color::category::xyz< tag_name > akin_type;
29326 };
29327 
29328 }
29329 }
29330 
29331 namespace color {
29332 namespace akin {
29333 
29334 template
29335 <
29336 	typename tag_name
29337 	,::color::constant::lab::reference_enum lab_reference_number
29338 	>
29339 struct xyz< ::color::category::lab< tag_name, lab_reference_number > > {
29340 public:
29341 	typedef ::color::category::xyz< tag_name > akin_type;
29342 };
29343 
29344 }
29345 }
29346 
29347 namespace color {
29348 namespace akin {
29349 
29350 template< >struct xyz< ::color::category::xyy_uint8 > {
29351 	typedef ::color::category::xyz_uint8 akin_type;
29352 };
29353 template< >struct xyz< ::color::category::xyy_uint16 > {
29354 	typedef ::color::category::xyz_uint16 akin_type;
29355 };
29356 template< >struct xyz< ::color::category::xyy_uint32 > {
29357 	typedef ::color::category::xyz_uint32 akin_type;
29358 };
29359 template< >struct xyz< ::color::category::xyy_uint64 > {
29360 	typedef ::color::category::xyz_uint64 akin_type;
29361 };
29362 template< >struct xyz< ::color::category::xyy_float > {
29363 	typedef ::color::category::xyz_float akin_type;
29364 };
29365 template< >struct xyz< ::color::category::xyy_double > {
29366 	typedef ::color::category::xyz_double akin_type;
29367 };
29368 template< >struct xyz< ::color::category::xyy_ldouble > {
29369 	typedef ::color::category::xyz_ldouble akin_type;
29370 };
29371 
29372 }
29373 }
29374 
29375 namespace color {
29376 namespace akin {
29377 
29378 template
29379 <
29380 	typename tag_name
29381 	,::color::constant::lms::reference_enum reference_number
29382 
29383 	>
29384 struct xyz< ::color::category::lms< tag_name, reference_number > > {
29385 public:
29386 	typedef ::color::category::xyz< tag_name > akin_type;
29387 };
29388 
29389 }
29390 }
29391 
29392 namespace color {
29393 namespace akin {
29394 
29395 template< >struct xyz< ::color::category::luv_uint8 > {
29396 	typedef ::color::category::xyz_uint8 akin_type;
29397 };
29398 template< >struct xyz< ::color::category::luv_uint16 > {
29399 	typedef ::color::category::xyz_uint16 akin_type;
29400 };
29401 template< >struct xyz< ::color::category::luv_uint32 > {
29402 	typedef ::color::category::xyz_uint32 akin_type;
29403 };
29404 template< >struct xyz< ::color::category::luv_uint64 > {
29405 	typedef ::color::category::xyz_uint64 akin_type;
29406 };
29407 template< >struct xyz< ::color::category::luv_float > {
29408 	typedef ::color::category::xyz_float akin_type;
29409 };
29410 template< >struct xyz< ::color::category::luv_double > {
29411 	typedef ::color::category::xyz_double akin_type;
29412 };
29413 template< >struct xyz< ::color::category::luv_ldouble > {
29414 	typedef ::color::category::xyz_ldouble akin_type;
29415 };
29416 
29417 }
29418 }
29419 
29420 namespace color {
29421 namespace akin {
29422 
29423 template
29424 <
29425 	typename tag_name
29426 
29427 	>
29428 struct xyz< ::color::category::LabCH< tag_name > > {
29429 public:
29430 	typedef ::color::category::xyz< tag_name > akin_type;
29431 };
29432 
29433 }
29434 }
29435 
29436 namespace color {
29437 namespace akin {
29438 
29439 template< >struct xyz< ::color::category::LuvCH_uint8 > {
29440 	typedef ::color::category::xyz_uint8 akin_type;
29441 };
29442 template< >struct xyz< ::color::category::LuvCH_uint16 > {
29443 	typedef ::color::category::xyz_uint16 akin_type;
29444 };
29445 template< >struct xyz< ::color::category::LuvCH_uint32 > {
29446 	typedef ::color::category::xyz_uint32 akin_type;
29447 };
29448 template< >struct xyz< ::color::category::LuvCH_uint64 > {
29449 	typedef ::color::category::xyz_uint64 akin_type;
29450 };
29451 template< >struct xyz< ::color::category::LuvCH_float > {
29452 	typedef ::color::category::xyz_float akin_type;
29453 };
29454 template< >struct xyz< ::color::category::LuvCH_double > {
29455 	typedef ::color::category::xyz_double akin_type;
29456 };
29457 template< >struct xyz< ::color::category::LuvCH_ldouble > {
29458 	typedef ::color::category::xyz_ldouble akin_type;
29459 };
29460 
29461 }
29462 }
29463 
29464 namespace color {
29465 namespace trait {
29466 
29467 template <> struct info< ::color::category::xyz_uint8 > {
29468 public:
29469 	enum { implemented_entity = true };
29470 	enum { meaningful_entity = true };
29471 };
29472 template <> struct info< ::color::category::xyz_uint16 > {
29473 public:
29474 	enum { implemented_entity = true };
29475 	enum { meaningful_entity = true };
29476 };
29477 template <> struct info< ::color::category::xyz_uint32 > {
29478 public:
29479 	enum { implemented_entity = true };
29480 	enum { meaningful_entity = true };
29481 };
29482 template <> struct info< ::color::category::xyz_uint64 > {
29483 public:
29484 	enum { implemented_entity = true };
29485 	enum { meaningful_entity = true };
29486 };
29487 template <> struct info< ::color::category::xyz_float > {
29488 public:
29489 	enum { implemented_entity = true };
29490 	enum { meaningful_entity = true };
29491 };
29492 template <> struct info< ::color::category::xyz_double > {
29493 public:
29494 	enum { implemented_entity = true };
29495 	enum { meaningful_entity = true };
29496 };
29497 template <> struct info< ::color::category::xyz_ldouble > {
29498 public:
29499 	enum { implemented_entity = true };
29500 	enum { meaningful_entity = true };
29501 };
29502 
29503 }
29504 }
29505 
29506 namespace color {
29507 namespace _internal {
29508 namespace xyz {
29509 namespace bound {
29510 
29511 template< typename index_name, typename scalar_name >
29512 struct scalar {
29513 public:
29514 	typedef scalar_name scalar_type;
29515 	typedef index_name index_type;
29516 
29517 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
29518 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
29519 
29520 	typedef typename trait_type::instance_type instance_type;
29521 	typedef typename trait_type::return_image_type return_image_type;
29522 
29523 	typedef typename index_trait_type::instance_type index_instance_type;
29524 	typedef typename index_trait_type::model_type index_input_const_type;
29525 
29526 	template< index_instance_type index >
maximumcolor::_internal::xyz::bound::scalar29527 	static return_image_type maximum() {
29528 		static instance_type max_list[] = { 100, 100, 100 };
29529 		return max_list[index];
29530 	}
29531 
maximumcolor::_internal::xyz::bound::scalar29532 	static return_image_type maximum(index_input_const_type index) {
29533 		static instance_type max_list[] = { 100, 100, 100 };
29534 		return max_list[index];
29535 	}
29536 
29537 	template< index_instance_type index >
minimumcolor::_internal::xyz::bound::scalar29538 	static return_image_type minimum() {
29539 		static instance_type min_list[] = { 0, 0, 0 };
29540 		return min_list[index];
29541 	}
29542 
minimumcolor::_internal::xyz::bound::scalar29543 	static return_image_type minimum(index_input_const_type index) {
29544 		static instance_type min_list[] = { 0, 0, 0 };
29545 		return min_list[index];
29546 	}
29547 
29548 	template< index_instance_type index >
rangecolor::_internal::xyz::bound::scalar29549 	static return_image_type range() {
29550 		static instance_type range_list[] = { 100, 100, 100 };
29551 		return range_list[index];
29552 	}
29553 
rangecolor::_internal::xyz::bound::scalar29554 	static return_image_type range(index_input_const_type index) {
29555 		static instance_type range_list[] = { 100, 100, 100 };
29556 		return range_list[index];
29557 	}
29558 };
29559 
29560 }
29561 }
29562 }
29563 }
29564 
29565 namespace color {
29566 namespace trait {
29567 
29568 template< >
29569 struct bound< ::color::category::xyz_float >
29570 	: public ::color::_internal::xyz::bound::scalar< typename ::color::trait::index< ::color::category::xyz_float >::instance_type, float > {
29571 };
29572 
29573 template< >
29574 struct bound< ::color::category::xyz_double >
29575 	: public ::color::_internal::xyz::bound::scalar< typename ::color::trait::index< ::color::category::xyz_double >::instance_type, double > {
29576 };
29577 
29578 template< >
29579 struct bound< ::color::category::xyz_ldouble >
29580 	: public ::color::_internal::xyz::bound::scalar< typename ::color::trait::index< ::color::category::xyz_ldouble >::instance_type, long double > {
29581 };
29582 
29583 }
29584 }
29585 
29586 namespace color {
29587 namespace trait {
29588 
29589 template< >
29590 struct bound< ::color::category::xyz_uint8 >
29591 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::xyz_uint8 >::instance_type > {
29592 };
29593 
29594 template< >
29595 struct bound< ::color::category::xyz_uint16 >
29596 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::xyz_uint16 >::instance_type > {
29597 };
29598 
29599 template< >
29600 struct bound< ::color::category::xyz_uint32 >
29601 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::xyz_uint32 >::instance_type > {
29602 };
29603 
29604 template< >
29605 struct bound< ::color::category::xyz_uint64 >
29606 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::xyz_uint64 >::instance_type > {
29607 };
29608 
29609 }
29610 }
29611 
29612 namespace color {
29613 namespace trait {
29614 
29615 template< >
29616 struct component< ::color::category::xyz_float >
29617 	: public ::color::_internal::utility::component::array< float > {
29618 };
29619 
29620 template< >
29621 struct component< ::color::category::xyz_double >
29622 	: public ::color::_internal::utility::component::array< double > {
29623 };
29624 
29625 template< >
29626 struct component< ::color::category::xyz_ldouble >
29627 	: public ::color::_internal::utility::component::array< long double > {
29628 };
29629 
29630 }
29631 }
29632 
29633 namespace color {
29634 namespace trait {
29635 
29636 template< >
29637 struct component< ::color::category::xyz_uint8 >
29638 	: public ::color::_internal::utility::component::array< std::uint8_t > {
29639 };
29640 
29641 template< >
29642 struct component< ::color::category::xyz_uint16 >
29643 	: public ::color::_internal::utility::component::array< std::uint16_t > {
29644 };
29645 
29646 template< >
29647 struct component< ::color::category::xyz_uint32 >
29648 	: public ::color::_internal::utility::component::array< std::uint32_t > {
29649 };
29650 
29651 template< >
29652 struct component< ::color::category::xyz_uint64 >
29653 	: public ::color::_internal::utility::component::array< std::uint64_t > {
29654 };
29655 
29656 }
29657 }
29658 
29659 namespace color {
29660 namespace trait {
29661 
29662 template< >
29663 struct container< ::color::category::xyz_float >
29664 	: public ::color::_internal::utility::container::array< float, 3 > {
29665 };
29666 
29667 template< >
29668 struct container< ::color::category::xyz_double >
29669 	: public ::color::_internal::utility::container::array< double, 3 > {
29670 };
29671 
29672 template< >
29673 struct container< ::color::category::xyz_ldouble >
29674 	: public ::color::_internal::utility::container::array< long double, 3 > {
29675 };
29676 
29677 }
29678 }
29679 
29680 namespace color {
29681 namespace trait {
29682 
29683 template< >
29684 struct container< ::color::category::xyz_uint8 >
29685 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
29686 };
29687 
29688 template< >
29689 struct container< ::color::category::xyz_uint16 >
29690 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
29691 };
29692 
29693 template< >
29694 struct container< ::color::category::xyz_uint32 >
29695 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
29696 };
29697 
29698 template< >
29699 struct container< ::color::category::xyz_uint64 >
29700 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
29701 };
29702 
29703 }
29704 }
29705 
29706 namespace color {
29707 
29708 template< typename type_name >
29709 using xyz = ::color::model< typename ::color::category::xyz< type_name > >;
29710 
29711 }
29712 
29713 namespace color {
29714 namespace get {
29715 
29716 template< typename tag_name >
29717 inline
29718 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::xyz<tag_name> >::akin_type >::return_type
red(::color::model<::color::category::xyz<tag_name>> const & color_parameter)29719 red(::color::model< ::color::category::xyz<tag_name> > const& color_parameter) {
29720 	typedef ::color::category::xyz<tag_name> category_type;
29721 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
29722 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
29723 	typedef ::color::_internal::diverse< akin_type > diverse_type;
29724 	typedef ::color::_internal::normalize<category_type> normalize_type;
29725 	typedef ::color::constant::xyz::transformation::matrix< scalar_type > xyz_matrix_type;
29726 	typedef ::color::constant::xyz::space::gamma< scalar_type, ::color::constant::xyz::space::sRGB_entity > xyz_gamma_type;
29727 	enum {
29728 		red_p = ::color::place::_internal::red<akin_type>::position_enum
29729 	};
29730 	static const scalar_type i11 = xyz_matrix_type::i11(), i12 = xyz_matrix_type::i12(), i13 = xyz_matrix_type::i13();
29731 	scalar_type x = normalize_type::template process<0>(color_parameter.template get<0>());
29732 	scalar_type y = normalize_type::template process<1>(color_parameter.template get<1>());
29733 	scalar_type z = normalize_type::template process<2>(color_parameter.template get<2>());
29734 	scalar_type r = i11 * x + i12 * y + i13 * z;
29735 	r = xyz_gamma_type::encode(r);
29736 	return diverse_type::template process<red_p>(r);
29737 }
29738 
29739 }
29740 }
29741 
29742 namespace color {
29743 namespace get {
29744 
29745 template< typename tag_name >
29746 inline
29747 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::xyz<tag_name> >::akin_type >::return_type
green(::color::model<::color::category::xyz<tag_name>> const & color_parameter)29748 green(::color::model< ::color::category::xyz<tag_name> > const& color_parameter) {
29749 	typedef ::color::category::xyz<tag_name> category_type;
29750 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
29751 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
29752 	typedef ::color::_internal::diverse< akin_type > diverse_type;
29753 	typedef ::color::_internal::normalize<category_type> normalize_type;
29754 	typedef ::color::constant::xyz::transformation::matrix< scalar_type > xyz_matrix_type;
29755 	typedef ::color::constant::xyz::space::gamma< scalar_type, ::color::constant::xyz::space::sRGB_entity > xyz_gamma_type;
29756 	enum {
29757 		green_p = ::color::place::_internal::green<akin_type>::position_enum
29758 	};
29759 	static const scalar_type i21 = xyz_matrix_type::i21(), i22 = xyz_matrix_type::i22(), i23 = xyz_matrix_type::i23();
29760 	scalar_type x = normalize_type::template process<0>(color_parameter.template get<0>());
29761 	scalar_type y = normalize_type::template process<1>(color_parameter.template get<1>());
29762 	scalar_type z = normalize_type::template process<2>(color_parameter.template get<2>());
29763 	scalar_type g = i21 * x + i22 * y + i23 * z;
29764 	g = xyz_gamma_type::encode(g);
29765 	return diverse_type::template process<green_p>(g);
29766 }
29767 
29768 }
29769 }
29770 
29771 namespace color {
29772 namespace get {
29773 
29774 template< typename tag_name >
29775 inline
29776 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::xyz<tag_name> >::akin_type >::return_type
blue(::color::model<::color::category::xyz<tag_name>> const & color_parameter)29777 blue(::color::model< ::color::category::xyz<tag_name> > const& color_parameter) {
29778 	typedef ::color::category::xyz<tag_name> category_type;
29779 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
29780 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_type;
29781 	typedef ::color::_internal::diverse< akin_type > diverse_type;
29782 	typedef ::color::_internal::normalize<category_type> normalize_type;
29783 	typedef ::color::constant::xyz::transformation::matrix< scalar_type > xyz_matrix_type;
29784 	typedef ::color::constant::xyz::space::gamma< scalar_type, ::color::constant::xyz::space::sRGB_entity > xyz_gamma_type;
29785 	enum {
29786 		blue_p = ::color::place::_internal::blue<akin_type>::position_enum
29787 	};
29788 	static const scalar_type i31 = xyz_matrix_type::i31(), i32 = xyz_matrix_type::i32(), i33 = xyz_matrix_type::i33();
29789 	scalar_type x = normalize_type::template process<0>(color_parameter.template get<0>());
29790 	scalar_type y = normalize_type::template process<1>(color_parameter.template get<1>());
29791 	scalar_type z = normalize_type::template process<2>(color_parameter.template get<2>());
29792 	scalar_type b = i31 * x + i32 * y + i33 * z;
29793 	b = xyz_gamma_type::encode(b);
29794 	return diverse_type::template process<blue_p>(b);
29795 }
29796 
29797 }
29798 }
29799 
29800 namespace color {
29801 namespace get {
29802 
29803 template< typename tag_name >
29804 inline
29805 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::xyz<tag_name> >::akin_type >::return_type
gray(::color::model<::color::category::xyz<tag_name>> const & color_parameter)29806 gray(::color::model< ::color::category::xyz<tag_name> > const& color_parameter) {
29807 	typedef ::color::category::xyz< tag_name > category_type;
29808 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
29809 	typedef ::color::_internal::reformat< akin_type, category_type > reformat_type;
29810 	return reformat_type::template process<0,0>(color_parameter.template get<0>());
29811 }
29812 
29813 }
29814 }
29815 
29816 namespace color {
29817 namespace set {
29818 
29819 template< typename tag_name >
29820 inline
29821 void
red(::color::model<::color::category::xyz<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::xyz<tag_name>>::akin_type>::model_type component_parameter)29822 red
29823 (
29824 	::color::model< ::color::category::xyz< tag_name > > & color_parameter
29825 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::xyz< tag_name > >::akin_type >::model_type component_parameter
29826 ) {
29827 	typedef ::color::category::xyz< tag_name > category_type;
29828 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
29829 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
29830 	::color::model< akin_type > rgb(color_parameter);
29831 	rgb.template set< red_p > (component_parameter);
29832 	color_parameter = rgb;
29833 }
29834 
29835 }
29836 }
29837 
29838 namespace color {
29839 namespace set {
29840 
29841 template< typename tag_name >
29842 inline
29843 void
green(::color::model<::color::category::xyz<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::xyz<tag_name>>::akin_type>::model_type component_parameter)29844 green
29845 (
29846 	::color::model< ::color::category::xyz< tag_name > > & color_parameter
29847 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::xyz< tag_name > >::akin_type >::model_type component_parameter
29848 ) {
29849 	typedef ::color::category::xyz< tag_name > category_type;
29850 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
29851 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
29852 	::color::model< akin_type > rgb(color_parameter);
29853 	rgb.template set< green_p > (component_parameter);
29854 	color_parameter = rgb;
29855 }
29856 
29857 }
29858 }
29859 
29860 namespace color {
29861 namespace set {
29862 
29863 template< typename tag_name >
29864 inline
29865 void
blue(::color::model<::color::category::xyz<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::xyz<tag_name>>::akin_type>::model_type component_parameter)29866 blue
29867 (
29868 	::color::model< ::color::category::xyz< tag_name > > & color_parameter
29869 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::xyz< tag_name > >::akin_type >::model_type component_parameter
29870 ) {
29871 	typedef ::color::category::xyz< tag_name > category_type;
29872 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
29873 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
29874 	::color::model< akin_type > rgb(color_parameter);
29875 	rgb.template set<blue_p > (component_parameter);
29876 	color_parameter = rgb;
29877 }
29878 
29879 }
29880 }
29881 
29882 namespace color {
29883 namespace set {
29884 
29885 template< typename tag_name >
29886 inline
29887 void
gray(::color::model<::color::category::xyz<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::xyz<tag_name>>::akin_type>::model_type component_parameter)29888 gray
29889 (
29890 	::color::model< ::color::category::xyz< tag_name > > & color_parameter
29891 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::xyz< tag_name > >::akin_type >::model_type component_parameter
29892 ) {
29893 	typedef ::color::category::xyz< tag_name > category_type;
29894 	typedef typename ::color::akin::gray< category_type >::akin_type akin_type;
29895 	typedef ::color::_internal::reformat< category_type, akin_type > reformat_type;
29896 	color_parameter.template set<0>(reformat_type::template process<0,0>(component_parameter));
29897 }
29898 
29899 }
29900 }
29901 
29902 namespace color {
29903 namespace _internal {
29904 
29905 template
29906 <
29907 	typename xyz_tag_name
29908 	,typename gray_tag_name
29909 	>
29910 struct convert
29911 	<
29912 	::color::category::xyz< xyz_tag_name >
29913 	,::color::category::gray< gray_tag_name >
29914 	> {
29915 public:
29916 	typedef ::color::category::xyz< xyz_tag_name > category_left_type;
29917 	typedef ::color::category::gray< gray_tag_name > category_right_type;
29918 
29919 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
29920 
29921 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
29922 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
29923 
29924 	typedef ::color::constant::xyz::transformation::matrix< scalar_type > xyz_matrix_type;
29925 	typedef ::color::constant::xyz::space::gamma< scalar_type, ::color::constant::xyz::space::sRGB_entity > xyz_gamma_type;
29926 
29927 	typedef typename container_left_trait_type::input_type container_left_input_type;
29928 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
29929 
29930 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
29931 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
29932 
processcolor::_internal::convert29933 	static void process
29934 	(
29935 		container_left_input_type left
29936 		,container_right_const_input_type right
29937 	) {
29938 		static const scalar_type b2 = xyz_matrix_type::M21() + xyz_matrix_type::M22() + xyz_matrix_type::M23();
29939 		static const scalar_type b1 = (xyz_matrix_type::M11() + xyz_matrix_type::M12() + xyz_matrix_type::M13()) / b2;
29940 		static const scalar_type b3 = (xyz_matrix_type::M31() + xyz_matrix_type::M32() + xyz_matrix_type::M33()) / b2;
29941 		scalar_type g = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
29942 		scalar_type x = b1 * g;
29943 		scalar_type y = g;
29944 		scalar_type z = b3 * g;
29945 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(x));
29946 		container_left_trait_type::template set<1>(left, diverse_type::template process<1>(y));
29947 		container_left_trait_type::template set<2>(left, diverse_type::template process<2>(z));
29948 	}
29949 };
29950 
29951 }
29952 }
29953 
29954 namespace color {
29955 namespace _internal {
29956 
29957 template< typename xyz_tag_name, typename cmy_tag_name >
29958 struct convert
29959 	<
29960 	::color::category::xyz< xyz_tag_name >
29961 	,::color::category::cmy< cmy_tag_name >
29962 	> {
29963 public:
29964 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
29965 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_right_type;
29966 
29967 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
29968 
29969 	typedef ::color::model< xyz_category_type > xyz_model_type;
29970 	typedef ::color::model< cmy_category_type > cmy_model_type;
29971 
29972 	typedef ::color::rgb< scalar_type > rgb_model_type;
29973 
29974 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
29975 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
29976 
29977 	typedef typename container_left_trait_type::input_type container_left_input_type;
29978 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
29979 
processcolor::_internal::convert29980 	static void process
29981 	(
29982 		container_left_input_type left
29983 		,container_right_const_input_type right
29984 	) {
29985 		left = xyz_model_type(rgb_model_type(cmy_model_type(right))).container();
29986 	}
29987 };
29988 
29989 }
29990 }
29991 
29992 namespace color {
29993 namespace _internal {
29994 
29995 template< typename xyz_tag_name, typename cmyk_tag_name >
29996 struct convert
29997 	<
29998 	::color::category::xyz< xyz_tag_name >
29999 	,::color::category::cmyk< cmyk_tag_name >
30000 	> {
30001 public:
30002 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
30003 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
30004 
30005 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
30006 
30007 	typedef ::color::model< xyz_category_type > xyz_model_type;
30008 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
30009 
30010 	typedef ::color::rgb< scalar_type > rgb_model_type;
30011 
30012 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
30013 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
30014 
30015 	typedef typename container_left_trait_type::input_type container_left_input_type;
30016 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
30017 
processcolor::_internal::convert30018 	static void process
30019 	(
30020 		container_left_input_type left
30021 		,container_right_const_input_type right
30022 	) {
30023 		left = xyz_model_type(rgb_model_type(cmyk_model_type(right))).container();
30024 	}
30025 };
30026 
30027 }
30028 }
30029 
30030 namespace color {
30031 namespace _internal {
30032 
30033 template< typename xyz_tag_name, typename hsl_tag_name >
30034 struct convert
30035 	<
30036 	::color::category::xyz< xyz_tag_name >
30037 	,::color::category::hsl< hsl_tag_name >
30038 	> {
30039 public:
30040 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
30041 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
30042 
30043 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
30044 
30045 	typedef ::color::model< xyz_category_type > xyz_model_type;
30046 	typedef ::color::model< hsl_category_type > hsl_model_type;
30047 
30048 	typedef ::color::rgb< scalar_type > rgb_model_type;
30049 
30050 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
30051 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
30052 
30053 	typedef typename container_left_trait_type::input_type container_left_input_type;
30054 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
30055 
processcolor::_internal::convert30056 	static void process
30057 	(
30058 		container_left_input_type left
30059 		,container_right_const_input_type right
30060 	) {
30061 		left = xyz_model_type(rgb_model_type(hsl_model_type(right))).container();
30062 	}
30063 };
30064 
30065 }
30066 }
30067 
30068 namespace color {
30069 namespace _internal {
30070 
30071 template< typename xyz_tag_name, typename hsv_tag_name >
30072 struct convert
30073 	<
30074 	::color::category::xyz< xyz_tag_name >
30075 	,::color::category::hsv< hsv_tag_name >
30076 	> {
30077 public:
30078 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
30079 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
30080 
30081 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
30082 
30083 	typedef ::color::model< xyz_category_type > xyz_model_type;
30084 	typedef ::color::model< hsv_category_type > hsv_model_type;
30085 
30086 	typedef ::color::rgb< scalar_type > rgb_model_type;
30087 
30088 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
30089 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
30090 
30091 	typedef typename container_left_trait_type::input_type container_left_input_type;
30092 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
30093 
processcolor::_internal::convert30094 	static void process
30095 	(
30096 		container_left_input_type left
30097 		,container_right_const_input_type right
30098 	) {
30099 		left = xyz_model_type(rgb_model_type(hsv_model_type(right))).container();
30100 	}
30101 };
30102 
30103 }
30104 }
30105 
30106 namespace color {
30107 namespace _internal {
30108 
30109 template< typename xyz_tag_name, typename hsi_tag_name >
30110 struct convert
30111 	<
30112 	::color::category::xyz< xyz_tag_name >
30113 	,::color::category::hsi< hsi_tag_name >
30114 	> {
30115 public:
30116 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
30117 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
30118 
30119 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
30120 
30121 	typedef ::color::model< xyz_category_type > xyz_model_type;
30122 	typedef ::color::model< hsi_category_type > hsi_model_type;
30123 
30124 	typedef ::color::rgb< scalar_type > rgb_model_type;
30125 
30126 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
30127 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
30128 
30129 	typedef typename container_left_trait_type::input_type container_left_input_type;
30130 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
30131 
processcolor::_internal::convert30132 	static void process
30133 	(
30134 		container_left_input_type left
30135 		,container_right_const_input_type right
30136 	) {
30137 		left = xyz_model_type(rgb_model_type(hsi_model_type(right))).container();
30138 	}
30139 };
30140 
30141 }
30142 }
30143 
30144 namespace color {
30145 namespace _internal {
30146 
30147 template
30148 <
30149 	typename xyz_tag_name
30150 	,typename hwb_tag_name
30151 	>
30152 struct convert
30153 	<
30154 	::color::category::xyz< xyz_tag_name >
30155 	,::color::category::hwb< hwb_tag_name >
30156 	> {
30157 public:
30158 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
30159 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
30160 
30161 	typedef typename ::color::trait::scalar< xyz_category_type >::instance_type scalar_type;
30162 
30163 	typedef ::color::model< xyz_category_type > xyz_model_type;
30164 	typedef ::color::model< hwb_category_type > hwb_model_type;
30165 
30166 	typedef ::color::rgb< scalar_type > rgb_model_type;
30167 	typedef ::color::hsv< scalar_type > hsv_model_type;
30168 
30169 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
30170 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
30171 
30172 	typedef typename container_left_trait_type::input_type container_left_input_type;
30173 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
30174 
processcolor::_internal::convert30175 	static void process
30176 	(
30177 		container_left_input_type left
30178 		,container_right_const_input_type right
30179 	) {
30180 		left = xyz_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right)))).container();
30181 	}
30182 };
30183 
30184 }
30185 }
30186 
30187 namespace color {
30188 namespace _internal {
30189 
30190 template
30191 <
30192 	typename xyz_tag_name
30193 	,typename rgb_tag_name
30194 	>
30195 struct convert
30196 	<
30197 	::color::category::xyz< xyz_tag_name >
30198 	,::color::category::rgb< rgb_tag_name >
30199 	> {
30200 public:
30201 	typedef ::color::category::xyz< xyz_tag_name > category_left_type;
30202 	typedef ::color::category::rgb< rgb_tag_name > category_right_type;
30203 
30204 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
30205 
30206 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
30207 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
30208 
30209 	typedef ::color::constant::xyz::transformation::matrix< scalar_type > xyz_matrix_type;
30210 	typedef ::color::constant::xyz::space::gamma< scalar_type, ::color::constant::xyz::space::sRGB_entity > xyz_gamma_type;
30211 	typedef ::color::constant::xyz::adaptation::matrix< scalar_type > xyz_adaptation_type;
30212 
30213 	typedef typename container_left_trait_type::input_type container_left_input_type;
30214 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
30215 
30216 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
30217 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
30218 
30219 	enum {
30220 		red_p = ::color::place::_internal::red<category_right_type>::position_enum
30221 		,green_p = ::color::place::_internal::green<category_right_type>::position_enum
30222 		,blue_p = ::color::place::_internal::blue<category_right_type>::position_enum
30223 	};
30224 
processcolor::_internal::convert30225 	static void process
30226 	(
30227 		container_left_input_type left
30228 		,container_right_const_input_type right
30229 	) {
30230 		static const scalar_type b11 = xyz_matrix_type::M11(), b12 = xyz_matrix_type::M12(), b13 = xyz_matrix_type::M13();
30231 		static const scalar_type b21 = xyz_matrix_type::M21(), b22 = xyz_matrix_type::M22(), b23 = xyz_matrix_type::M23();
30232 		static const scalar_type b31 = xyz_matrix_type::M31(), b32 = xyz_matrix_type::M32(), b33 = xyz_matrix_type::M33();
30233 		scalar_type r = normalize_type::template process<red_p >(container_right_trait_type::template get<red_p >(right));
30234 		scalar_type g = normalize_type::template process<green_p>(container_right_trait_type::template get<green_p>(right));
30235 		scalar_type b = normalize_type::template process<blue_p >(container_right_trait_type::template get<blue_p >(right));
30236 		r = xyz_gamma_type::decode(r);
30237 		g = xyz_gamma_type::decode(g);
30238 		b = xyz_gamma_type::decode(b);
30239 		scalar_type x = b11 * r + b12 * g + b13 * b;
30240 		scalar_type y = b21 * r + b22 * g + b23 * b;
30241 		scalar_type z = b31 * r + b32 * g + b33 * b;
30242 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(x));
30243 		container_left_trait_type::template set<1>(left, diverse_type::template process<1>(y));
30244 		container_left_trait_type::template set<2>(left, diverse_type::template process<2>(z));
30245 	}
30246 };
30247 
30248 }
30249 }
30250 
30251 namespace color {
30252 namespace _internal {
30253 
30254 template
30255 <
30256 	typename xyz_tag_name
30257 	,typename yiq_tag_name
30258 	>
30259 struct convert
30260 	<
30261 	::color::category::xyz< xyz_tag_name >
30262 	,::color::category::yiq< yiq_tag_name >
30263 	> {
30264 public:
30265 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
30266 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
30267 
30268 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
30269 
30270 	typedef ::color::model< xyz_category_type > xyz_model_type;
30271 	typedef ::color::model< yiq_category_type > yiq_model_type;
30272 
30273 	typedef ::color::rgb< scalar_type > rgb_model_type;
30274 
30275 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
30276 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
30277 
30278 	typedef typename container_left_trait_type::input_type container_left_input_type;
30279 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
30280 
processcolor::_internal::convert30281 	static void process
30282 	(
30283 		container_left_input_type left
30284 		,container_right_const_input_type right
30285 	) {
30286 		left = xyz_model_type(rgb_model_type(yiq_model_type(right))).container();
30287 	}
30288 };
30289 
30290 }
30291 }
30292 
30293 namespace color {
30294 namespace _internal {
30295 
30296 template
30297 <
30298 	typename xyz_tag_name
30299 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum reference_number
30300 	>
30301 struct convert
30302 	<
30303 	::color::category::xyz< xyz_tag_name >
30304 	,::color::category::yuv< yuv_tag_name, reference_number >
30305 	> {
30306 public:
30307 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
30308 	typedef ::color::category::yuv< yuv_tag_name, reference_number > yuv_category_type, category_right_type;
30309 
30310 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
30311 
30312 	typedef ::color::model< xyz_category_type > xyz_model_type;
30313 	typedef ::color::model< yuv_category_type > yuv_model_type;
30314 
30315 	typedef ::color::rgb< scalar_type > rgb_model_type;
30316 
30317 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
30318 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
30319 
30320 	typedef typename container_left_trait_type::input_type container_left_input_type;
30321 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
30322 
processcolor::_internal::convert30323 	static void process
30324 	(
30325 		container_left_input_type left
30326 		,container_right_const_input_type right
30327 	) {
30328 		left = xyz_model_type(rgb_model_type(yuv_model_type(right))).container();
30329 	}
30330 };
30331 
30332 }
30333 }
30334 
30335 namespace color {
30336 namespace _internal {
30337 
30338 template< typename xyz_tag_name, typename YCgCo_tag_name >
30339 struct convert
30340 	<
30341 	::color::category::xyz< xyz_tag_name >
30342 	,::color::category::YCgCo< YCgCo_tag_name >
30343 	> {
30344 public:
30345 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
30346 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
30347 
30348 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
30349 
30350 	typedef ::color::model< xyz_category_type > xyz_model_type;
30351 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
30352 
30353 	typedef ::color::rgb< scalar_type > rgb_model_type;
30354 
30355 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
30356 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
30357 
30358 	typedef typename container_left_trait_type::input_type container_left_input_type;
30359 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
30360 
processcolor::_internal::convert30361 	static void process
30362 	(
30363 		container_left_input_type left
30364 		,container_right_const_input_type right
30365 	) {
30366 		left = xyz_model_type(rgb_model_type(YCgCo_model_type(right))).container();
30367 	}
30368 };
30369 
30370 }
30371 }
30372 
30373 namespace color {
30374 namespace _internal {
30375 
30376 template< typename xyz_tag_name, typename YDbDr_tag_name >
30377 struct convert
30378 	<
30379 	::color::category::xyz< xyz_tag_name >
30380 	,::color::category::YDbDr< YDbDr_tag_name >
30381 	> {
30382 public:
30383 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
30384 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
30385 
30386 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
30387 
30388 	typedef ::color::model< xyz_category_type > xyz_model_type;
30389 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
30390 
30391 	typedef ::color::rgb< scalar_type > rgb_model_type;
30392 
30393 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
30394 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
30395 
30396 	typedef typename container_left_trait_type::input_type container_left_input_type;
30397 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
30398 
processcolor::_internal::convert30399 	static void process
30400 	(
30401 		container_left_input_type left
30402 		,container_right_const_input_type right
30403 	) {
30404 		left = xyz_model_type(rgb_model_type(YDbDr_model_type(right))).container();
30405 	}
30406 };
30407 
30408 }
30409 }
30410 
30411 namespace color {
30412 namespace _internal {
30413 
30414 template
30415 <
30416 	typename xyz_tag_name
30417 	,typename YPbPr_tag_name,::color::constant::YPbPr::reference_enum YPbPr_reference_number
30418 	>
30419 struct convert
30420 	<
30421 	::color::category::xyz< xyz_tag_name >
30422 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
30423 	> {
30424 public:
30425 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
30426 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_right_type;
30427 
30428 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
30429 
30430 	typedef ::color::model< xyz_category_type > xyz_model_type;
30431 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
30432 
30433 	typedef ::color::rgb< scalar_type > rgb_model_type;
30434 
30435 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
30436 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
30437 
30438 	typedef typename container_left_trait_type::input_type container_left_input_type;
30439 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
30440 
processcolor::_internal::convert30441 	static void process
30442 	(
30443 		container_left_input_type left
30444 		,container_right_const_input_type right
30445 	) {
30446 		left = xyz_model_type(rgb_model_type(YPbPr_model_type(right))).container();
30447 	}
30448 };
30449 
30450 }
30451 }
30452 
30453 namespace color {
30454 namespace _internal {
30455 
30456 template< typename tag_left_name, typename tag_right_name >
30457 struct convert
30458 	<
30459 	::color::category::xyz< tag_left_name >
30460 	,::color::category::xyz< tag_right_name>
30461 	> {
30462 public:
30463 	typedef ::color::category::xyz< tag_left_name > category_left_type;
30464 	typedef ::color::category::xyz< tag_right_name> category_right_type;
30465 
30466 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
30467 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
30468 
30469 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
30470 
30471 	typedef typename container_left_trait_type::input_type container_left_input_type;
30472 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
30473 
processcolor::_internal::convert30474 	static void process
30475 	(
30476 		container_left_input_type left
30477 		,container_right_const_input_type right
30478 	) {
30479 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
30480 		container_left_trait_type::template set<1>(left, reformat_type::template process<1,1>(container_right_trait_type::template get<1>(right)));
30481 		container_left_trait_type::template set<2>(left, reformat_type::template process<2,2>(container_right_trait_type::template get<2>(right)));
30482 	}
30483 };
30484 
30485 }
30486 }
30487 
30488 namespace color {
30489 namespace akin {
30490 
30491 template
30492 <
30493 	typename tag_name
30494 	,::color::constant::lab::reference_enum reference_number
30495 
30496 	>
30497 struct lab< ::color::category::gray< tag_name >, reference_number > {
30498 public:
30499 	typedef ::color::category::lab< tag_name, reference_number > akin_type;
30500 };
30501 
30502 }
30503 }
30504 
30505 namespace color {
30506 namespace akin {
30507 
30508 template< typename tag_name, ::color::constant::lab::reference_enum lab_reference_number >
30509 struct lab< ::color::category::cmy< tag_name >, lab_reference_number > {
30510 public:
30511 	typedef ::color::category::lab< tag_name, lab_reference_number > akin_type;
30512 };
30513 
30514 }
30515 }
30516 
30517 namespace color {
30518 namespace akin {
30519 
30520 template
30521 <
30522 	typename tag_name
30523 	,::color::constant::lab::reference_enum reference_number
30524 
30525 	>
30526 struct lab< ::color::category::cmyk< tag_name >, reference_number > {
30527 public:
30528 	typedef ::color::category::lab< tag_name, reference_number > akin_type;
30529 };
30530 
30531 }
30532 }
30533 
30534 namespace color {
30535 namespace akin {
30536 
30537 template
30538 <
30539 	typename tag_name
30540 	,::color::constant::lab::reference_enum reference_number
30541 
30542 	>
30543 struct lab< ::color::category::hsl< tag_name >, reference_number > {
30544 public:
30545 	typedef ::color::category::lab< tag_name, reference_number > akin_type;
30546 };
30547 
30548 }
30549 }
30550 
30551 namespace color {
30552 namespace akin {
30553 
30554 template
30555 <
30556 	typename tag_name
30557 	,::color::constant::lab::reference_enum reference_number
30558 
30559 	>
30560 struct lab< ::color::category::hsv< tag_name >, reference_number > {
30561 public:
30562 	typedef ::color::category::lab< tag_name, reference_number > akin_type;
30563 };
30564 }
30565 }
30566 
30567 namespace color {
30568 namespace akin {
30569 
30570 template
30571 <
30572 	typename tag_name
30573 	,::color::constant::lab::reference_enum reference_number
30574 
30575 	>
30576 struct lab< ::color::category::hsi< tag_name >, reference_number > {
30577 public:
30578 	typedef ::color::category::lab< tag_name, reference_number > akin_type;
30579 };
30580 
30581 }
30582 }
30583 
30584 namespace color {
30585 namespace akin {
30586 
30587 template
30588 <
30589 	typename tag_name
30590 	,::color::constant::lab::reference_enum reference_number
30591 
30592 	>
30593 struct lab< ::color::category::hwb< tag_name >, reference_number > {
30594 public:
30595 	typedef ::color::category::lab< tag_name, reference_number > akin_type;
30596 };
30597 
30598 }
30599 }
30600 
30601 namespace color {
30602 namespace akin {
30603 
30604 template
30605 <
30606 	typename tag_name, typename ::color::constant::lab::reference_enum lab_reference_number
30607 
30608 	>
30609 struct lab< ::color::category::rgb< tag_name >, lab_reference_number > {
30610 public:
30611 	typedef ::color::category::lab< tag_name, lab_reference_number > akin_type;
30612 };
30613 }
30614 }
30615 
30616 namespace color {
30617 namespace akin {
30618 
30619 template
30620 <
30621 	typename tag_name
30622 	,::color::constant::lab::reference_enum reference_number
30623 
30624 	>
30625 struct lab< ::color::category::yiq< tag_name >, reference_number > {
30626 public:
30627 	typedef ::color::category::lab< tag_name, reference_number > akin_type;
30628 };
30629 
30630 }
30631 }
30632 
30633 namespace color {
30634 namespace akin {
30635 
30636 template
30637 <
30638 	typename tag_name
30639 	,::color::constant::lab::reference_enum lab_reference_number
30640 	,::color::constant::yuv::reference_enum yuv_reference_number
30641 	>
30642 struct lab< ::color::category::yuv< tag_name, yuv_reference_number >, lab_reference_number > {
30643 public:
30644 	typedef ::color::category::lab< tag_name, lab_reference_number > akin_type;
30645 };
30646 
30647 }
30648 }
30649 
30650 namespace color {
30651 namespace akin {
30652 
30653 template
30654 <
30655 	typename tag_name
30656 	,::color::constant::lab::reference_enum reference_number
30657 
30658 	>
30659 struct lab< ::color::category::YCgCo< tag_name >, reference_number > {
30660 public:
30661 	typedef ::color::category::lab< tag_name, reference_number > akin_type;
30662 };
30663 
30664 }
30665 }
30666 
30667 namespace color {
30668 namespace akin {
30669 
30670 template
30671 <
30672 	typename tag_name
30673 	,::color::constant::lab::reference_enum reference_number
30674 
30675 	>
30676 struct lab< ::color::category::YDbDr< tag_name >, reference_number > {
30677 public:
30678 	typedef ::color::category::lab< tag_name, reference_number > akin_type;
30679 };
30680 
30681 }
30682 }
30683 
30684 namespace color {
30685 namespace akin {
30686 
30687 template
30688 <
30689 	typename tag_name
30690 	,::color::constant::lab::reference_enum lab_reference_number
30691 	,::color::constant::YPbPr::reference_enum YPbPr_reference_number
30692 	>
30693 struct lab< ::color::category::YPbPr< tag_name, YPbPr_reference_number >, lab_reference_number > {
30694 public:
30695 	typedef ::color::category::lab< tag_name, lab_reference_number > akin_type;
30696 };
30697 
30698 }
30699 }
30700 
30701 namespace color {
30702 namespace akin {
30703 
30704 template
30705 <
30706 	typename tag_name
30707 	,::color::constant::lab::reference_enum reference_number
30708 
30709 	>
30710 struct lab< ::color::category::xyz< tag_name >, reference_number > {
30711 public:
30712 	typedef ::color::category::lab< tag_name, reference_number > akin_type;
30713 };
30714 
30715 }
30716 }
30717 
30718 namespace color {
30719 namespace akin {
30720 
30721 template
30722 <
30723 	typename tag_name
30724 	,::color::constant::lab::reference_enum left_reference_number
30725 	,::color::constant::lab::reference_enum right_reference_number
30726 	>
30727 struct lab< ::color::category::lab< tag_name, right_reference_number >, left_reference_number > {
30728 public:
30729 	typedef ::color::category::lab< tag_name, left_reference_number > akin_type;
30730 };
30731 
30732 }
30733 }
30734 
30735 namespace color {
30736 namespace akin {
30737 
30738 template
30739 <
30740 	typename tag_name
30741 	,::color::constant::lab::reference_enum reference_number
30742 	>
30743 struct lab< ::color::category::xyy< tag_name >, reference_number > {
30744 public:
30745 	typedef ::color::category::lab< tag_name, reference_number > akin_type;
30746 };
30747 
30748 }
30749 }
30750 
30751 namespace color {
30752 namespace akin {
30753 
30754 template
30755 <
30756 	typename tag_name
30757 	,::color::constant::lab::reference_enum lab_reference_number
30758 	,::color::constant::lms::reference_enum lms_reference_number
30759 	>
30760 struct lab< ::color::category::lms< tag_name, lms_reference_number >, lab_reference_number > {
30761 public:
30762 	typedef ::color::category::lab< tag_name, lab_reference_number > akin_type;
30763 };
30764 
30765 }
30766 }
30767 
30768 namespace color {
30769 namespace akin {
30770 
30771 template
30772 <
30773 	typename tag_name
30774 	,::color::constant::lab::reference_enum reference_number
30775 
30776 	>
30777 struct lab< ::color::category::luv< tag_name >, reference_number > {
30778 public:
30779 	typedef ::color::category::lab< tag_name, reference_number > akin_type;
30780 };
30781 
30782 }
30783 }
30784 
30785 namespace color {
30786 namespace akin {
30787 
30788 template
30789 <
30790 	typename tag_name
30791 	,::color::constant::lab::reference_enum reference_number
30792 
30793 	>
30794 struct lab< ::color::category::LabCH< tag_name >, reference_number > {
30795 public:
30796 	typedef ::color::category::lab< tag_name, reference_number > akin_type;
30797 };
30798 
30799 }
30800 }
30801 
30802 namespace color {
30803 namespace akin {
30804 
30805 template
30806 <
30807 	typename tag_name
30808 	, ::color::constant::lab::reference_enum reference_number
30809 	>
30810 struct lab< ::color::category::LuvCH< tag_name >, reference_number > {
30811 public:
30812 	typedef ::color::category::lab< tag_name, reference_number > akin_type;
30813 };
30814 
30815 }
30816 }
30817 
30818 namespace color {
30819 namespace trait {
30820 
30821 template <> struct info< ::color::category::lab_uint8 <> > {
30822 public:
30823 	enum { implemented_entity = true };
30824 	enum { meaningful_entity = true };
30825 };
30826 template <> struct info< ::color::category::lab_uint16 <> > {
30827 public:
30828 	enum { implemented_entity = true };
30829 	enum { meaningful_entity = true };
30830 };
30831 template <> struct info< ::color::category::lab_uint32 <> > {
30832 public:
30833 	enum { implemented_entity = true };
30834 	enum { meaningful_entity = true };
30835 };
30836 template <> struct info< ::color::category::lab_uint64 <> > {
30837 public:
30838 	enum { implemented_entity = true };
30839 	enum { meaningful_entity = true };
30840 };
30841 template <> struct info< ::color::category::lab_float <> > {
30842 public:
30843 	enum { implemented_entity = true };
30844 	enum { meaningful_entity = true };
30845 };
30846 template <> struct info< ::color::category::lab_double <> > {
30847 public:
30848 	enum { implemented_entity = true };
30849 	enum { meaningful_entity = true };
30850 };
30851 template <> struct info< ::color::category::lab_ldouble<> > {
30852 public:
30853 	enum { implemented_entity = true };
30854 	enum { meaningful_entity = true };
30855 };
30856 
30857 template <> struct info< ::color::category::lab_int8 <> > {
30858 public:
30859 	enum { implemented_entity = true };
30860 	enum { meaningful_entity = true };
30861 };
30862 template <> struct info< ::color::category::lab_int16 <> > {
30863 public:
30864 	enum { implemented_entity = true };
30865 	enum { meaningful_entity = true };
30866 };
30867 template <> struct info< ::color::category::lab_int32 <> > {
30868 public:
30869 	enum { implemented_entity = true };
30870 	enum { meaningful_entity = true };
30871 };
30872 template <> struct info< ::color::category::lab_int64 <> > {
30873 public:
30874 	enum { implemented_entity = true };
30875 	enum { meaningful_entity = true };
30876 };
30877 }
30878 }
30879 
30880 namespace color {
30881 namespace _internal {
30882 namespace lab {
30883 namespace bound {
30884 
30885 template< typename number_name, typename index_name, ::color::constant::lab::reference_enum reference_number >
30886 struct constrain {
30887 public:
30888 	typedef number_name number_type;
30889 	typedef index_name index_type;
30890 
30891 	typedef ::color::_internal::utility::type::traitC< number_type > trait_type;
30892 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
30893 
30894 	typedef typename trait_type::instance_type instance_type;
30895 	typedef typename trait_type::return_image_type return_image_type;
30896 
30897 	typedef typename index_trait_type::instance_type index_instance_type;
30898 	typedef typename index_trait_type::model_type index_input_const_type;
30899 
30900 	template< index_instance_type index >
maximumcolor::_internal::lab::bound::constrain30901 	static return_image_type maximum() {
30902 		static instance_type max_list[] = { 100, 127, 127 };
30903 		return max_list[index];
30904 	}
30905 
maximumcolor::_internal::lab::bound::constrain30906 	static return_image_type maximum(index_input_const_type index) {
30907 		static instance_type max_list[] = { 100, 127, 127 };
30908 		return max_list[index];
30909 	}
30910 
30911 	template< index_instance_type index >
minimumcolor::_internal::lab::bound::constrain30912 	static return_image_type minimum() {
30913 		static instance_type min_list[] = { 0, -127, -127 };
30914 		return min_list[index];
30915 	}
30916 
minimumcolor::_internal::lab::bound::constrain30917 	static return_image_type minimum(index_input_const_type index) {
30918 		static instance_type min_list[] = { 0, -127, -127 };
30919 		return min_list[index];
30920 	}
30921 
30922 	template< index_instance_type index >
rangecolor::_internal::lab::bound::constrain30923 	static return_image_type range() {
30924 		static instance_type range_list[] = { 100, 255, 255 };
30925 		return range_list[index];
30926 	}
30927 
rangecolor::_internal::lab::bound::constrain30928 	static return_image_type range(index_input_const_type index) {
30929 		static instance_type range_list[] = { 100, 255, 255 };
30930 		return range_list[index];
30931 	}
30932 };
30933 
30934 }
30935 }
30936 }
30937 }
30938 
30939 namespace color {
30940 namespace trait {
30941 
30942 template< ::color::constant::lab::reference_enum reference_number>
30943 struct bound< ::color::category::lab_int8<reference_number> >
30944 	: public ::color::_internal::lab::bound::constrain< std::int16_t, typename ::color::trait::index< ::color::category::lab_int8<reference_number> >::instance_type, reference_number > {
30945 };
30946 
30947 template< ::color::constant::lab::reference_enum reference_number>
30948 struct bound< ::color::category::lab_int16<reference_number> >
30949 	: public ::color::_internal::lab::bound::constrain< std::int16_t, typename ::color::trait::index< ::color::category::lab_int16<reference_number> >::instance_type, reference_number > {
30950 };
30951 
30952 template< ::color::constant::lab::reference_enum reference_number>
30953 struct bound< ::color::category::lab_int32<reference_number> >
30954 	: public ::color::_internal::lab::bound::constrain< std::int32_t, typename ::color::trait::index< ::color::category::lab_int32<reference_number> >::instance_type, reference_number > {
30955 };
30956 
30957 template< ::color::constant::lab::reference_enum reference_number>
30958 struct bound< ::color::category::lab_int64<reference_number> >
30959 	: public ::color::_internal::lab::bound::constrain< std::int64_t, typename ::color::trait::index< ::color::category::lab_int64<reference_number> >::instance_type, reference_number > {
30960 };
30961 
30962 }
30963 }
30964 namespace color {
30965 namespace _internal {
30966 namespace lab {
30967 namespace bound {
30968 
30969 template< typename number_name, typename index_name, ::color::constant::lab::reference_enum reference_number >
30970 struct positive {
30971 public:
30972 	typedef number_name number_type;
30973 	typedef index_name index_type;
30974 
30975 	typedef ::color::_internal::utility::type::traitC< number_type > trait_type;
30976 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
30977 
30978 	typedef typename trait_type::instance_type instance_type;
30979 	typedef typename trait_type::return_image_type return_image_type;
30980 
30981 	typedef typename index_trait_type::instance_type index_instance_type;
30982 	typedef typename index_trait_type::model_type index_input_const_type;
30983 
30984 	typedef ::color::_internal::lab::bound::positive< number_type, index_name, reference_number > this_type;
30985 
lower100color::_internal::lab::bound::positive30986 	static instance_type lower100() {
30987 		return 0;
30988 	}
30989 
higher100color::_internal::lab::bound::positive30990 	static instance_type higher100() {
30991 		return std::numeric_limits<number_type>::max();
30992 	}
30993 
span100color::_internal::lab::bound::positive30994 	static instance_type span100() {
30995 		return this_type::higher100() - this_type::lower100();
30996 	}
30997 
highercolor::_internal::lab::bound::positive30998 	static instance_type higher() {
30999 		return std::numeric_limits<number_type>::max()/2 + 128;
31000 	}
31001 
lowercolor::_internal::lab::bound::positive31002 	static instance_type lower() {
31003 		return std::numeric_limits<number_type>::max()/2 - 127;
31004 	}
31005 
spancolor::_internal::lab::bound::positive31006 	static instance_type span() {
31007 		return this_type::higher() - this_type::lower();
31008 	}
31009 
31010 	template< index_instance_type index >
maximumcolor::_internal::lab::bound::positive31011 	static return_image_type maximum() {
31012 		static instance_type max_list[] = { this_type::higher100(), this_type::higher(), this_type::higher() };
31013 		return max_list[index];
31014 	}
31015 
maximumcolor::_internal::lab::bound::positive31016 	static return_image_type maximum(index_input_const_type index) {
31017 		static instance_type max_list[] = { this_type::higher100(), this_type::higher(), this_type::higher() };
31018 		return max_list[index];
31019 	}
31020 
31021 	template< index_instance_type index >
minimumcolor::_internal::lab::bound::positive31022 	static return_image_type minimum() {
31023 		static instance_type min_list[] = { this_type::lower100(), this_type::lower(), this_type::lower() };
31024 		return min_list[index];
31025 	}
31026 
minimumcolor::_internal::lab::bound::positive31027 	static return_image_type minimum(index_input_const_type index) {
31028 		static instance_type min_list[] = { this_type::lower100(), this_type::lower(), this_type::lower() };
31029 		return min_list[index];
31030 	}
31031 
31032 	template< index_instance_type index >
rangecolor::_internal::lab::bound::positive31033 	static return_image_type range() {
31034 		static instance_type range_list[] = { this_type::span100(), this_type::span(), this_type::span() };
31035 		return range_list[index];
31036 	}
31037 
rangecolor::_internal::lab::bound::positive31038 	static return_image_type range(index_input_const_type index) {
31039 		static instance_type range_list[] = { this_type::span100(), this_type::span(), this_type::span() };
31040 		return range_list[index];
31041 	}
31042 };
31043 
31044 }
31045 }
31046 }
31047 }
31048 
31049 namespace color {
31050 namespace trait {
31051 
31052 template< ::color::constant::lab::reference_enum reference_number>
31053 struct bound< ::color::category::lab_uint8<reference_number> >
31054 	: public ::color::_internal::lab::bound::positive< std::uint8_t, typename ::color::trait::index< ::color::category::lab_uint8<reference_number> >::instance_type, reference_number > {
31055 };
31056 
31057 template< ::color::constant::lab::reference_enum reference_number>
31058 struct bound< ::color::category::lab_uint16<reference_number> >
31059 	: public ::color::_internal::lab::bound::positive< std::uint16_t, typename ::color::trait::index< ::color::category::lab_uint16<reference_number> >::instance_type, reference_number > {
31060 };
31061 
31062 template< ::color::constant::lab::reference_enum reference_number>
31063 struct bound< ::color::category::lab_uint32<reference_number> >
31064 	: public ::color::_internal::lab::bound::positive< std::uint32_t, typename ::color::trait::index< ::color::category::lab_uint32<reference_number> >::instance_type, reference_number > {
31065 };
31066 
31067 template< ::color::constant::lab::reference_enum reference_number>
31068 struct bound< ::color::category::lab_uint64<reference_number> >
31069 	: public ::color::_internal::lab::bound::positive< std::uint64_t, typename ::color::trait::index< ::color::category::lab_uint64<reference_number> >::instance_type, reference_number > {
31070 };
31071 
31072 }
31073 }
31074 namespace color {
31075 namespace trait {
31076 
31077 template< ::color::constant::lab::reference_enum reference_number >
31078 struct bound< ::color::category::lab_float<reference_number> >
31079 	: public ::color::_internal::lab::bound::constrain< float, typename ::color::trait::index< ::color::category::lab_float<reference_number> >::instance_type,reference_number > {
31080 };
31081 
31082 template< ::color::constant::lab::reference_enum reference_number >
31083 struct bound< ::color::category::lab_double<reference_number> >
31084 	: public ::color::_internal::lab::bound::constrain< double, typename ::color::trait::index< ::color::category::lab_double<reference_number> >::instance_type, reference_number > {
31085 };
31086 
31087 template< ::color::constant::lab::reference_enum reference_number >
31088 struct bound< ::color::category::lab_ldouble<reference_number> >
31089 	: public ::color::_internal::lab::bound::constrain< long double, typename ::color::trait::index< ::color::category::lab_ldouble<reference_number> >::instance_type, reference_number > {
31090 };
31091 
31092 }
31093 }
31094 
31095 namespace color {
31096 namespace trait {
31097 
31098 template< ::color::constant::lab::reference_enum reference_number >
31099 struct component< ::color::category::lab_int8<reference_number> >
31100 	: public ::color::_internal::utility::component::array< std::int8_t > {
31101 };
31102 
31103 template< ::color::constant::lab::reference_enum reference_number>
31104 struct component< ::color::category::lab_int16<reference_number> >
31105 	: public ::color::_internal::utility::component::array< std::int16_t > {
31106 };
31107 
31108 template< ::color::constant::lab::reference_enum reference_number >
31109 struct component< ::color::category::lab_int32<reference_number> >
31110 	: public ::color::_internal::utility::component::array< std::int32_t > {
31111 };
31112 
31113 template< ::color::constant::lab::reference_enum reference_number >
31114 struct component< ::color::category::lab_int64<reference_number> >
31115 	: public ::color::_internal::utility::component::array< std::int64_t > {
31116 };
31117 
31118 }
31119 }
31120 namespace color {
31121 namespace trait {
31122 
31123 template< ::color::constant::lab::reference_enum reference_number >
31124 struct component< ::color::category::lab_uint8<reference_number> >
31125 	: public ::color::_internal::utility::component::array< std::uint8_t > {
31126 };
31127 
31128 template< ::color::constant::lab::reference_enum reference_number>
31129 struct component< ::color::category::lab_uint16<reference_number> >
31130 	: public ::color::_internal::utility::component::array< std::uint16_t > {
31131 };
31132 
31133 template< ::color::constant::lab::reference_enum reference_number >
31134 struct component< ::color::category::lab_uint32<reference_number> >
31135 	: public ::color::_internal::utility::component::array< std::uint32_t > {
31136 };
31137 
31138 template< ::color::constant::lab::reference_enum reference_number >
31139 struct component< ::color::category::lab_uint64<reference_number> >
31140 	: public ::color::_internal::utility::component::array< std::uint64_t > {
31141 };
31142 
31143 }
31144 }
31145 namespace color {
31146 namespace trait {
31147 
31148 template< ::color::constant::lab::reference_enum reference_number >
31149 struct component< ::color::category::lab_float<reference_number> >
31150 	: public ::color::_internal::utility::component::array< float > {
31151 };
31152 
31153 template< ::color::constant::lab::reference_enum reference_number >
31154 struct component< ::color::category::lab_double<reference_number> >
31155 	: public ::color::_internal::utility::component::array< double > {
31156 };
31157 
31158 template< ::color::constant::lab::reference_enum reference_number >
31159 struct component< ::color::category::lab_ldouble<reference_number> >
31160 	: public ::color::_internal::utility::component::array< long double > {
31161 };
31162 
31163 }
31164 }
31165 
31166 namespace color {
31167 namespace trait {
31168 
31169 template< ::color::constant::lab::reference_enum reference_number >
31170 struct container< ::color::category::lab_int8<reference_number> >
31171 	: public ::color::_internal::utility::container::array< std::int8_t, 3 > {
31172 };
31173 
31174 template< ::color::constant::lab::reference_enum reference_number >
31175 struct container< ::color::category::lab_int16<reference_number> >
31176 	: public ::color::_internal::utility::container::array< std::int16_t, 3 > {
31177 };
31178 
31179 template< ::color::constant::lab::reference_enum reference_number >
31180 struct container< ::color::category::lab_int32<reference_number> >
31181 	: public ::color::_internal::utility::container::array< std::int32_t, 3 > {
31182 };
31183 
31184 template< ::color::constant::lab::reference_enum reference_number >
31185 struct container< ::color::category::lab_int64<reference_number> >
31186 	: public ::color::_internal::utility::container::array< std::int64_t, 3 > {
31187 };
31188 
31189 }
31190 }
31191 namespace color {
31192 namespace trait {
31193 
31194 template< ::color::constant::lab::reference_enum reference_number >
31195 struct container< ::color::category::lab_uint8<reference_number> >
31196 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
31197 };
31198 
31199 template< ::color::constant::lab::reference_enum reference_number >
31200 struct container< ::color::category::lab_uint16<reference_number> >
31201 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
31202 };
31203 
31204 template< ::color::constant::lab::reference_enum reference_number >
31205 struct container< ::color::category::lab_uint32<reference_number> >
31206 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
31207 };
31208 
31209 template< ::color::constant::lab::reference_enum reference_number >
31210 struct container< ::color::category::lab_uint64<reference_number> >
31211 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
31212 };
31213 
31214 }
31215 }
31216 namespace color {
31217 namespace trait {
31218 
31219 template< ::color::constant::lab::reference_enum reference_number >
31220 struct container< ::color::category::lab_float<reference_number> >
31221 	: public ::color::_internal::utility::container::array< float, 3 > {
31222 };
31223 
31224 template< ::color::constant::lab::reference_enum reference_number >
31225 struct container< ::color::category::lab_double<reference_number> >
31226 	: public ::color::_internal::utility::container::array< double, 3 > {
31227 };
31228 
31229 template< ::color::constant::lab::reference_enum reference_number >
31230 struct container< ::color::category::lab_ldouble<reference_number> >
31231 	: public ::color::_internal::utility::container::array< long double, 3 > {
31232 };
31233 
31234 }
31235 }
31236 
31237 namespace color {
31238 
31239 template< typename type_name, ::color::constant::lab::reference_enum reference_number = ::color::constant::lab::CIE_entity >
31240 using lab = ::color::model< typename ::color::category::lab< type_name, reference_number > >;
31241 
31242 }
31243 
31244 namespace color {
31245 namespace place {
31246 namespace _internal {
31247 
31248 template< typename tag_name, ::color::constant::lab::reference_enum reference_number >
31249 struct lightness< ::color::category::lab< tag_name, reference_number > > {
31250 public:
31251 	typedef ::color::category::lab< tag_name, reference_number > category_type;
31252 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
31253 
31254 	enum { position_enum = 0 };
31255 	enum { has_enum = true };
31256 
positioncolor::place::_internal::lightness31257 	static index_instance_type position() {
31258 		return position_enum;
31259 	}
31260 };
31261 
31262 }
31263 }
31264 }
31265 
31266 namespace color {
31267 namespace get {
31268 
31269 template< typename tag_name, ::color::constant::lab::reference_enum reference_number >
31270 inline
31271 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::lab<tag_name, reference_number> >::akin_type >::return_type
gray(::color::model<::color::category::lab<tag_name,reference_number>> const & color_parameter)31272 gray(::color::model< ::color::category::lab<tag_name,reference_number> > const& color_parameter) {
31273 	typedef ::color::category::lab< tag_name, reference_number > category_type;
31274 	typedef typename ::color::akin::gray< category_type >::akin_type akin_category_type;
31275 	typedef ::color::_internal::reformat< akin_category_type, category_type > reformat_type;
31276 	enum {
31277 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
31278 	};
31279 	enum {
31280 		gray_p = ::color::place::_internal::gray<akin_category_type>::position_enum
31281 	};
31282 	return reformat_type::template process<gray_p,lightness_p>(color_parameter.template get<lightness_p>());
31283 }
31284 
31285 }
31286 }
31287 
31288 namespace color {
31289 namespace get {
31290 
31291 template< typename tag_name, ::color::constant::lab::reference_enum reference_number >
31292 inline
31293 typename ::color::model< ::color::category::lab< tag_name,reference_number> >::component_const_type
lightness(::color::model<::color::category::lab<tag_name,reference_number>> const & color_parameter)31294 lightness(::color::model< ::color::category::lab<tag_name,reference_number> > const& color_parameter) {
31295 	typedef ::color::category::lab<tag_name,reference_number> category_type;
31296 	enum {
31297 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
31298 	};
31299 	return color_parameter.template get<lightness_p>();
31300 }
31301 
31302 }
31303 }
31304 
31305 namespace color {
31306 namespace get {
31307 
31308 template< typename tag_name, ::color::constant::lab::reference_enum reference_number >
31309 inline
31310 typename ::color::model< ::color::category::lab< tag_name, reference_number > >::component_const_type
saturation(::color::model<::color::category::lab<tag_name,reference_number>> const & c)31311 saturation(::color::model< ::color::category::lab< tag_name, reference_number > > const& c) {
31312 	typedef ::color::category::lab< tag_name, reference_number > category_type;
31313 	typedef typename ::color::trait::scalar<category_type> scalar_trait_type;
31314 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
31315 	typedef typename ::color::trait::component<category_type>::instance_type component_type;
31316 	typedef ::color::_internal::normalize< category_type > normalize_type;
31317 	enum {
31318 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
31319 	};
31320 	scalar_type const L = static_cast<scalar_type>(normalize_type::template process<lightness_p>(c.template get< lightness_p>()));
31321 	scalar_type const A = static_cast<scalar_type>(normalize_type::template process<1>(c.template get< 1 >())) ;
31322 	scalar_type const B = static_cast<scalar_type>(normalize_type::template process<2>(c.template get< 2 >()));
31323 	if(false == scalar_trait_type::is_small(scalar_type(L))) {
31324 		return 0;
31325 	}
31326 	return component_type(sqrt(A*A + B*B) / L);
31327 }
31328 
31329 }
31330 }
31331 
31332 namespace color {
31333 namespace get {
31334 
31335 namespace _internal {
31336 namespace lab {
31337 
31338 template< typename unsigned_name, ::color::constant::lab::reference_enum reference_number >
31339 inline
31340 typename ::color::model< ::color::category::lab< unsigned_name, reference_number > >::component_const_type
chroma(::color::model<::color::category::lab<unsigned_name,reference_number>> const & c)31341 chroma(::color::model< ::color::category::lab< unsigned_name, reference_number > > const& c) {
31342 	typedef unsigned_name unsigned_type;
31343 	typedef ::color::category::lab< unsigned_type, reference_number > category_type;
31344 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
31345 	typedef typename ::color::trait::component<category_type>::instance_type component_type;
31346 	scalar_type const A = static_cast<scalar_type>(c.template get< 1 >()) - std::numeric_limits<unsigned_type>::max()/2;
31347 	scalar_type const B = static_cast<scalar_type>(c.template get< 2 >()) - std::numeric_limits<unsigned_type>::max()/2;
31348 	return component_type(sqrt(A*A + B*B));
31349 }
31350 
31351 }
31352 }
31353 
31354 template<::color::constant::lab::reference_enum reference_number >
31355 inline
31356 typename ::color::model< ::color::category::lab< std::uint8_t, reference_number > >::component_const_type
chroma(::color::model<::color::category::lab<std::uint8_t,reference_number>> const & c)31357 chroma(::color::model< ::color::category::lab< std::uint8_t, reference_number > > const& c) {
31358 	return ::color::get::_internal::lab::chroma(c);
31359 }
31360 
31361 template<::color::constant::lab::reference_enum reference_number >
31362 inline
31363 typename ::color::model< ::color::category::lab< std::uint16_t, reference_number > >::component_const_type
chroma(::color::model<::color::category::lab<std::uint16_t,reference_number>> const & c)31364 chroma(::color::model< ::color::category::lab< std::uint16_t, reference_number > > const& c) {
31365 	return ::color::get::_internal::lab::chroma(c);
31366 }
31367 
31368 template<::color::constant::lab::reference_enum reference_number >
31369 inline
31370 typename ::color::model< ::color::category::lab< std::uint32_t, reference_number > >::component_const_type
chroma(::color::model<::color::category::lab<std::uint32_t,reference_number>> const & c)31371 chroma(::color::model< ::color::category::lab< std::uint32_t, reference_number > > const& c) {
31372 	return ::color::get::_internal::lab::chroma(c);
31373 }
31374 
31375 template<::color::constant::lab::reference_enum reference_number >
31376 inline
31377 typename ::color::model< ::color::category::lab< std::uint64_t, reference_number > >::component_const_type
chroma(::color::model<::color::category::lab<std::uint64_t,reference_number>> const & c)31378 chroma(::color::model< ::color::category::lab< std::uint64_t, reference_number > > const& c) {
31379 	return ::color::get::_internal::lab::chroma(c);
31380 }
31381 
31382 template< typename tag_name, ::color::constant::lab::reference_enum reference_number >
31383 inline
31384 typename ::color::model< ::color::category::lab< tag_name, reference_number > >::component_const_type
chroma(::color::model<::color::category::lab<tag_name,reference_number>> const & c)31385 chroma(::color::model< ::color::category::lab< tag_name, reference_number > > const& c) {
31386 	typedef ::color::category::lab< tag_name, reference_number > category_type;
31387 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
31388 	typedef typename ::color::trait::component<category_type>::instance_type component_type;
31389 	scalar_type const A = static_cast<scalar_type>(c.template get< 1 >());
31390 	scalar_type const B = static_cast<scalar_type>(c.template get< 2 >());
31391 	return component_type(sqrt(A*A + B*B));
31392 }
31393 }
31394 }
31395 
31396 namespace color {
31397 namespace set {
31398 
31399 template
31400 <
31401 	typename tag_name
31402 	,::color::constant::lab::reference_enum reference_number
31403 	>
31404 void
gray(::color::model<::color::category::lab<tag_name,reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::lab<tag_name,reference_number>>::akin_type>::model_type component_parameter)31405 gray
31406 (
31407 	::color::model< ::color::category::lab< tag_name,reference_number > > & color_parameter
31408 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::lab< tag_name, reference_number > >::akin_type >::model_type component_parameter
31409 ) {
31410 	typedef ::color::category::lab< tag_name, reference_number > category_type;
31411 	typedef typename ::color::akin::gray< category_type >::akin_type akin_category_type;
31412 	typedef ::color::_internal::reformat< category_type, akin_category_type > reformat_type;
31413 	enum {
31414 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
31415 	};
31416 	enum {
31417 		gray_p = ::color::place::_internal::lightness<akin_category_type>::position_enum
31418 	};
31419 	color_parameter.template set<lightness_p>(reformat_type::template process<lightness_p,gray_p>(component_parameter));
31420 }
31421 
31422 }
31423 }
31424 
31425 namespace color {
31426 namespace set {
31427 template< typename tag_name, ::color::constant::lab::reference_enum reference_number >
31428 inline
31429 void
lightness(::color::model<::color::category::lab<tag_name,reference_number>> & color_parameter,typename::color::model<::color::category::lab<tag_name,reference_number>>::component_input_const_type component_parameter)31430 lightness
31431 (
31432 	::color::model< ::color::category::lab<tag_name, reference_number> > & color_parameter,
31433 	typename ::color::model< ::color::category::lab<tag_name, reference_number> >::component_input_const_type component_parameter
31434 ) {
31435 	typedef ::color::category::lab<tag_name,reference_number> category_type;
31436 	enum {
31437 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
31438 	};
31439 	color_parameter.template set<lightness_p>(component_parameter);
31440 }
31441 
31442 }
31443 }
31444 
31445 namespace color {
31446 namespace set {
31447 
31448 template< typename tag_name, ::color::constant::lab::reference_enum reference_number >
31449 inline
31450 void
red(::color::model<::color::category::lab<tag_name,reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::lab<tag_name,reference_number>>::akin_type>::model_type component_parameter)31451 red
31452 (
31453 	::color::model< ::color::category::lab< tag_name,reference_number > > & color_parameter
31454 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::lab< tag_name, reference_number > >::akin_type >::model_type component_parameter
31455 ) {
31456 	typedef ::color::category::lab< tag_name, reference_number > category_type;
31457 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
31458 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
31459 	::color::model< akin_type > rgb(color_parameter);
31460 	rgb.template set< red_p > (component_parameter);
31461 	color_parameter = rgb;
31462 }
31463 
31464 }
31465 }
31466 
31467 namespace color {
31468 namespace set {
31469 
31470 template< typename tag_name, ::color::constant::lab::reference_enum reference_number >
31471 inline
31472 void
green(::color::model<::color::category::lab<tag_name,reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::lab<tag_name,reference_number>>::akin_type>::model_type component_parameter)31473 green
31474 (
31475 	::color::model< ::color::category::lab< tag_name, reference_number > > & color_parameter
31476 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::lab< tag_name, reference_number > >::akin_type >::model_type component_parameter
31477 ) {
31478 	typedef ::color::category::lab< tag_name, reference_number > category_type;
31479 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
31480 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
31481 	::color::model< akin_type > rgb(color_parameter);
31482 	rgb.template set< green_p > (component_parameter);
31483 	color_parameter = rgb;
31484 }
31485 
31486 }
31487 }
31488 
31489 namespace color {
31490 namespace set {
31491 
31492 template< typename tag_name, ::color::constant::lab::reference_enum reference_number >
31493 inline
31494 void
blue(::color::model<::color::category::lab<tag_name,reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::lab<tag_name,reference_number>>::akin_type>::model_type component_parameter)31495 blue
31496 (
31497 	::color::model< ::color::category::lab< tag_name, reference_number > > & color_parameter
31498 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::lab< tag_name, reference_number > >::akin_type >::model_type component_parameter
31499 ) {
31500 	typedef ::color::category::lab< tag_name, reference_number > category_type;
31501 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
31502 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
31503 	::color::model< akin_type > rgb(color_parameter);
31504 	rgb.template set<blue_p > (component_parameter);
31505 	color_parameter = rgb;
31506 }
31507 
31508 }
31509 }
31510 
31511 namespace color {
31512 namespace _internal {
31513 
31514 template
31515 <
31516 	typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
31517 	,typename gray_tag_name
31518 	>
31519 struct convert
31520 	<
31521 	::color::category::lab< lab_tag_name, reference_number >
31522 	,::color::category::gray< gray_tag_name >
31523 	> {
31524 public:
31525 	typedef ::color::category::lab< lab_tag_name, reference_number > category_left_type;
31526 	typedef ::color::category::gray< gray_tag_name > category_right_type;
31527 
31528 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
31529 
31530 	typedef ::color::category::lab< scalar_type, reference_number > labSCALAR_category_type;
31531 
31532 	typedef ::color::trait::bound<category_left_type> bound_left_trait_type;
31533 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
31534 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
31535 
31536 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
31537 	typedef ::color::_internal::reformat< category_left_type, labSCALAR_category_type > reformatLAB_type;
31538 
31539 	typedef typename container_left_trait_type::input_type container_left_input_type;
31540 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
31541 
31542 	enum {
31543 		lightness_p = ::color::place::_internal::lightness<category_left_type>::position_enum
31544 	};
31545 
31546 	enum {
31547 		gray_p = ::color::place::_internal::gray<category_right_type>::position_enum
31548 	};
31549 
processcolor::_internal::convert31550 	static void process
31551 	(
31552 		container_left_input_type left
31553 		,container_right_const_input_type right
31554 	) {
31555 		container_left_trait_type::template set<0>(left, reformat_type::template process< 0, 0 >(container_right_trait_type::template get<0>(right)));
31556 		container_left_trait_type::template set<1>(left, reformatLAB_type::template process< 1, 1 >(0));
31557 		container_left_trait_type::template set<2>(left, reformatLAB_type::template process< 2, 2 >(0));
31558 	}
31559 };
31560 
31561 }
31562 }
31563 
31564 namespace color {
31565 namespace _internal {
31566 
31567 template
31568 <
31569 	typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
31570 	,typename cmy_tag_name
31571 	>
31572 struct convert
31573 	<
31574 	::color::category::lab< lab_tag_name, reference_number >
31575 	,::color::category::cmy< cmy_tag_name >
31576 	> {
31577 public:
31578 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_left_type;
31579 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_right_type;
31580 
31581 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
31582 
31583 	typedef ::color::model< cmy_category_type > cmy_model_type;
31584 	typedef ::color::model< lab_category_type > lab_model_type;
31585 
31586 	typedef ::color::rgb< scalar_type > rgb_model_type;
31587 	typedef ::color::xyz< scalar_type > xyz_model_type;
31588 
31589 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
31590 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
31591 
31592 	typedef typename container_left_trait_type::input_type container_left_input_type;
31593 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
31594 
processcolor::_internal::convert31595 	static void process
31596 	(
31597 		container_left_input_type left
31598 		,container_right_const_input_type right
31599 	) {
31600 		left = lab_model_type(xyz_model_type(rgb_model_type(cmy_model_type(right)))).container();
31601 	}
31602 };
31603 
31604 }
31605 }
31606 
31607 namespace color {
31608 namespace _internal {
31609 
31610 template
31611 <
31612 	typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
31613 	,typename cmyk_tag_name
31614 	>
31615 struct convert
31616 	<
31617 	::color::category::lab< lab_tag_name, reference_number >
31618 	,::color::category::cmyk< cmyk_tag_name >
31619 	> {
31620 public:
31621 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_left_type;
31622 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
31623 
31624 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
31625 
31626 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
31627 	typedef ::color::model< lab_category_type > lab_model_type;
31628 
31629 	typedef ::color::rgb< scalar_type > rgb_model_type;
31630 	typedef ::color::xyz< scalar_type > xyz_model_type;
31631 
31632 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
31633 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
31634 
31635 	typedef typename container_left_trait_type::input_type container_left_input_type;
31636 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
31637 
processcolor::_internal::convert31638 	static void process
31639 	(
31640 		container_left_input_type left
31641 		,container_right_const_input_type right
31642 	) {
31643 		left = lab_model_type(xyz_model_type(rgb_model_type(cmyk_model_type(right)))).container();
31644 	}
31645 };
31646 
31647 }
31648 }
31649 
31650 namespace color {
31651 namespace _internal {
31652 
31653 template
31654 <
31655 	typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
31656 	,typename hsl_tag_name
31657 	>
31658 struct convert
31659 	<
31660 	::color::category::lab< lab_tag_name, reference_number >
31661 	,::color::category::hsl< hsl_tag_name >
31662 	> {
31663 public:
31664 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_left_type;
31665 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
31666 
31667 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
31668 
31669 	typedef ::color::model< hsl_category_type > hsl_model_type;
31670 	typedef ::color::model< lab_category_type > lab_model_type;
31671 
31672 	typedef ::color::rgb< scalar_type > rgb_model_type;
31673 	typedef ::color::xyz< scalar_type > xyz_model_type;
31674 
31675 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
31676 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
31677 
31678 	typedef typename container_left_trait_type::input_type container_left_input_type;
31679 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
31680 
processcolor::_internal::convert31681 	static void process
31682 	(
31683 		container_left_input_type left
31684 		,container_right_const_input_type right
31685 	) {
31686 		left = lab_model_type(xyz_model_type(rgb_model_type(hsl_model_type(right)))).container();
31687 	}
31688 };
31689 
31690 }
31691 }
31692 
31693 namespace color {
31694 namespace _internal {
31695 
31696 template
31697 <
31698 	typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
31699 	,typename hsv_tag_name
31700 	>
31701 struct convert
31702 	<
31703 	::color::category::lab< lab_tag_name, reference_number >
31704 	,::color::category::hsv< hsv_tag_name >
31705 	> {
31706 public:
31707 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_left_type;
31708 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
31709 
31710 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
31711 
31712 	typedef ::color::model< hsv_category_type > hsv_model_type;
31713 	typedef ::color::model< lab_category_type > lab_model_type;
31714 
31715 	typedef ::color::rgb< scalar_type > rgb_model_type;
31716 	typedef ::color::xyz< scalar_type > xyz_model_type;
31717 
31718 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
31719 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
31720 
31721 	typedef typename container_left_trait_type::input_type container_left_input_type;
31722 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
31723 
processcolor::_internal::convert31724 	static void process
31725 	(
31726 		container_left_input_type left
31727 		,container_right_const_input_type right
31728 	) {
31729 		left = lab_model_type(xyz_model_type(rgb_model_type(hsv_model_type(right)))).container();
31730 	}
31731 };
31732 
31733 }
31734 }
31735 
31736 namespace color {
31737 namespace _internal {
31738 
31739 template
31740 <
31741 	typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
31742 	,typename hsi_tag_name
31743 	>
31744 struct convert
31745 	<
31746 	::color::category::lab< lab_tag_name, reference_number >
31747 	,::color::category::hsi< hsi_tag_name >
31748 	> {
31749 public:
31750 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_left_type;
31751 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
31752 
31753 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
31754 
31755 	typedef ::color::model< hsi_category_type > hsi_model_type;
31756 	typedef ::color::model< lab_category_type > lab_model_type;
31757 
31758 	typedef ::color::rgb< scalar_type > rgb_model_type;
31759 	typedef ::color::xyz< scalar_type > xyz_model_type;
31760 
31761 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
31762 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
31763 
31764 	typedef typename container_left_trait_type::input_type container_left_input_type;
31765 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
31766 
processcolor::_internal::convert31767 	static void process
31768 	(
31769 		container_left_input_type left
31770 		,container_right_const_input_type right
31771 	) {
31772 		left = lab_model_type(xyz_model_type(rgb_model_type(hsi_model_type(right)))).container();
31773 	}
31774 };
31775 
31776 }
31777 }
31778 
31779 namespace color {
31780 namespace _internal {
31781 
31782 template
31783 <
31784 	typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
31785 	,typename hwb_tag_name
31786 	>
31787 struct convert
31788 	<
31789 	::color::category::lab< lab_tag_name, reference_number >
31790 	,::color::category::hwb< hwb_tag_name >
31791 	> {
31792 public:
31793 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_left_type;
31794 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
31795 
31796 	typedef typename ::color::trait::scalar< lab_category_type >::instance_type scalar_type;
31797 
31798 	typedef ::color::model< lab_category_type > lab_model_type;
31799 	typedef ::color::model< hwb_category_type > hwb_model_type;
31800 
31801 	typedef ::color::xyz< scalar_type > xyz_model_type;
31802 	typedef ::color::rgb< scalar_type > rgb_model_type;
31803 	typedef ::color::hsv< scalar_type > hsv_model_type;
31804 
31805 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
31806 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
31807 
31808 	typedef typename container_left_trait_type::input_type container_left_input_type;
31809 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
31810 
processcolor::_internal::convert31811 	static void process
31812 	(
31813 		container_left_input_type left
31814 		,container_right_const_input_type right
31815 	) {
31816 		left = lab_model_type(xyz_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right))))).container();
31817 	}
31818 };
31819 
31820 }
31821 }
31822 
31823 namespace color {
31824 namespace _internal {
31825 
31826 template
31827 <
31828 	typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
31829 	,typename rgb_tag_name
31830 	>
31831 struct convert
31832 	<
31833 	::color::category::lab< lab_tag_name, reference_number >
31834 	,::color::category::rgb< rgb_tag_name >
31835 	> {
31836 public:
31837 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_left_type;
31838 	typedef ::color::category::rgb< rgb_tag_name > rgb_category_type, category_right_type;
31839 
31840 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
31841 
31842 	typedef ::color::model< lab_category_type > lab_model_type;
31843 	typedef ::color::model< rgb_category_type > rgb_model_type;
31844 
31845 	typedef ::color::xyz< scalar_type > xyz_model_type;
31846 
31847 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
31848 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
31849 
31850 	typedef typename container_left_trait_type::input_type container_left_input_type;
31851 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
31852 
processcolor::_internal::convert31853 	static void process
31854 	(
31855 		container_left_input_type left
31856 		,container_right_const_input_type right
31857 	) {
31858 		left = lab_model_type(xyz_model_type(rgb_model_type(right))).container();
31859 	}
31860 };
31861 
31862 }
31863 }
31864 
31865 namespace color {
31866 namespace _internal {
31867 
31868 template
31869 <
31870 	typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
31871 	,typename yiq_tag_name
31872 	>
31873 struct convert
31874 	<
31875 	::color::category::lab< lab_tag_name, reference_number >
31876 	,::color::category::yiq< yiq_tag_name >
31877 	> {
31878 public:
31879 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_left_type;
31880 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
31881 
31882 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
31883 
31884 	typedef ::color::model< yiq_category_type > yiq_model_type;
31885 	typedef ::color::model< lab_category_type > lab_model_type;
31886 
31887 	typedef ::color::rgb< scalar_type > rgb_model_type;
31888 	typedef ::color::xyz< scalar_type > xyz_model_type;
31889 
31890 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
31891 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
31892 
31893 	typedef typename container_left_trait_type::input_type container_left_input_type;
31894 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
31895 
processcolor::_internal::convert31896 	static void process
31897 	(
31898 		container_left_input_type left
31899 		,container_right_const_input_type right
31900 	) {
31901 		left = lab_model_type(xyz_model_type(rgb_model_type(yiq_model_type(right)))).container();
31902 	}
31903 };
31904 
31905 }
31906 }
31907 
31908 namespace color {
31909 namespace _internal {
31910 
31911 template
31912 <
31913 	typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
31914 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
31915 	>
31916 struct convert
31917 	<
31918 	::color::category::lab< lab_tag_name, lab_reference_number >
31919 	,::color::category::yuv< yuv_tag_name, yuv_reference_number >
31920 	> {
31921 public:
31922 	typedef ::color::category::lab< lab_tag_name, lab_reference_number > lab_category_type, category_left_type;
31923 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_right_type;
31924 
31925 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
31926 
31927 	typedef ::color::model< yuv_category_type > yuv_model_type;
31928 	typedef ::color::model< lab_category_type > lab_model_type;
31929 
31930 	typedef ::color::rgb< scalar_type > rgb_model_type;
31931 	typedef ::color::xyz< scalar_type > xyz_model_type;
31932 
31933 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
31934 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
31935 
31936 	typedef typename container_left_trait_type::input_type container_left_input_type;
31937 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
31938 
processcolor::_internal::convert31939 	static void process
31940 	(
31941 		container_left_input_type left
31942 		,container_right_const_input_type right
31943 	) {
31944 		left = lab_model_type(xyz_model_type(rgb_model_type(yuv_model_type(right)))).container();
31945 	}
31946 };
31947 
31948 }
31949 }
31950 
31951 namespace color {
31952 namespace _internal {
31953 
31954 template
31955 <
31956 	typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
31957 	,typename YCgCo_tag_name
31958 	>
31959 struct convert
31960 	<
31961 	::color::category::lab< lab_tag_name, reference_number >
31962 	,::color::category::YCgCo< YCgCo_tag_name >
31963 	> {
31964 public:
31965 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_left_type;
31966 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
31967 
31968 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
31969 
31970 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
31971 	typedef ::color::model< lab_category_type > lab_model_type;
31972 
31973 	typedef ::color::rgb< scalar_type > rgb_model_type;
31974 	typedef ::color::xyz< scalar_type > xyz_model_type;
31975 
31976 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
31977 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
31978 
31979 	typedef typename container_left_trait_type::input_type container_left_input_type;
31980 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
31981 
processcolor::_internal::convert31982 	static void process
31983 	(
31984 		container_left_input_type left
31985 		,container_right_const_input_type right
31986 	) {
31987 		left = lab_model_type(xyz_model_type(rgb_model_type(YCgCo_model_type(right)))).container();
31988 	}
31989 };
31990 
31991 }
31992 }
31993 
31994 namespace color {
31995 namespace _internal {
31996 
31997 template
31998 <
31999 	typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
32000 	,typename YDbDr_tag_name
32001 	>
32002 struct convert
32003 	<
32004 	::color::category::lab< lab_tag_name, reference_number >
32005 	,::color::category::YDbDr< YDbDr_tag_name >
32006 	> {
32007 public:
32008 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_left_type;
32009 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
32010 
32011 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
32012 
32013 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
32014 	typedef ::color::model< lab_category_type > lab_model_type;
32015 
32016 	typedef ::color::rgb< scalar_type > rgb_model_type;
32017 	typedef ::color::xyz< scalar_type > xyz_model_type;
32018 
32019 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
32020 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
32021 
32022 	typedef typename container_left_trait_type::input_type container_left_input_type;
32023 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
32024 
processcolor::_internal::convert32025 	static void process
32026 	(
32027 		container_left_input_type left
32028 		,container_right_const_input_type right
32029 	) {
32030 		left = lab_model_type(xyz_model_type(rgb_model_type(YDbDr_model_type(right)))).container();
32031 	}
32032 };
32033 
32034 }
32035 }
32036 
32037 namespace color {
32038 namespace _internal {
32039 
32040 template
32041 <
32042 	typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
32043 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
32044 	>
32045 struct convert
32046 	<
32047 	::color::category::lab< lab_tag_name, lab_reference_number >
32048 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
32049 	> {
32050 public:
32051 	typedef ::color::category::lab< lab_tag_name, lab_reference_number > lab_category_type, category_left_type;
32052 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_right_type;
32053 
32054 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
32055 
32056 	typedef ::color::model< lab_category_type > lab_model_type;
32057 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
32058 
32059 	typedef ::color::rgb< scalar_type > rgb_model_type;
32060 	typedef ::color::xyz< scalar_type > xyz_model_type;
32061 
32062 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
32063 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
32064 
32065 	typedef typename container_left_trait_type::input_type container_left_input_type;
32066 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
32067 
processcolor::_internal::convert32068 	static void process
32069 	(
32070 		container_left_input_type left
32071 		,container_right_const_input_type right
32072 	) {
32073 		left = lab_model_type(xyz_model_type(rgb_model_type(YPbPr_model_type(right)))).container();
32074 	}
32075 };
32076 
32077 }
32078 }
32079 
32080 namespace color {
32081 namespace _internal {
32082 
32083 template
32084 <
32085 	typename lab_tag_name
32086 	,typename xyz_tag_name
32087 	>
32088 struct convert
32089 	<
32090 	::color::category::lab< lab_tag_name, ::color::constant::lab::CIE_entity >
32091 	,::color::category::xyz< xyz_tag_name >
32092 	> {
32093 public:
32094 	typedef ::color::category::lab< lab_tag_name, ::color::constant::lab::CIE_entity > lab_category_type, category_left_type;
32095 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
32096 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
32097 	typedef ::color::category::lab< scalar_type, ::color::constant::lab::CIE_entity > labSCALAR_category_type;
32098 	typedef ::color::category::xyz< scalar_type > xyzSCALAR_category_type;
32099 
32100 	typedef ::color::model< lab_category_type > lab_model_type;
32101 	typedef ::color::model< xyz_category_type > xyz_model_type;
32102 
32103 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
32104 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
32105 
32106 	typedef typename container_left_trait_type::input_type container_left_input_type;
32107 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
32108 
32109 	typedef ::color::_internal::reformat< lab_category_type, labSCALAR_category_type > reformatLAB_type;
32110 	typedef ::color::_internal::reformat< xyzSCALAR_category_type, xyz_category_type > reformatXYZ_type;
32111 
32112 	typedef ::color::constant::xyz::illuminant::point< scalar_type, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > white_point_type;
32113 
32114 	enum {
32115 		lightness_p = ::color::place::_internal::lightness<category_left_type>::position_enum
32116 	};
32117 
fcolor::_internal::convert32118 	static scalar_type f(scalar_type const& t) {
32119 		static const scalar_type epsilon = scalar_type(216)/scalar_type(24389);
32120 		static const scalar_type k = scalar_type(24389)/scalar_type(27);
32121 		if(t > epsilon) {
32122 			return cbrt(t);
32123 		}
32124 		return (k*t + scalar_type(16))/scalar_type(116);
32125 	}
32126 
processcolor::_internal::convert32127 	static void process
32128 	(
32129 		container_left_input_type left
32130 		,container_right_const_input_type right
32131 	) {
32132 		scalar_type x = reformatXYZ_type::template process<0,0>(container_right_trait_type::template get<0>(right));
32133 		scalar_type y = reformatXYZ_type::template process<1,1>(container_right_trait_type::template get<1>(right));
32134 		scalar_type z = reformatXYZ_type::template process<2,2>(container_right_trait_type::template get<2>(right));
32135 		x /= scalar_type(100) * white_point_type::X();
32136 		y /= scalar_type(100) * white_point_type::Y();
32137 		z /= scalar_type(100) * white_point_type::Z();
32138 		scalar_type fx = f(x);
32139 		scalar_type fy = f(y);
32140 		scalar_type fz = f(z);
32141 		scalar_type l = scalar_type(116) * fy - scalar_type(16);
32142 		scalar_type a = scalar_type(500) *(fx - fy);
32143 		scalar_type b = scalar_type(200) *(fy - fz);
32144 		container_left_trait_type::template set<0>(left, reformatLAB_type::template process< 0, 0>(l));
32145 		container_left_trait_type::template set<1>(left, reformatLAB_type::template process< 1, 1>(a));
32146 		container_left_trait_type::template set<2>(left, reformatLAB_type::template process< 2, 2>(b));
32147 	}
32148 
32149 };
32150 
32151 template
32152 <
32153 	typename lab_tag_name
32154 	,typename xyz_tag_name
32155 	>
32156 struct convert
32157 	<
32158 	::color::category::lab< lab_tag_name, ::color::constant::lab::Hunter_entity >
32159 	,::color::category::xyz< xyz_tag_name >
32160 	> {
32161 public:
32162 	typedef ::color::category::lab< lab_tag_name, ::color::constant::lab::Hunter_entity > lab_category_type, category_left_type;
32163 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
32164 
32165 	typedef typename ::color::trait::scalar<category_left_type> scalar_trait_type;
32166 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
32167 
32168 	typedef ::color::category::lab< scalar_type, ::color::constant::lab::Hunter_entity > labSCALAR_category_type;
32169 	typedef ::color::category::xyz< scalar_type > xyzSCALAR_category_type;
32170 
32171 	typedef ::color::model< lab_category_type > lab_model_type;
32172 	typedef ::color::model< xyz_category_type > xyz_model_type;
32173 
32174 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
32175 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
32176 
32177 	typedef typename container_left_trait_type::input_type container_left_input_type;
32178 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
32179 
32180 	typedef ::color::_internal::reformat< lab_category_type, labSCALAR_category_type > reformatLAB_type;
32181 	typedef ::color::_internal::reformat< xyzSCALAR_category_type, xyz_category_type > reformatXYZ_type;
32182 
32183 	typedef ::color::constant::xyz::illuminant::point< scalar_type, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > white_point_type;
32184 
32185 	enum {
32186 		lightness_p = ::color::place::_internal::lightness<category_left_type>::position_enum
32187 	};
32188 
processcolor::_internal::convert32189 	static void process
32190 	(
32191 		container_left_input_type left
32192 		,container_right_const_input_type right
32193 	) {
32194 		static scalar_type X = scalar_type(100) * white_point_type::X();
32195 		static scalar_type Y = scalar_type(100) * white_point_type::Y();
32196 		static scalar_type Z = scalar_type(100) * white_point_type::Z();
32197 		static scalar_type Ka = scalar_type(175.0/198.04) * (X + Y);
32198 		static scalar_type Kb = scalar_type(70.0/218.11) * (Y + Z);
32199 		scalar_type x = reformatXYZ_type::template process<0,0>(container_right_trait_type::template get<0>(right));
32200 		scalar_type y = reformatXYZ_type::template process<1,1>(container_right_trait_type::template get<1>(right));
32201 		scalar_type z = reformatXYZ_type::template process<2,2>(container_right_trait_type::template get<2>(right));
32202 		scalar_type l = sqrt(y / Y);
32203 		scalar_type a = scalar_type(0);
32204 		scalar_type b = scalar_type(0);
32205 		if(false == scalar_trait_type::is_small(l)) {
32206 			a = Ka * (x/X - y / Y)/ l;
32207 			b = Kb * (y/Y - z / Z)/ l;
32208 			l *= scalar_type(100);
32209 		}
32210 		container_left_trait_type::template set<0>(left, reformatLAB_type::template process< 0, 0>(l));
32211 		container_left_trait_type::template set<1>(left, reformatLAB_type::template process< 1, 1>(a));
32212 		container_left_trait_type::template set<2>(left, reformatLAB_type::template process< 2, 2>(b));
32213 	}
32214 
32215 };
32216 
32217 }
32218 }
32219 
32220 namespace color {
32221 namespace _internal {
32222 
32223 template
32224 <
32225 	typename tag_left_name, ::color::constant::lab::reference_enum left_reference_number
32226 	,typename tag_right_name, ::color::constant::lab::reference_enum right_reference_number
32227 	>
32228 struct convert
32229 	<
32230 	::color::category::lab< tag_left_name, left_reference_number >
32231 	,::color::category::lab< tag_right_name, right_reference_number >
32232 	> {
32233 public:
32234 	typedef ::color::category::lab< tag_left_name, left_reference_number > category_left_type;
32235 	typedef ::color::category::lab< tag_right_name, right_reference_number > category_right_type;
32236 
32237 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
32238 
32239 	typedef ::color::model< category_left_type > left_model_type;
32240 	typedef ::color::model< category_right_type > right_model_type;
32241 
32242 	typedef ::color::xyz< scalar_type > xyz_model_type;
32243 
32244 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
32245 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
32246 
32247 	typedef typename container_left_trait_type::input_type container_left_input_type;
32248 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
32249 
processcolor::_internal::convert32250 	static void process
32251 	(
32252 		container_left_input_type left
32253 		,container_right_const_input_type right
32254 	) {
32255 		left = left_model_type(xyz_model_type(right_model_type(right))).container();
32256 	}
32257 };
32258 
32259 template
32260 <
32261 	::color::constant::lab::reference_enum reference_number
32262 	,typename tag_left_name
32263 	,typename tag_right_name
32264 	>
32265 struct convert
32266 	<
32267 	::color::category::lab< tag_left_name, reference_number >
32268 	,::color::category::lab< tag_right_name, reference_number>
32269 	> {
32270 public:
32271 	typedef ::color::category::lab< tag_left_name, reference_number > category_left_type;
32272 	typedef ::color::category::lab< tag_right_name, reference_number > category_right_type;
32273 
32274 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
32275 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
32276 
32277 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
32278 
32279 	typedef typename container_left_trait_type::input_type container_left_input_type;
32280 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
32281 
processcolor::_internal::convert32282 	static void process
32283 	(
32284 		container_left_input_type left
32285 		,container_right_const_input_type right
32286 	) {
32287 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
32288 		container_left_trait_type::template set<1>(left, reformat_type::template process<1,1>(container_right_trait_type::template get<1>(right)));
32289 		container_left_trait_type::template set<2>(left, reformat_type::template process<2,2>(container_right_trait_type::template get<2>(right)));
32290 	}
32291 };
32292 
32293 }
32294 }
32295 
32296 namespace color {
32297 namespace akin {
32298 
32299 template< >struct xyy< ::color::category::gray_uint8 > {
32300 	typedef ::color::category::xyy_uint8 akin_type;
32301 };
32302 template< >struct xyy< ::color::category::gray_uint16 > {
32303 	typedef ::color::category::xyy_uint16 akin_type;
32304 };
32305 template< >struct xyy< ::color::category::gray_uint32 > {
32306 	typedef ::color::category::xyy_uint32 akin_type;
32307 };
32308 template< >struct xyy< ::color::category::gray_uint64 > {
32309 	typedef ::color::category::xyy_uint64 akin_type;
32310 };
32311 template< >struct xyy< ::color::category::gray_float > {
32312 	typedef ::color::category::xyy_float akin_type;
32313 };
32314 template< >struct xyy< ::color::category::gray_double > {
32315 	typedef ::color::category::xyy_double akin_type;
32316 };
32317 template< >struct xyy< ::color::category::gray_ldouble > {
32318 	typedef ::color::category::xyy_ldouble akin_type;
32319 };
32320 
32321 }
32322 }
32323 
32324 namespace color {
32325 namespace akin {
32326 
32327 template< >struct xyy< ::color::category::cmy_uint8 > {
32328 	typedef ::color::category::xyy_uint8 akin_type;
32329 };
32330 template< >struct xyy< ::color::category::cmy_uint16 > {
32331 	typedef ::color::category::xyy_uint16 akin_type;
32332 };
32333 template< >struct xyy< ::color::category::cmy_uint32 > {
32334 	typedef ::color::category::xyy_uint32 akin_type;
32335 };
32336 template< >struct xyy< ::color::category::cmy_uint64 > {
32337 	typedef ::color::category::xyy_uint64 akin_type;
32338 };
32339 template< >struct xyy< ::color::category::cmy_float > {
32340 	typedef ::color::category::xyy_float akin_type;
32341 };
32342 template< >struct xyy< ::color::category::cmy_double > {
32343 	typedef ::color::category::xyy_double akin_type;
32344 };
32345 template< >struct xyy< ::color::category::cmy_ldouble > {
32346 	typedef ::color::category::xyy_ldouble akin_type;
32347 };
32348 
32349 }
32350 }
32351 
32352 namespace color {
32353 namespace akin {
32354 
32355 template< >struct xyy< ::color::category::cmyk_uint8 > {
32356 	typedef ::color::category::xyy_uint8 akin_type;
32357 };
32358 template< >struct xyy< ::color::category::cmyk_uint16 > {
32359 	typedef ::color::category::xyy_uint16 akin_type;
32360 };
32361 template< >struct xyy< ::color::category::cmyk_uint32 > {
32362 	typedef ::color::category::xyy_uint32 akin_type;
32363 };
32364 template< >struct xyy< ::color::category::cmyk_uint64 > {
32365 	typedef ::color::category::xyy_uint64 akin_type;
32366 };
32367 template< >struct xyy< ::color::category::cmyk_float > {
32368 	typedef ::color::category::xyy_float akin_type;
32369 };
32370 template< >struct xyy< ::color::category::cmyk_double > {
32371 	typedef ::color::category::xyy_double akin_type;
32372 };
32373 template< >struct xyy< ::color::category::cmyk_ldouble > {
32374 	typedef ::color::category::xyy_ldouble akin_type;
32375 };
32376 
32377 }
32378 }
32379 
32380 namespace color {
32381 namespace akin {
32382 
32383 template< >struct xyy< ::color::category::hsl_uint8 > {
32384 	typedef ::color::category::xyy_uint8 akin_type;
32385 };
32386 template< >struct xyy< ::color::category::hsl_uint16 > {
32387 	typedef ::color::category::xyy_uint16 akin_type;
32388 };
32389 template< >struct xyy< ::color::category::hsl_uint32 > {
32390 	typedef ::color::category::xyy_uint32 akin_type;
32391 };
32392 template< >struct xyy< ::color::category::hsl_uint64 > {
32393 	typedef ::color::category::xyy_uint64 akin_type;
32394 };
32395 template< >struct xyy< ::color::category::hsl_float > {
32396 	typedef ::color::category::xyy_float akin_type;
32397 };
32398 template< >struct xyy< ::color::category::hsl_double > {
32399 	typedef ::color::category::xyy_double akin_type;
32400 };
32401 template< >struct xyy< ::color::category::hsl_ldouble > {
32402 	typedef ::color::category::xyy_ldouble akin_type;
32403 };
32404 
32405 }
32406 }
32407 
32408 namespace color {
32409 namespace akin {
32410 
32411 template< >struct xyy< ::color::category::hsv_uint8 > {
32412 	typedef ::color::category::xyy_uint8 akin_type;
32413 };
32414 template< >struct xyy< ::color::category::hsv_uint16 > {
32415 	typedef ::color::category::xyy_uint16 akin_type;
32416 };
32417 template< >struct xyy< ::color::category::hsv_uint32 > {
32418 	typedef ::color::category::xyy_uint32 akin_type;
32419 };
32420 template< >struct xyy< ::color::category::hsv_uint64 > {
32421 	typedef ::color::category::xyy_uint64 akin_type;
32422 };
32423 template< >struct xyy< ::color::category::hsv_float > {
32424 	typedef ::color::category::xyy_float akin_type;
32425 };
32426 template< >struct xyy< ::color::category::hsv_double > {
32427 	typedef ::color::category::xyy_double akin_type;
32428 };
32429 template< >struct xyy< ::color::category::hsv_ldouble > {
32430 	typedef ::color::category::xyy_ldouble akin_type;
32431 };
32432 
32433 }
32434 }
32435 
32436 namespace color {
32437 namespace akin {
32438 
32439 template< >struct xyy< ::color::category::hsi_uint8 > {
32440 	typedef ::color::category::xyy_uint8 akin_type;
32441 };
32442 template< >struct xyy< ::color::category::hsi_uint16 > {
32443 	typedef ::color::category::xyy_uint16 akin_type;
32444 };
32445 template< >struct xyy< ::color::category::hsi_uint32 > {
32446 	typedef ::color::category::xyy_uint32 akin_type;
32447 };
32448 template< >struct xyy< ::color::category::hsi_uint64 > {
32449 	typedef ::color::category::xyy_uint64 akin_type;
32450 };
32451 template< >struct xyy< ::color::category::hsi_float > {
32452 	typedef ::color::category::xyy_float akin_type;
32453 };
32454 template< >struct xyy< ::color::category::hsi_double > {
32455 	typedef ::color::category::xyy_double akin_type;
32456 };
32457 template< >struct xyy< ::color::category::hsi_ldouble > {
32458 	typedef ::color::category::xyy_ldouble akin_type;
32459 };
32460 
32461 }
32462 }
32463 
32464 namespace color {
32465 namespace akin {
32466 
32467 template
32468 <
32469 	typename tag_name
32470 
32471 	>
32472 struct xyy< ::color::category::hwb< tag_name > > {
32473 public:
32474 	typedef ::color::category::xyy< tag_name > akin_type;
32475 };
32476 
32477 }
32478 }
32479 
32480 namespace color {
32481 namespace akin {
32482 
32483 template< >struct xyy< ::color::category::rgb_uint8 > {
32484 	typedef ::color::category::xyy_uint8 akin_type;
32485 };
32486 template< >struct xyy< ::color::category::rgb_uint16 > {
32487 	typedef ::color::category::xyy_uint16 akin_type;
32488 };
32489 template< >struct xyy< ::color::category::rgb_uint32 > {
32490 	typedef ::color::category::xyy_uint32 akin_type;
32491 };
32492 template< >struct xyy< ::color::category::rgb_uint64 > {
32493 	typedef ::color::category::xyy_uint64 akin_type;
32494 };
32495 template< >struct xyy< ::color::category::rgb_float > {
32496 	typedef ::color::category::xyy_float akin_type;
32497 };
32498 template< >struct xyy< ::color::category::rgb_double > {
32499 	typedef ::color::category::xyy_double akin_type;
32500 };
32501 template< >struct xyy< ::color::category::rgb_ldouble > {
32502 	typedef ::color::category::xyy_ldouble akin_type;
32503 };
32504 
32505 }
32506 }
32507 
32508 namespace color {
32509 namespace akin {
32510 
32511 template< >struct xyy< ::color::category::yiq_uint8 > {
32512 	typedef ::color::category::xyy_uint8 akin_type;
32513 };
32514 template< >struct xyy< ::color::category::yiq_uint16 > {
32515 	typedef ::color::category::xyy_uint16 akin_type;
32516 };
32517 template< >struct xyy< ::color::category::yiq_uint32 > {
32518 	typedef ::color::category::xyy_uint32 akin_type;
32519 };
32520 template< >struct xyy< ::color::category::yiq_uint64 > {
32521 	typedef ::color::category::xyy_uint64 akin_type;
32522 };
32523 template< >struct xyy< ::color::category::yiq_float > {
32524 	typedef ::color::category::xyy_float akin_type;
32525 };
32526 template< >struct xyy< ::color::category::yiq_double > {
32527 	typedef ::color::category::xyy_double akin_type;
32528 };
32529 template< >struct xyy< ::color::category::yiq_ldouble > {
32530 	typedef ::color::category::xyy_ldouble akin_type;
32531 };
32532 
32533 }
32534 }
32535 
32536 namespace color {
32537 namespace akin {
32538 
32539 template< ::color::constant::yuv::reference_enum reference_number >struct xyy< ::color::category::yuv_uint8 <reference_number> > {
32540 	typedef ::color::category::xyy_uint8 akin_type;
32541 };
32542 template< ::color::constant::yuv::reference_enum reference_number >struct xyy< ::color::category::yuv_uint16 <reference_number> > {
32543 	typedef ::color::category::xyy_uint16 akin_type;
32544 };
32545 template< ::color::constant::yuv::reference_enum reference_number >struct xyy< ::color::category::yuv_uint32 <reference_number> > {
32546 	typedef ::color::category::xyy_uint32 akin_type;
32547 };
32548 template< ::color::constant::yuv::reference_enum reference_number >struct xyy< ::color::category::yuv_uint64 <reference_number> > {
32549 	typedef ::color::category::xyy_uint64 akin_type;
32550 };
32551 template< ::color::constant::yuv::reference_enum reference_number >struct xyy< ::color::category::yuv_float <reference_number> > {
32552 	typedef ::color::category::xyy_float akin_type;
32553 };
32554 template< ::color::constant::yuv::reference_enum reference_number >struct xyy< ::color::category::yuv_double <reference_number> > {
32555 	typedef ::color::category::xyy_double akin_type;
32556 };
32557 template< ::color::constant::yuv::reference_enum reference_number >struct xyy< ::color::category::yuv_ldouble<reference_number> > {
32558 	typedef ::color::category::xyy_ldouble akin_type;
32559 };
32560 
32561 }
32562 }
32563 
32564 namespace color {
32565 namespace akin {
32566 
32567 template< >struct xyy< ::color::category::YCgCo_uint8 > {
32568 	typedef ::color::category::xyy_uint8 akin_type;
32569 };
32570 template< >struct xyy< ::color::category::YCgCo_uint16 > {
32571 	typedef ::color::category::xyy_uint16 akin_type;
32572 };
32573 template< >struct xyy< ::color::category::YCgCo_uint32 > {
32574 	typedef ::color::category::xyy_uint32 akin_type;
32575 };
32576 template< >struct xyy< ::color::category::YCgCo_uint64 > {
32577 	typedef ::color::category::xyy_uint64 akin_type;
32578 };
32579 template< >struct xyy< ::color::category::YCgCo_float > {
32580 	typedef ::color::category::xyy_float akin_type;
32581 };
32582 template< >struct xyy< ::color::category::YCgCo_double > {
32583 	typedef ::color::category::xyy_double akin_type;
32584 };
32585 template< >struct xyy< ::color::category::YCgCo_ldouble > {
32586 	typedef ::color::category::xyy_ldouble akin_type;
32587 };
32588 
32589 }
32590 }
32591 
32592 namespace color {
32593 namespace akin {
32594 
32595 template< >struct xyy< ::color::category::YDbDr_uint8 > {
32596 	typedef ::color::category::xyy_uint8 akin_type;
32597 };
32598 template< >struct xyy< ::color::category::YDbDr_uint16 > {
32599 	typedef ::color::category::xyy_uint16 akin_type;
32600 };
32601 template< >struct xyy< ::color::category::YDbDr_uint32 > {
32602 	typedef ::color::category::xyy_uint32 akin_type;
32603 };
32604 template< >struct xyy< ::color::category::YDbDr_uint64 > {
32605 	typedef ::color::category::xyy_uint64 akin_type;
32606 };
32607 template< >struct xyy< ::color::category::YDbDr_float > {
32608 	typedef ::color::category::xyy_float akin_type;
32609 };
32610 template< >struct xyy< ::color::category::YDbDr_double > {
32611 	typedef ::color::category::xyy_double akin_type;
32612 };
32613 template< >struct xyy< ::color::category::YDbDr_ldouble > {
32614 	typedef ::color::category::xyy_ldouble akin_type;
32615 };
32616 
32617 }
32618 }
32619 
32620 namespace color {
32621 namespace akin {
32622 
32623 template< ::color::constant::YPbPr::reference_enum reference_number >struct xyy< ::color::category::YPbPr_uint8 <reference_number> > {
32624 	typedef ::color::category::xyy_uint8 akin_type;
32625 };
32626 template< ::color::constant::YPbPr::reference_enum reference_number >struct xyy< ::color::category::YPbPr_uint16 <reference_number> > {
32627 	typedef ::color::category::xyy_uint16 akin_type;
32628 };
32629 template< ::color::constant::YPbPr::reference_enum reference_number >struct xyy< ::color::category::YPbPr_uint32 <reference_number> > {
32630 	typedef ::color::category::xyy_uint32 akin_type;
32631 };
32632 template< ::color::constant::YPbPr::reference_enum reference_number >struct xyy< ::color::category::YPbPr_uint64 <reference_number> > {
32633 	typedef ::color::category::xyy_uint64 akin_type;
32634 };
32635 template< ::color::constant::YPbPr::reference_enum reference_number >struct xyy< ::color::category::YPbPr_float <reference_number> > {
32636 	typedef ::color::category::xyy_float akin_type;
32637 };
32638 template< ::color::constant::YPbPr::reference_enum reference_number >struct xyy< ::color::category::YPbPr_double <reference_number> > {
32639 	typedef ::color::category::xyy_double akin_type;
32640 };
32641 template< ::color::constant::YPbPr::reference_enum reference_number >struct xyy< ::color::category::YPbPr_ldouble<reference_number> > {
32642 	typedef ::color::category::xyy_ldouble akin_type;
32643 };
32644 
32645 }
32646 }
32647 
32648 namespace color {
32649 namespace akin {
32650 
32651 template< >struct xyy< ::color::category::xyz_uint8 > {
32652 	typedef ::color::category::xyy_uint8 akin_type;
32653 };
32654 template< >struct xyy< ::color::category::xyz_uint16 > {
32655 	typedef ::color::category::xyy_uint16 akin_type;
32656 };
32657 template< >struct xyy< ::color::category::xyz_uint32 > {
32658 	typedef ::color::category::xyy_uint32 akin_type;
32659 };
32660 template< >struct xyy< ::color::category::xyz_uint64 > {
32661 	typedef ::color::category::xyy_uint64 akin_type;
32662 };
32663 template< >struct xyy< ::color::category::xyz_float > {
32664 	typedef ::color::category::xyy_float akin_type;
32665 };
32666 template< >struct xyy< ::color::category::xyz_double > {
32667 	typedef ::color::category::xyy_double akin_type;
32668 };
32669 template< >struct xyy< ::color::category::xyz_ldouble > {
32670 	typedef ::color::category::xyy_ldouble akin_type;
32671 };
32672 
32673 }
32674 }
32675 
32676 namespace color {
32677 namespace akin {
32678 
32679 template
32680 <
32681 	typename tag_name
32682 	,::color::constant::lab::reference_enum reference_number
32683 
32684 	>
32685 struct xyy< ::color::category::lab< tag_name, reference_number > > {
32686 public:
32687 	typedef ::color::category::xyy< tag_name > akin_type;
32688 };
32689 
32690 }
32691 }
32692 
32693 namespace color {
32694 namespace akin {
32695 
32696 template< typename tag_name >
32697 struct xyy< ::color::category::xyy< tag_name > > {
32698 public:
32699 	typedef ::color::category::xyy< tag_name > akin_type;
32700 };
32701 
32702 }
32703 }
32704 
32705 namespace color {
32706 namespace akin {
32707 
32708 template
32709 <
32710 	typename tag_name
32711 	,::color::constant::lms::reference_enum reference_number
32712 	>
32713 struct xyy< ::color::category::lms< tag_name, reference_number > > {
32714 public:
32715 	typedef ::color::category::xyy< tag_name > akin_type;
32716 };
32717 
32718 }
32719 }
32720 
32721 namespace color {
32722 namespace akin {
32723 
32724 template< >struct xyy< ::color::category::luv_uint8 > {
32725 	typedef ::color::category::xyy_uint8 akin_type;
32726 };
32727 template< >struct xyy< ::color::category::luv_uint16 > {
32728 	typedef ::color::category::xyy_uint16 akin_type;
32729 };
32730 template< >struct xyy< ::color::category::luv_uint32 > {
32731 	typedef ::color::category::xyy_uint32 akin_type;
32732 };
32733 template< >struct xyy< ::color::category::luv_uint64 > {
32734 	typedef ::color::category::xyy_uint64 akin_type;
32735 };
32736 template< >struct xyy< ::color::category::luv_float > {
32737 	typedef ::color::category::xyy_float akin_type;
32738 };
32739 template< >struct xyy< ::color::category::luv_double > {
32740 	typedef ::color::category::xyy_double akin_type;
32741 };
32742 template< >struct xyy< ::color::category::luv_ldouble > {
32743 	typedef ::color::category::xyy_ldouble akin_type;
32744 };
32745 
32746 }
32747 }
32748 
32749 namespace color {
32750 namespace akin {
32751 
32752 template
32753 <
32754 	typename tag_name
32755 
32756 	>
32757 struct xyy< ::color::category::LabCH< tag_name > > {
32758 public:
32759 	typedef ::color::category::xyy< tag_name > akin_type;
32760 };
32761 
32762 }
32763 }
32764 
32765 namespace color {
32766 namespace akin {
32767 
32768 template< >struct xyy< ::color::category::LuvCH_uint8 > {
32769 	typedef ::color::category::xyy_uint8 akin_type;
32770 };
32771 template< >struct xyy< ::color::category::LuvCH_uint16 > {
32772 	typedef ::color::category::xyy_uint16 akin_type;
32773 };
32774 template< >struct xyy< ::color::category::LuvCH_uint32 > {
32775 	typedef ::color::category::xyy_uint32 akin_type;
32776 };
32777 template< >struct xyy< ::color::category::LuvCH_uint64 > {
32778 	typedef ::color::category::xyy_uint64 akin_type;
32779 };
32780 template< >struct xyy< ::color::category::LuvCH_float > {
32781 	typedef ::color::category::xyy_float akin_type;
32782 };
32783 template< >struct xyy< ::color::category::LuvCH_double > {
32784 	typedef ::color::category::xyy_double akin_type;
32785 };
32786 template< >struct xyy< ::color::category::LuvCH_ldouble > {
32787 	typedef ::color::category::xyy_ldouble akin_type;
32788 };
32789 
32790 }
32791 }
32792 
32793 namespace color {
32794 namespace trait {
32795 
32796 template <> struct info< ::color::category::xyy_uint8 > {
32797 public:
32798 	enum { implemented_entity = true };
32799 	enum { meaningful_entity = true };
32800 };
32801 template <> struct info< ::color::category::xyy_uint16 > {
32802 public:
32803 	enum { implemented_entity = true };
32804 	enum { meaningful_entity = true };
32805 };
32806 template <> struct info< ::color::category::xyy_uint32 > {
32807 public:
32808 	enum { implemented_entity = true };
32809 	enum { meaningful_entity = true };
32810 };
32811 template <> struct info< ::color::category::xyy_uint64 > {
32812 public:
32813 	enum { implemented_entity = true };
32814 	enum { meaningful_entity = true };
32815 };
32816 template <> struct info< ::color::category::xyy_float > {
32817 public:
32818 	enum { implemented_entity = true };
32819 	enum { meaningful_entity = true };
32820 };
32821 template <> struct info< ::color::category::xyy_double > {
32822 public:
32823 	enum { implemented_entity = true };
32824 	enum { meaningful_entity = true };
32825 };
32826 template <> struct info< ::color::category::xyy_ldouble > {
32827 public:
32828 	enum { implemented_entity = true };
32829 	enum { meaningful_entity = true };
32830 };
32831 
32832 }
32833 }
32834 
32835 namespace color {
32836 namespace trait {
32837 
32838 template< >
32839 struct bound< ::color::category::xyy_uint8 >
32840 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::xyy_uint8 >::instance_type > {
32841 };
32842 
32843 template< >
32844 struct bound< ::color::category::xyy_uint16 >
32845 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::xyy_uint16 >::instance_type > {
32846 };
32847 
32848 template< >
32849 struct bound< ::color::category::xyy_uint32 >
32850 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::xyy_uint32 >::instance_type > {
32851 };
32852 
32853 template< >
32854 struct bound< ::color::category::xyy_uint64 >
32855 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::xyy_uint64 >::instance_type > {
32856 };
32857 
32858 }
32859 }
32860 
32861 namespace color {
32862 namespace _internal {
32863 namespace xyy {
32864 namespace bound {
32865 
32866 template< typename index_name, typename scalar_name >
32867 struct scalar {
32868 public:
32869 	typedef scalar_name scalar_type;
32870 	typedef index_name index_type;
32871 
32872 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
32873 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
32874 
32875 	typedef typename trait_type::instance_type instance_type;
32876 	typedef typename trait_type::return_image_type return_image_type;
32877 
32878 	typedef typename index_trait_type::instance_type index_instance_type;
32879 	typedef typename index_trait_type::model_type index_input_const_type;
32880 
32881 	template< index_instance_type index >
maximumcolor::_internal::xyy::bound::scalar32882 	static return_image_type maximum() {
32883 		static instance_type max_list[] = { 100, 100, 100 };
32884 		return max_list[index];
32885 	}
32886 
maximumcolor::_internal::xyy::bound::scalar32887 	static return_image_type maximum(index_input_const_type index) {
32888 		static instance_type max_list[] = { 1, 1, 100 };
32889 		return max_list[index];
32890 	}
32891 
32892 	template< index_instance_type index >
minimumcolor::_internal::xyy::bound::scalar32893 	static return_image_type minimum() {
32894 		static instance_type min_list[] = { 0, 0, 0 };
32895 		return min_list[index];
32896 	}
32897 
minimumcolor::_internal::xyy::bound::scalar32898 	static return_image_type minimum(index_input_const_type index) {
32899 		static instance_type min_list[] = { 0, 0, 0 };
32900 		return min_list[index];
32901 	}
32902 
32903 	template< index_instance_type index >
rangecolor::_internal::xyy::bound::scalar32904 	static return_image_type range() {
32905 		static instance_type range_list[] = { 1, 1, 100 };
32906 		return range_list[index];
32907 	}
32908 
rangecolor::_internal::xyy::bound::scalar32909 	static return_image_type range(index_input_const_type index) {
32910 		static instance_type range_list[] = { 1, 1, 100 };
32911 		return range_list[index];
32912 	}
32913 };
32914 
32915 }
32916 }
32917 }
32918 }
32919 
32920 namespace color {
32921 namespace trait {
32922 
32923 template< >
32924 struct bound< ::color::category::xyy_float >
32925 	: public ::color::_internal::xyy::bound::scalar< typename ::color::trait::index< ::color::category::xyy_float >::instance_type, float > {
32926 };
32927 
32928 template< >
32929 struct bound< ::color::category::xyy_double >
32930 	: public ::color::_internal::xyy::bound::scalar< typename ::color::trait::index< ::color::category::xyy_double >::instance_type, double > {
32931 };
32932 
32933 template< >
32934 struct bound< ::color::category::xyy_ldouble >
32935 	: public ::color::_internal::xyy::bound::scalar< typename ::color::trait::index< ::color::category::xyy_ldouble >::instance_type, long double > {
32936 };
32937 
32938 }
32939 }
32940 
32941 namespace color {
32942 namespace trait {
32943 
32944 template< >
32945 struct component< ::color::category::xyy_float >
32946 	: public ::color::_internal::utility::component::array< float > {
32947 };
32948 
32949 template< >
32950 struct component< ::color::category::xyy_double >
32951 	: public ::color::_internal::utility::component::array< double > {
32952 };
32953 
32954 template< >
32955 struct component< ::color::category::xyy_ldouble >
32956 	: public ::color::_internal::utility::component::array< long double > {
32957 };
32958 
32959 }
32960 }
32961 
32962 namespace color {
32963 namespace trait {
32964 
32965 template< >
32966 struct component< ::color::category::xyy_uint8 >
32967 	: public ::color::_internal::utility::component::array< std::uint8_t > {
32968 };
32969 
32970 template< >
32971 struct component< ::color::category::xyy_uint16 >
32972 	: public ::color::_internal::utility::component::array< std::uint16_t > {
32973 };
32974 
32975 template< >
32976 struct component< ::color::category::xyy_uint32 >
32977 	: public ::color::_internal::utility::component::array< std::uint32_t > {
32978 };
32979 
32980 template< >
32981 struct component< ::color::category::xyy_uint64 >
32982 	: public ::color::_internal::utility::component::array< std::uint64_t > {
32983 };
32984 
32985 }
32986 }
32987 
32988 namespace color {
32989 namespace trait {
32990 
32991 template< >
32992 struct container< ::color::category::xyy_float >
32993 	: public ::color::_internal::utility::container::array< float, 3 > {
32994 };
32995 
32996 template< >
32997 struct container< ::color::category::xyy_double >
32998 	: public ::color::_internal::utility::container::array< double, 3 > {
32999 };
33000 
33001 template< >
33002 struct container< ::color::category::xyy_ldouble >
33003 	: public ::color::_internal::utility::container::array< long double, 3 > {
33004 };
33005 
33006 }
33007 }
33008 
33009 namespace color {
33010 namespace trait {
33011 
33012 template< >
33013 struct container< ::color::category::xyy_uint8 >
33014 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
33015 };
33016 
33017 template< >
33018 struct container< ::color::category::xyy_uint16 >
33019 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
33020 };
33021 
33022 template< >
33023 struct container< ::color::category::xyy_uint32 >
33024 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
33025 };
33026 
33027 template< >
33028 struct container< ::color::category::xyy_uint64 >
33029 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
33030 };
33031 
33032 }
33033 }
33034 
33035 namespace color {
33036 
33037 template< typename type_name >
33038 using xyy = ::color::model< typename ::color::category::xyy< type_name > >;
33039 
33040 }
33041 
33042 namespace color {
33043 namespace place {
33044 namespace _internal {
33045 
33046 template< typename tag_name >
33047 struct lightness< ::color::category::xyy< tag_name > > {
33048 public:
33049 	typedef ::color::category::xyy< tag_name > category_type;
33050 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
33051 
33052 	enum { position_enum = 0 };
33053 	enum { has_enum = true };
33054 
positioncolor::place::_internal::lightness33055 	static index_instance_type position() {
33056 		return position_enum;
33057 	}
33058 };
33059 
33060 }
33061 }
33062 }
33063 
33064 namespace color {
33065 namespace get {
33066 
33067 template< typename tag_name >
33068 inline
33069 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::xyy<tag_name> >::akin_type >::return_type
gray(::color::model<::color::category::xyy<tag_name>> const & color_parameter)33070 gray(::color::model< ::color::category::xyy<tag_name> > const& color_parameter) {
33071 	typedef ::color::category::xyy< tag_name > category_type;
33072 	typedef typename ::color::akin::gray< category_type >::akin_type akin_category_type;
33073 	typedef ::color::_internal::reformat< akin_category_type, category_type > reformat_type;
33074 	enum {
33075 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
33076 	};
33077 	enum {
33078 		gray_p = ::color::place::_internal::gray<akin_category_type>::position_enum
33079 	};
33080 	return reformat_type::template process<gray_p,lightness_p>(color_parameter.template get<lightness_p>());
33081 }
33082 
33083 }
33084 }
33085 
33086 namespace color {
33087 namespace get {
33088 
33089 template< typename tag_name >
33090 inline
33091 typename ::color::model< ::color::category::xyy< tag_name> >::component_const_type
lightness(::color::model<::color::category::xyy<tag_name>> const & color_parameter)33092 lightness(::color::model< ::color::category::xyy<tag_name> > const& color_parameter) {
33093 	typedef ::color::category::xyy< tag_name> category_type;
33094 	enum {
33095 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
33096 	};
33097 	return color_parameter.template get<lightness_p>();
33098 }
33099 
33100 }
33101 }
33102 
33103 namespace color {
33104 namespace set {
33105 
33106 template< typename tag_name >
33107 inline
33108 void
gray(::color::model<::color::category::xyy<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::xyy<tag_name>>::akin_type>::model_type component_parameter)33109 gray
33110 (
33111 	::color::model< ::color::category::xyy< tag_name > > & color_parameter
33112 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::xyy< tag_name > >::akin_type >::model_type component_parameter
33113 ) {
33114 	typedef ::color::category::xyy< tag_name > category_type;
33115 	typedef typename ::color::akin::gray< category_type >::akin_type akin_category_type;
33116 	typedef ::color::_internal::reformat< category_type, akin_category_type > reformat_type;
33117 	enum {
33118 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
33119 	};
33120 	enum {
33121 		gray_p = ::color::place::_internal::lightness<akin_category_type>::position_enum
33122 	};
33123 	color_parameter.template set<lightness_p>(reformat_type::template process<lightness_p,gray_p>(component_parameter));
33124 }
33125 
33126 }
33127 }
33128 
33129 namespace color {
33130 namespace set {
33131 template< typename tag_name >
33132 inline
33133 void
lightness(::color::model<::color::category::xyy<tag_name>> & color_parameter,typename::color::model<::color::category::xyy<tag_name>>::component_input_const_type component_parameter)33134 lightness
33135 (
33136 	::color::model< ::color::category::xyy<tag_name> > & color_parameter,
33137 	typename ::color::model< ::color::category::xyy<tag_name> >::component_input_const_type component_parameter
33138 ) {
33139 	typedef ::color::category::xyy<tag_name> category_type;
33140 	enum {
33141 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
33142 	};
33143 	color_parameter.template set<lightness_p>(component_parameter);
33144 }
33145 
33146 }
33147 }
33148 
33149 namespace color {
33150 namespace set {
33151 
33152 template< typename tag_name >
33153 inline
33154 void
red(::color::model<::color::category::xyy<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::xyy<tag_name>>::akin_type>::model_type component_parameter)33155 red
33156 (
33157 	::color::model< ::color::category::xyy< tag_name > > & color_parameter
33158 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::xyy< tag_name > >::akin_type >::model_type component_parameter
33159 ) {
33160 	typedef ::color::category::xyy< tag_name > category_type;
33161 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
33162 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
33163 	::color::model< akin_type > rgb(color_parameter);
33164 	rgb.template set< red_p > (component_parameter);
33165 	color_parameter = rgb;
33166 }
33167 
33168 }
33169 }
33170 
33171 namespace color {
33172 namespace set {
33173 
33174 template< typename tag_name >
33175 inline
33176 void
green(::color::model<::color::category::xyy<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::xyy<tag_name>>::akin_type>::model_type component_parameter)33177 green
33178 (
33179 	::color::model< ::color::category::xyy< tag_name > > & color_parameter
33180 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::xyy< tag_name > >::akin_type >::model_type component_parameter
33181 ) {
33182 	typedef ::color::category::xyy< tag_name > category_type;
33183 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
33184 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
33185 	::color::model< akin_type > rgb(color_parameter);
33186 	rgb.template set< green_p > (component_parameter);
33187 	color_parameter = rgb;
33188 }
33189 
33190 }
33191 }
33192 
33193 namespace color {
33194 namespace set {
33195 
33196 template< typename tag_name >
33197 inline
33198 void
blue(::color::model<::color::category::xyy<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::xyy<tag_name>>::akin_type>::model_type component_parameter)33199 blue
33200 (
33201 	::color::model< ::color::category::xyy< tag_name > > & color_parameter
33202 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::xyy< tag_name > >::akin_type >::model_type component_parameter
33203 ) {
33204 	typedef ::color::category::xyy< tag_name > category_type;
33205 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
33206 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
33207 	::color::model< akin_type > rgb(color_parameter);
33208 	rgb.template set<blue_p > (component_parameter);
33209 	color_parameter = rgb;
33210 }
33211 
33212 }
33213 }
33214 
33215 namespace color {
33216 namespace _internal {
33217 
33218 template
33219 <
33220 	typename xyy_tag_name
33221 	,typename gray_tag_name
33222 	>
33223 struct convert
33224 	<
33225 	::color::category::xyy< xyy_tag_name >
33226 	,::color::category::gray< gray_tag_name >
33227 	> {
33228 public:
33229 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33230 	typedef ::color::category::gray< gray_tag_name > gray_category_type, category_right_type;
33231 
33232 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
33233 
33234 	typedef ::color::model< xyy_category_type > xyy_model_type;
33235 	typedef ::color::model< gray_category_type > gray_model_type;
33236 
33237 	typedef ::color::xyz< scalar_type > xyz_model_type;
33238 
33239 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33240 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33241 
33242 	typedef typename container_left_trait_type::input_type container_left_input_type;
33243 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33244 
processcolor::_internal::convert33245 	static void process
33246 	(
33247 		container_left_input_type left
33248 		,container_right_const_input_type right
33249 	) {
33250 		left = xyy_model_type(xyz_model_type(gray_model_type(right))).container();
33251 	}
33252 };
33253 
33254 }
33255 }
33256 
33257 namespace color {
33258 namespace _internal {
33259 
33260 template
33261 <
33262 	typename xyy_tag_name
33263 	,typename cmy_tag_name
33264 	>
33265 struct convert
33266 	<
33267 	::color::category::xyy< xyy_tag_name >
33268 	,::color::category::cmy< cmy_tag_name >
33269 	> {
33270 public:
33271 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33272 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_right_type;
33273 
33274 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
33275 
33276 	typedef ::color::model< cmy_category_type > cmy_model_type;
33277 	typedef ::color::model< xyy_category_type > xyy_model_type;
33278 
33279 	typedef ::color::rgb< scalar_type > rgb_model_type;
33280 	typedef ::color::xyz< scalar_type > xyz_model_type;
33281 
33282 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33283 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33284 
33285 	typedef typename container_left_trait_type::input_type container_left_input_type;
33286 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33287 
processcolor::_internal::convert33288 	static void process
33289 	(
33290 		container_left_input_type left
33291 		,container_right_const_input_type right
33292 	) {
33293 		left = xyy_model_type(xyz_model_type(rgb_model_type(cmy_model_type(right)))).container();
33294 	}
33295 };
33296 
33297 }
33298 }
33299 
33300 namespace color {
33301 namespace _internal {
33302 
33303 template
33304 <
33305 	typename xyy_tag_name
33306 	,typename cmyk_tag_name
33307 	>
33308 struct convert
33309 	<
33310 	::color::category::xyy< xyy_tag_name >
33311 	,::color::category::cmyk< cmyk_tag_name >
33312 	> {
33313 public:
33314 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33315 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
33316 
33317 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
33318 
33319 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
33320 	typedef ::color::model< xyy_category_type > xyy_model_type;
33321 
33322 	typedef ::color::rgb< scalar_type > rgb_model_type;
33323 	typedef ::color::xyz< scalar_type > xyz_model_type;
33324 
33325 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33326 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33327 
33328 	typedef typename container_left_trait_type::input_type container_left_input_type;
33329 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33330 
processcolor::_internal::convert33331 	static void process
33332 	(
33333 		container_left_input_type left
33334 		,container_right_const_input_type right
33335 	) {
33336 		left = xyy_model_type(xyz_model_type(rgb_model_type(cmyk_model_type(right)))).container();
33337 	}
33338 };
33339 
33340 }
33341 }
33342 
33343 namespace color {
33344 namespace _internal {
33345 
33346 template
33347 <
33348 	typename xyy_tag_name
33349 	,typename hsl_tag_name
33350 	>
33351 struct convert
33352 	<
33353 	::color::category::xyy< xyy_tag_name >
33354 	,::color::category::hsl< hsl_tag_name >
33355 	> {
33356 public:
33357 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33358 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
33359 
33360 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
33361 
33362 	typedef ::color::model< hsl_category_type > hsl_model_type;
33363 	typedef ::color::model< xyy_category_type > xyy_model_type;
33364 
33365 	typedef ::color::rgb< scalar_type > rgb_model_type;
33366 	typedef ::color::xyz< scalar_type > xyz_model_type;
33367 
33368 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33369 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33370 
33371 	typedef typename container_left_trait_type::input_type container_left_input_type;
33372 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33373 
processcolor::_internal::convert33374 	static void process
33375 	(
33376 		container_left_input_type left
33377 		,container_right_const_input_type right
33378 	) {
33379 		left = xyy_model_type(xyz_model_type(rgb_model_type(hsl_model_type(right)))).container();
33380 	}
33381 };
33382 
33383 }
33384 }
33385 
33386 namespace color {
33387 namespace _internal {
33388 
33389 template
33390 <
33391 	typename xyy_tag_name
33392 	,typename hsv_tag_name
33393 	>
33394 struct convert
33395 	<
33396 	::color::category::xyy< xyy_tag_name >
33397 	,::color::category::hsv< hsv_tag_name >
33398 	> {
33399 public:
33400 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33401 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
33402 
33403 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
33404 
33405 	typedef ::color::model< hsv_category_type > hsv_model_type;
33406 	typedef ::color::model< xyy_category_type > xyy_model_type;
33407 
33408 	typedef ::color::rgb< scalar_type > rgb_model_type;
33409 	typedef ::color::xyz< scalar_type > xyz_model_type;
33410 
33411 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33412 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33413 
33414 	typedef typename container_left_trait_type::input_type container_left_input_type;
33415 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33416 
processcolor::_internal::convert33417 	static void process
33418 	(
33419 		container_left_input_type left
33420 		,container_right_const_input_type right
33421 	) {
33422 		left = xyy_model_type(xyz_model_type(rgb_model_type(hsv_model_type(right)))).container();
33423 	}
33424 };
33425 
33426 }
33427 }
33428 
33429 namespace color {
33430 namespace _internal {
33431 
33432 template
33433 <
33434 	typename xyy_tag_name
33435 	,typename hsi_tag_name
33436 	>
33437 struct convert
33438 	<
33439 	::color::category::xyy< xyy_tag_name >
33440 	,::color::category::hsi< hsi_tag_name >
33441 	> {
33442 public:
33443 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33444 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
33445 
33446 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
33447 
33448 	typedef ::color::model< hsi_category_type > hsi_model_type;
33449 	typedef ::color::model< xyy_category_type > xyy_model_type;
33450 
33451 	typedef ::color::rgb< scalar_type > rgb_model_type;
33452 	typedef ::color::xyz< scalar_type > xyz_model_type;
33453 
33454 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33455 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33456 
33457 	typedef typename container_left_trait_type::input_type container_left_input_type;
33458 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33459 
processcolor::_internal::convert33460 	static void process
33461 	(
33462 		container_left_input_type left
33463 		,container_right_const_input_type right
33464 	) {
33465 		left = xyy_model_type(xyz_model_type(rgb_model_type(hsi_model_type(right)))).container();
33466 	}
33467 };
33468 
33469 }
33470 }
33471 
33472 namespace color {
33473 namespace _internal {
33474 
33475 template
33476 <
33477 	typename xyy_tag_name
33478 	,typename hwb_tag_name
33479 	>
33480 struct convert
33481 	<
33482 	::color::category::xyy< xyy_tag_name >
33483 	,::color::category::hwb< hwb_tag_name >
33484 	> {
33485 public:
33486 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33487 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
33488 
33489 	typedef typename ::color::trait::scalar< xyy_category_type >::instance_type scalar_type;
33490 
33491 	typedef ::color::model< xyy_category_type > xyy_model_type;
33492 	typedef ::color::model< hwb_category_type > hwb_model_type;
33493 
33494 	typedef ::color::hsv< scalar_type > hsv_model_type;
33495 	typedef ::color::rgb< scalar_type > rgb_model_type;
33496 	typedef ::color::xyz< scalar_type > xyz_model_type;
33497 
33498 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33499 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33500 
33501 	typedef typename container_left_trait_type::input_type container_left_input_type;
33502 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33503 
processcolor::_internal::convert33504 	static void process
33505 	(
33506 		container_left_input_type left
33507 		,container_right_const_input_type right
33508 	) {
33509 		left = xyy_model_type(xyz_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right))))).container();
33510 	}
33511 };
33512 
33513 }
33514 }
33515 
33516 namespace color {
33517 namespace _internal {
33518 
33519 template
33520 <
33521 	typename xyy_tag_name
33522 	,typename rgb_tag_name
33523 	>
33524 struct convert
33525 	<
33526 	::color::category::xyy< xyy_tag_name >
33527 	,::color::category::rgb< rgb_tag_name >
33528 	> {
33529 public:
33530 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33531 	typedef ::color::category::rgb< rgb_tag_name > rgb_category_type, category_right_type;
33532 
33533 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
33534 
33535 	typedef ::color::model< xyy_category_type > xyy_model_type;
33536 	typedef ::color::model< rgb_category_type > rgb_model_type;
33537 
33538 	typedef ::color::xyz< scalar_type > xyz_model_type;
33539 
33540 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33541 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33542 
33543 	typedef typename container_left_trait_type::input_type container_left_input_type;
33544 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33545 
processcolor::_internal::convert33546 	static void process
33547 	(
33548 		container_left_input_type left
33549 		,container_right_const_input_type right
33550 	) {
33551 		left = xyy_model_type(xyz_model_type(rgb_model_type(right))).container();
33552 	}
33553 };
33554 
33555 }
33556 }
33557 
33558 namespace color {
33559 namespace _internal {
33560 
33561 template
33562 <
33563 	typename xyy_tag_name
33564 	,typename yiq_tag_name
33565 	>
33566 struct convert
33567 	<
33568 	::color::category::xyy< xyy_tag_name >
33569 	,::color::category::yiq< yiq_tag_name >
33570 	> {
33571 public:
33572 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33573 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
33574 
33575 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
33576 
33577 	typedef ::color::model< yiq_category_type > yiq_model_type;
33578 	typedef ::color::model< xyy_category_type > xyy_model_type;
33579 
33580 	typedef ::color::rgb< scalar_type > rgb_model_type;
33581 	typedef ::color::xyz< scalar_type > xyz_model_type;
33582 
33583 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33584 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33585 
33586 	typedef typename container_left_trait_type::input_type container_left_input_type;
33587 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33588 
processcolor::_internal::convert33589 	static void process
33590 	(
33591 		container_left_input_type left
33592 		,container_right_const_input_type right
33593 	) {
33594 		left = xyy_model_type(xyz_model_type(rgb_model_type(yiq_model_type(right)))).container();
33595 	}
33596 };
33597 
33598 }
33599 }
33600 
33601 namespace color {
33602 namespace _internal {
33603 
33604 template
33605 <
33606 	typename xyy_tag_name
33607 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
33608 	>
33609 struct convert
33610 	<
33611 	::color::category::xyy< xyy_tag_name >
33612 	,::color::category::yuv< yuv_tag_name, yuv_reference_number >
33613 	> {
33614 public:
33615 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33616 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_right_type;
33617 
33618 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
33619 
33620 	typedef ::color::model< xyy_category_type > xyy_model_type;
33621 	typedef ::color::model< yuv_category_type > yuv_model_type;
33622 
33623 	typedef ::color::rgb< scalar_type > rgb_model_type;
33624 	typedef ::color::xyz< scalar_type > xyz_model_type;
33625 
33626 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33627 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33628 
33629 	typedef typename container_left_trait_type::input_type container_left_input_type;
33630 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33631 
processcolor::_internal::convert33632 	static void process
33633 	(
33634 		container_left_input_type left
33635 		,container_right_const_input_type right
33636 	) {
33637 		left = xyy_model_type(xyz_model_type(rgb_model_type(yuv_model_type(right)))).container();
33638 	}
33639 };
33640 
33641 }
33642 }
33643 
33644 namespace color {
33645 namespace _internal {
33646 
33647 template
33648 <
33649 	typename xyy_tag_name
33650 	,typename YCgCo_tag_name
33651 	>
33652 struct convert
33653 	<
33654 	::color::category::xyy< xyy_tag_name >
33655 	,::color::category::YCgCo< YCgCo_tag_name >
33656 	> {
33657 public:
33658 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33659 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
33660 
33661 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
33662 
33663 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
33664 	typedef ::color::model< xyy_category_type > xyy_model_type;
33665 
33666 	typedef ::color::rgb< scalar_type > rgb_model_type;
33667 	typedef ::color::xyz< scalar_type > xyz_model_type;
33668 
33669 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33670 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33671 
33672 	typedef typename container_left_trait_type::input_type container_left_input_type;
33673 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33674 
processcolor::_internal::convert33675 	static void process
33676 	(
33677 		container_left_input_type left
33678 		,container_right_const_input_type right
33679 	) {
33680 		left = xyy_model_type(xyz_model_type(rgb_model_type(YCgCo_model_type(right)))).container();
33681 	}
33682 };
33683 
33684 }
33685 }
33686 
33687 namespace color {
33688 namespace _internal {
33689 
33690 template
33691 <
33692 	typename xyy_tag_name
33693 	,typename YDbDr_tag_name
33694 	>
33695 struct convert
33696 	<
33697 	::color::category::xyy< xyy_tag_name >
33698 	,::color::category::YDbDr< YDbDr_tag_name >
33699 	> {
33700 public:
33701 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33702 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
33703 
33704 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
33705 
33706 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
33707 	typedef ::color::model< xyy_category_type > xyy_model_type;
33708 
33709 	typedef ::color::rgb< scalar_type > rgb_model_type;
33710 	typedef ::color::xyz< scalar_type > xyz_model_type;
33711 
33712 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33713 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33714 
33715 	typedef typename container_left_trait_type::input_type container_left_input_type;
33716 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33717 
processcolor::_internal::convert33718 	static void process
33719 	(
33720 		container_left_input_type left
33721 		,container_right_const_input_type right
33722 	) {
33723 		left = xyy_model_type(xyz_model_type(rgb_model_type(YDbDr_model_type(right)))).container();
33724 	}
33725 };
33726 
33727 }
33728 }
33729 
33730 namespace color {
33731 namespace _internal {
33732 
33733 template
33734 <
33735 	typename xyy_tag_name
33736 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
33737 	>
33738 struct convert
33739 	<
33740 	::color::category::xyy< xyy_tag_name >
33741 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
33742 	> {
33743 public:
33744 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33745 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_right_type;
33746 
33747 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
33748 
33749 	typedef ::color::model< xyy_category_type > xyy_model_type;
33750 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
33751 
33752 	typedef ::color::rgb< scalar_type > rgb_model_type;
33753 	typedef ::color::xyz< scalar_type > xyz_model_type;
33754 
33755 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33756 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33757 
33758 	typedef typename container_left_trait_type::input_type container_left_input_type;
33759 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33760 
processcolor::_internal::convert33761 	static void process
33762 	(
33763 		container_left_input_type left
33764 		,container_right_const_input_type right
33765 	) {
33766 		left = xyy_model_type(xyz_model_type(rgb_model_type(YPbPr_model_type(right)))).container();
33767 	}
33768 };
33769 
33770 }
33771 }
33772 
33773 namespace color {
33774 namespace _internal {
33775 
33776 template
33777 <
33778 	typename xyy_tag_name
33779 	,typename xyz_tag_name
33780 	>
33781 struct convert
33782 	<
33783 	::color::category::xyy< xyy_tag_name >
33784 	,::color::category::xyz< xyz_tag_name >
33785 	> {
33786 public:
33787 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33788 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
33789 
33790 	typedef typename ::color::trait::scalar<category_left_type> scalar_trait_type;
33791 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
33792 
33793 	typedef ::color::category::xyy< scalar_type > xyySCALAR_category_type;
33794 	typedef ::color::category::xyz< scalar_type > xyzSCALAR_category_type;
33795 
33796 	typedef ::color::model< xyy_category_type > xyy_model_type;
33797 	typedef ::color::model< xyz_category_type > xyz_model_type;
33798 
33799 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33800 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33801 
33802 	typedef typename container_left_trait_type::input_type container_left_input_type;
33803 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33804 
33805 	typedef ::color::_internal::reformat< xyy_category_type, xyySCALAR_category_type > reformatXYY_type;
33806 	typedef ::color::_internal::reformat< xyzSCALAR_category_type, xyz_category_type > reformatXYZ_type;
33807 
33808 	typedef ::color::constant::xyz::illuminant::point< scalar_type, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > white_point_type;
33809 
processcolor::_internal::convert33810 	static void process
33811 	(
33812 		container_left_input_type left
33813 		,container_right_const_input_type right
33814 	) {
33815 		scalar_type x = reformatXYZ_type::template process<0,0>(container_right_trait_type::template get<0>(right));
33816 		scalar_type y = reformatXYZ_type::template process<1,1>(container_right_trait_type::template get<1>(right));
33817 		scalar_type z = reformatXYZ_type::template process<2,2>(container_right_trait_type::template get<2>(right));
33818 		scalar_type s = x + y + z;
33819 		scalar_type small_x = 0;
33820 		scalar_type small_y = 0;
33821 		const scalar_type big_Y = y;
33822 		if(false == scalar_trait_type::is_small(s)) {
33823 			small_x = x / s;
33824 			small_y = y / s;
33825 		}
33826 		container_left_trait_type::template set<0>(left, reformatXYY_type::template process< 0, 0>(small_x));
33827 		container_left_trait_type::template set<1>(left, reformatXYY_type::template process< 1, 1>(small_y));
33828 		container_left_trait_type::template set<2>(left, reformatXYY_type::template process< 2, 2>(big_Y));
33829 	}
33830 
33831 };
33832 
33833 }
33834 }
33835 
33836 namespace color {
33837 namespace _internal {
33838 
33839 template
33840 <
33841 	typename xyy_tag_name
33842 	,typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
33843 	>
33844 struct convert
33845 	<
33846 	::color::category::xyy< xyy_tag_name >
33847 	,::color::category::lab< lab_tag_name, reference_number >
33848 	> {
33849 public:
33850 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
33851 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_right_type;
33852 
33853 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
33854 
33855 	typedef ::color::model< xyy_category_type > xyy_model_type;
33856 	typedef ::color::model< lab_category_type > lab_model_type;
33857 
33858 	typedef ::color::xyz< scalar_type > xyz_model_type;
33859 
33860 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33861 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33862 
33863 	typedef typename container_left_trait_type::input_type container_left_input_type;
33864 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33865 
processcolor::_internal::convert33866 	static void process
33867 	(
33868 		container_left_input_type left
33869 		,container_right_const_input_type right
33870 	) {
33871 		left = xyy_model_type(xyz_model_type(lab_model_type(right))).container();
33872 	}
33873 };
33874 
33875 }
33876 }
33877 
33878 namespace color {
33879 namespace _internal {
33880 
33881 template
33882 <
33883 	typename tag_left_name
33884 	,typename tag_right_name
33885 	>
33886 struct convert
33887 	<
33888 	::color::category::xyy< tag_left_name >
33889 	,::color::category::xyy< tag_right_name>
33890 	> {
33891 public:
33892 	typedef ::color::category::xyy< tag_left_name > category_left_type;
33893 	typedef ::color::category::xyy< tag_right_name> category_right_type;
33894 
33895 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
33896 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
33897 
33898 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
33899 
33900 	typedef typename container_left_trait_type::input_type container_left_input_type;
33901 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
33902 
processcolor::_internal::convert33903 	static void process
33904 	(
33905 		container_left_input_type left
33906 		,container_right_const_input_type right
33907 	) {
33908 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
33909 		container_left_trait_type::template set<1>(left, reformat_type::template process<1,1>(container_right_trait_type::template get<1>(right)));
33910 		container_left_trait_type::template set<2>(left, reformat_type::template process<2,2>(container_right_trait_type::template get<2>(right)));
33911 	}
33912 };
33913 
33914 }
33915 }
33916 
33917 namespace color {
33918 namespace akin {
33919 
33920 template
33921 <
33922 	typename tag_name
33923 	,::color::constant::lms::reference_enum lms_reference_number
33924 
33925 	>
33926 struct lms< ::color::category::gray< tag_name >, lms_reference_number > {
33927 public:
33928 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
33929 };
33930 
33931 }
33932 }
33933 
33934 namespace color {
33935 namespace akin {
33936 
33937 template
33938 <
33939 	typename tag_name
33940 	,::color::constant::lms::reference_enum lms_reference_number
33941 
33942 	>
33943 struct lms< ::color::category::cmy< tag_name >, lms_reference_number > {
33944 public:
33945 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
33946 };
33947 
33948 }
33949 }
33950 
33951 namespace color {
33952 namespace akin {
33953 
33954 template
33955 <
33956 	typename tag_name
33957 	,::color::constant::lms::reference_enum lms_reference_number
33958 
33959 	>
33960 struct lms< ::color::category::cmyk< tag_name >, lms_reference_number > {
33961 public:
33962 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
33963 };
33964 
33965 }
33966 }
33967 
33968 namespace color {
33969 namespace akin {
33970 
33971 template
33972 <
33973 	typename tag_name
33974 	,::color::constant::lms::reference_enum lms_reference_number
33975 
33976 	>
33977 struct lms< ::color::category::hsl< tag_name >, lms_reference_number > {
33978 public:
33979 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
33980 };
33981 
33982 }
33983 }
33984 
33985 namespace color {
33986 namespace akin {
33987 
33988 template
33989 <
33990 	typename tag_name
33991 	,::color::constant::lms::reference_enum lms_reference_number
33992 
33993 	>
33994 struct lms< ::color::category::hsv< tag_name >, lms_reference_number > {
33995 public:
33996 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
33997 };
33998 
33999 }
34000 }
34001 
34002 namespace color {
34003 namespace akin {
34004 
34005 template
34006 <
34007 	typename tag_name
34008 	,::color::constant::lms::reference_enum lms_reference_number
34009 
34010 	>
34011 struct lms< ::color::category::hsi< tag_name >, lms_reference_number > {
34012 public:
34013 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
34014 };
34015 
34016 }
34017 }
34018 
34019 namespace color {
34020 namespace akin {
34021 
34022 template
34023 <
34024 	typename tag_name,::color::constant::lms::reference_enum lms_reference_number
34025 
34026 	>
34027 struct lms< ::color::category::hwb< tag_name >, lms_reference_number > {
34028 public:
34029 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
34030 };
34031 
34032 }
34033 }
34034 
34035 namespace color {
34036 namespace akin {
34037 
34038 template< ::color::constant::lms::reference_enum reference_number >struct lms< ::color::category::rgb_uint8, reference_number > {
34039 	typedef ::color::category::lms_uint8 <reference_number> akin_type;
34040 };
34041 template< ::color::constant::lms::reference_enum reference_number >struct lms< ::color::category::rgb_uint16, reference_number > {
34042 	typedef ::color::category::lms_uint16 <reference_number> akin_type;
34043 };
34044 template< ::color::constant::lms::reference_enum reference_number >struct lms< ::color::category::rgb_uint32, reference_number > {
34045 	typedef ::color::category::lms_uint32 <reference_number> akin_type;
34046 };
34047 template< ::color::constant::lms::reference_enum reference_number >struct lms< ::color::category::rgb_uint64, reference_number > {
34048 	typedef ::color::category::lms_uint64 <reference_number> akin_type;
34049 };
34050 template< ::color::constant::lms::reference_enum reference_number >struct lms< ::color::category::rgb_float, reference_number > {
34051 	typedef ::color::category::lms_float <reference_number> akin_type;
34052 };
34053 template< ::color::constant::lms::reference_enum reference_number >struct lms< ::color::category::rgb_double, reference_number > {
34054 	typedef ::color::category::lms_double <reference_number> akin_type;
34055 };
34056 template< ::color::constant::lms::reference_enum reference_number >struct lms< ::color::category::rgb_ldouble, reference_number > {
34057 	typedef ::color::category::lms_ldouble<reference_number> akin_type;
34058 };
34059 
34060 }
34061 }
34062 
34063 namespace color {
34064 namespace akin {
34065 
34066 template
34067 <
34068 	typename tag_name
34069 	,::color::constant::lms::reference_enum lms_reference_number
34070 
34071 	>
34072 struct lms< ::color::category::yiq< tag_name >, lms_reference_number > {
34073 public:
34074 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
34075 };
34076 
34077 }
34078 }
34079 
34080 namespace color {
34081 namespace akin {
34082 
34083 template
34084 <
34085 	typename tag_name
34086 	,::color::constant::lms::reference_enum lms_reference_number
34087 	,::color::constant::yuv::reference_enum yuv_reference_number
34088 	>
34089 struct lms< ::color::category::yuv< tag_name, yuv_reference_number >, lms_reference_number > {
34090 public:
34091 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
34092 };
34093 
34094 }
34095 }
34096 
34097 namespace color {
34098 namespace akin {
34099 
34100 template
34101 <
34102 	typename tag_name
34103 	,::color::constant::lms::reference_enum lms_reference_number
34104 
34105 	>
34106 struct lms< ::color::category::YCgCo< tag_name >, lms_reference_number > {
34107 public:
34108 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
34109 };
34110 
34111 }
34112 }
34113 
34114 namespace color {
34115 namespace akin {
34116 
34117 template
34118 <
34119 	typename tag_name
34120 	,::color::constant::lms::reference_enum lms_reference_number
34121 
34122 	>
34123 struct lms< ::color::category::YDbDr< tag_name >, lms_reference_number > {
34124 public:
34125 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
34126 };
34127 
34128 }
34129 }
34130 
34131 namespace color {
34132 namespace akin {
34133 
34134 template
34135 <
34136 	typename tag_name
34137 	,::color::constant::lms::reference_enum lms_reference_number
34138 	,::color::constant::YPbPr::reference_enum YPbPr_reference_number
34139 	>
34140 struct lms< ::color::category::YPbPr< tag_name, YPbPr_reference_number >, lms_reference_number > {
34141 public:
34142 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
34143 };
34144 
34145 }
34146 }
34147 
34148 namespace color {
34149 namespace akin {
34150 
34151 template
34152 <
34153 	typename tag_name
34154 	,::color::constant::lms::reference_enum lms_reference_number
34155 
34156 	>
34157 struct lms< ::color::category::xyz< tag_name >, lms_reference_number > {
34158 public:
34159 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
34160 };
34161 
34162 }
34163 }
34164 
34165 namespace color {
34166 namespace akin {
34167 
34168 template
34169 <
34170 	typename tag_name
34171 	,::color::constant::lms::reference_enum lms_reference_number
34172 	,::color::constant::lab::reference_enum lab_reference_number
34173 	>
34174 struct lms< ::color::category::lab< tag_name, lab_reference_number >, lms_reference_number > {
34175 public:
34176 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
34177 };
34178 
34179 }
34180 }
34181 
34182 namespace color {
34183 namespace akin {
34184 
34185 template
34186 <
34187 	typename tag_name
34188 	,::color::constant::lms::reference_enum lms_reference_number
34189 
34190 	>
34191 struct lms< ::color::category::xyy< tag_name >, lms_reference_number > {
34192 public:
34193 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
34194 };
34195 
34196 }
34197 }
34198 
34199 namespace color {
34200 namespace akin {
34201 
34202 template
34203 <
34204 	typename tag_name
34205 	,::color::constant::lms::reference_enum lms_reference_number
34206 
34207 	>
34208 struct lms< ::color::category::lms< tag_name, lms_reference_number >, lms_reference_number > {
34209 public:
34210 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
34211 };
34212 
34213 }
34214 }
34215 
34216 namespace color {
34217 namespace akin {
34218 
34219 template
34220 <
34221 	typename tag_name
34222 	,::color::constant::lms::reference_enum lms_reference_number
34223 
34224 	>
34225 struct lms< ::color::category::luv< tag_name >, lms_reference_number > {
34226 public:
34227 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
34228 };
34229 
34230 }
34231 }
34232 
34233 namespace color {
34234 namespace akin {
34235 
34236 template
34237 <
34238 	typename tag_name
34239 	,::color::constant::lms::reference_enum lms_reference_number
34240 
34241 	>
34242 struct lms< ::color::category::LabCH< tag_name >, lms_reference_number > {
34243 public:
34244 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
34245 };
34246 
34247 }
34248 }
34249 
34250 namespace color {
34251 namespace akin {
34252 
34253 template
34254 <
34255 	typename tag_name
34256 	,::color::constant::lms::reference_enum lms_reference_number
34257 
34258 	>
34259 struct lms< ::color::category::LuvCH< tag_name >, lms_reference_number > {
34260 public:
34261 	typedef ::color::category::lms< tag_name, lms_reference_number > akin_type;
34262 };
34263 
34264 }
34265 }
34266 
34267 namespace color {
34268 namespace trait {
34269 
34270 template< ::color::constant::lms::reference_enum lms_reference_number > struct info< ::color::category::lms_uint8 <lms_reference_number> > {
34271 public:
34272 	enum { implemented_entity = true };
34273 	enum { meaningful_entity = true };
34274 };
34275 template< ::color::constant::lms::reference_enum lms_reference_number > struct info< ::color::category::lms_uint16 <lms_reference_number> > {
34276 public:
34277 	enum { implemented_entity = true };
34278 	enum { meaningful_entity = true };
34279 };
34280 template< ::color::constant::lms::reference_enum lms_reference_number > struct info< ::color::category::lms_uint32 <lms_reference_number> > {
34281 public:
34282 	enum { implemented_entity = true };
34283 	enum { meaningful_entity = true };
34284 };
34285 template< ::color::constant::lms::reference_enum lms_reference_number > struct info< ::color::category::lms_uint64 <lms_reference_number> > {
34286 public:
34287 	enum { implemented_entity = true };
34288 	enum { meaningful_entity = true };
34289 };
34290 template< ::color::constant::lms::reference_enum lms_reference_number > struct info< ::color::category::lms_float <lms_reference_number> > {
34291 public:
34292 	enum { implemented_entity = true };
34293 	enum { meaningful_entity = true };
34294 };
34295 template< ::color::constant::lms::reference_enum lms_reference_number > struct info< ::color::category::lms_double <lms_reference_number> > {
34296 public:
34297 	enum { implemented_entity = true };
34298 	enum { meaningful_entity = true };
34299 };
34300 template< ::color::constant::lms::reference_enum lms_reference_number > struct info< ::color::category::lms_ldouble<lms_reference_number> > {
34301 public:
34302 	enum { implemented_entity = true };
34303 	enum { meaningful_entity = true };
34304 };
34305 
34306 }
34307 }
34308 
34309 namespace color {
34310 namespace trait {
34311 
34312 template< ::color::constant::lms::reference_enum reference_number >
34313 struct bound< ::color::category::lms_uint8<reference_number> >
34314 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::lms_uint8<reference_number> >::instance_type > {
34315 };
34316 
34317 template< ::color::constant::lms::reference_enum reference_number >
34318 struct bound< ::color::category::lms_uint16<reference_number> >
34319 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::lms_uint16<reference_number> >::instance_type > {
34320 };
34321 
34322 template< ::color::constant::lms::reference_enum reference_number >
34323 struct bound< ::color::category::lms_uint32<reference_number> >
34324 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::lms_uint32<reference_number> >::instance_type > {
34325 };
34326 
34327 template< ::color::constant::lms::reference_enum reference_number >
34328 struct bound< ::color::category::lms_uint64<reference_number> >
34329 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::lms_uint64<reference_number> >::instance_type > {
34330 };
34331 
34332 }
34333 }
34334 
34335 namespace color {
34336 namespace constant {
34337 namespace lms {
34338 
34339 template< typename scalar_name, ::color::constant::lms::reference_enum reference_number >
34340 struct matrix {
34341 	typedef scalar_name scalar_type;
34342 
a11color::constant::lms::matrix34343 	static scalar_type const a11() {
34344 		return 1;
34345 	}
a12color::constant::lms::matrix34346 	static scalar_type const a12() {
34347 		return 0;
34348 	}
a13color::constant::lms::matrix34349 	static scalar_type const a13() {
34350 		return 0;
34351 	}
34352 
a21color::constant::lms::matrix34353 	static scalar_type const a21() {
34354 		return 0;
34355 	}
a22color::constant::lms::matrix34356 	static scalar_type const a22() {
34357 		return 1;
34358 	}
a23color::constant::lms::matrix34359 	static scalar_type const a23() {
34360 		return 0;
34361 	}
34362 
a31color::constant::lms::matrix34363 	static scalar_type const a31() {
34364 		return 0;
34365 	}
a32color::constant::lms::matrix34366 	static scalar_type const a32() {
34367 		return 0;
34368 	}
a33color::constant::lms::matrix34369 	static scalar_type const a33() {
34370 		return 1;
34371 	}
34372 
i11color::constant::lms::matrix34373 	static scalar_type const i11() {
34374 		return 1;
34375 	}
i12color::constant::lms::matrix34376 	static scalar_type const i12() {
34377 		return 0;
34378 	}
i13color::constant::lms::matrix34379 	static scalar_type const i13() {
34380 		return 0;
34381 	}
34382 
i21color::constant::lms::matrix34383 	static scalar_type const i21() {
34384 		return 0;
34385 	}
i22color::constant::lms::matrix34386 	static scalar_type const i22() {
34387 		return 1;
34388 	}
i23color::constant::lms::matrix34389 	static scalar_type const i23() {
34390 		return 0;
34391 	}
34392 
i31color::constant::lms::matrix34393 	static scalar_type const i31() {
34394 		return 0;
34395 	}
i32color::constant::lms::matrix34396 	static scalar_type const i32() {
34397 		return 0;
34398 	}
i33color::constant::lms::matrix34399 	static scalar_type const i33() {
34400 		return 1;
34401 	}
34402 
34403 };
34404 
34405 template< typename scalar_name >
34406 struct matrix< scalar_name, ::color::constant::lms::von_Kries_E_entity > {
34407 	typedef scalar_name scalar_type;
34408 
a11color::constant::lms::matrix34409 	static scalar_type const a11() {
34410 		return scalar_type(0.38971);
34411 	}
a12color::constant::lms::matrix34412 	static scalar_type const a12() {
34413 		return scalar_type(0.68898);
34414 	}
a13color::constant::lms::matrix34415 	static scalar_type const a13() {
34416 		return scalar_type(-0.07868);
34417 	}
34418 
a21color::constant::lms::matrix34419 	static scalar_type const a21() {
34420 		return scalar_type(-0.22981);
34421 	}
a22color::constant::lms::matrix34422 	static scalar_type const a22() {
34423 		return scalar_type(1.18340);
34424 	}
a23color::constant::lms::matrix34425 	static scalar_type const a23() {
34426 		return scalar_type(0.04641);
34427 	}
34428 
a31color::constant::lms::matrix34429 	static scalar_type const a31() {
34430 		return 0;
34431 	}
a32color::constant::lms::matrix34432 	static scalar_type const a32() {
34433 		return 0;
34434 	}
a33color::constant::lms::matrix34435 	static scalar_type const a33() {
34436 		return 1;
34437 	}
34438 
i11color::constant::lms::matrix34439 	static scalar_type const i11() {
34440 		return 1.910196834052030;
34441 	}
i12color::constant::lms::matrix34442 	static scalar_type const i12() {
34443 		return -1.112123892787870;
34444 	}
i13color::constant::lms::matrix34445 	static scalar_type const i13() {
34446 		return 0.201907956767499;
34447 	}
34448 
i21color::constant::lms::matrix34449 	static scalar_type const i21() {
34450 		return 0.370950088248689;
34451 	}
i22color::constant::lms::matrix34452 	static scalar_type const i22() {
34453 		return 0.629054257392613;
34454 	}
i23color::constant::lms::matrix34455 	static scalar_type const i23() {
34456 		return -0.000008055142184;
34457 	}
34458 
i31color::constant::lms::matrix34459 	static scalar_type const i31() {
34460 		return 0;
34461 	}
i32color::constant::lms::matrix34462 	static scalar_type const i32() {
34463 		return 0;
34464 	}
i33color::constant::lms::matrix34465 	static scalar_type const i33() {
34466 		return 1;
34467 	}
34468 };
34469 
34470 template< typename scalar_name >
34471 struct matrix< scalar_name, ::color::constant::lms::von_Kries_D65_entity > {
34472 	typedef scalar_name scalar_type;
34473 
a11color::constant::lms::matrix34474 	static scalar_type const a11() {
34475 		return scalar_type(0.4002);
34476 	}
a12color::constant::lms::matrix34477 	static scalar_type const a12() {
34478 		return scalar_type(0.7076);
34479 	}
a13color::constant::lms::matrix34480 	static scalar_type const a13() {
34481 		return scalar_type(-0.0808);
34482 	}
34483 
a21color::constant::lms::matrix34484 	static scalar_type const a21() {
34485 		return scalar_type(-0.2263);
34486 	}
a22color::constant::lms::matrix34487 	static scalar_type const a22() {
34488 		return scalar_type(1.1653);
34489 	}
a23color::constant::lms::matrix34490 	static scalar_type const a23() {
34491 		return scalar_type(0.0457);
34492 	}
34493 
a31color::constant::lms::matrix34494 	static scalar_type const a31() {
34495 		return scalar_type(0);
34496 	}
a32color::constant::lms::matrix34497 	static scalar_type const a32() {
34498 		return scalar_type(0);
34499 	}
a33color::constant::lms::matrix34500 	static scalar_type const a33() {
34501 		return scalar_type(0.9182);
34502 	}
34503 
i11color::constant::lms::matrix34504 	static scalar_type const i11() {
34505 		return scalar_type(1.860066612508240);
34506 	}
i12color::constant::lms::matrix34507 	static scalar_type const i12() {
34508 		return scalar_type(-1.129480078100770);
34509 	}
i13color::constant::lms::matrix34510 	static scalar_type const i13() {
34511 		return scalar_type(0.219898303049304);
34512 	}
34513 
i21color::constant::lms::matrix34514 	static scalar_type const i21() {
34515 		return scalar_type(0.361222924921148);
34516 	}
i22color::constant::lms::matrix34517 	static scalar_type const i22() {
34518 		return scalar_type(0.638804306466829);
34519 	}
i23color::constant::lms::matrix34520 	static scalar_type const i23() {
34521 		return scalar_type(-0.000007127501531);
34522 	}
34523 
i31color::constant::lms::matrix34524 	static scalar_type const i31() {
34525 		return scalar_type(0);
34526 	}
i32color::constant::lms::matrix34527 	static scalar_type const i32() {
34528 		return scalar_type(0);
34529 	}
i33color::constant::lms::matrix34530 	static scalar_type const i33() {
34531 		return scalar_type(1.089087344805050);
34532 	}
34533 };
34534 
34535 template< typename scalar_name >
34536 struct matrix< scalar_name, ::color::constant::lms::BFD_entity > {
34537 	typedef scalar_name scalar_type;
34538 
a11color::constant::lms::matrix34539 	static scalar_type const a11() {
34540 		return scalar_type(0.8951);
34541 	}
a12color::constant::lms::matrix34542 	static scalar_type const a12() {
34543 		return scalar_type(0.2664);
34544 	}
a13color::constant::lms::matrix34545 	static scalar_type const a13() {
34546 		return scalar_type(-0.1614);
34547 	}
34548 
a21color::constant::lms::matrix34549 	static scalar_type const a21() {
34550 		return scalar_type(-0.7502);
34551 	}
a22color::constant::lms::matrix34552 	static scalar_type const a22() {
34553 		return scalar_type(1.7135);
34554 	}
a23color::constant::lms::matrix34555 	static scalar_type const a23() {
34556 		return scalar_type(0.0367);
34557 	}
34558 
a31color::constant::lms::matrix34559 	static scalar_type const a31() {
34560 		return scalar_type(0.0389);
34561 	}
a32color::constant::lms::matrix34562 	static scalar_type const a32() {
34563 		return scalar_type(-0.0685);
34564 	}
a33color::constant::lms::matrix34565 	static scalar_type const a33() {
34566 		return scalar_type(1.0296);
34567 	}
34568 
i11color::constant::lms::matrix34569 	static scalar_type const i11() {
34570 		return 0.986992905466712;
34571 	}
i12color::constant::lms::matrix34572 	static scalar_type const i12() {
34573 		return -0.147054256420990;
34574 	}
i13color::constant::lms::matrix34575 	static scalar_type const i13() {
34576 		return 0.159962651663731;
34577 	}
34578 
i21color::constant::lms::matrix34579 	static scalar_type const i21() {
34580 		return 0.432305269723394;
34581 	}
i22color::constant::lms::matrix34582 	static scalar_type const i22() {
34583 		return 0.518360271536777;
34584 	}
i23color::constant::lms::matrix34585 	static scalar_type const i23() {
34586 		return 0.049291228212856;
34587 	}
34588 
i31color::constant::lms::matrix34589 	static scalar_type const i31() {
34590 		return -0.008528664575177;
34591 	}
i32color::constant::lms::matrix34592 	static scalar_type const i32() {
34593 		return 0.040042821654085;
34594 	}
i33color::constant::lms::matrix34595 	static scalar_type const i33() {
34596 		return 0.968486695787550;
34597 	}
34598 };
34599 
34600 template< typename scalar_name >
34601 struct matrix< scalar_name, ::color::constant::lms::MCAT02_entity > {
34602 	typedef scalar_name scalar_type;
34603 
a11color::constant::lms::matrix34604 	static scalar_type const a11() {
34605 		return scalar_type(0.7328);
34606 	}
a12color::constant::lms::matrix34607 	static scalar_type const a12() {
34608 		return scalar_type(0.4296);
34609 	}
a13color::constant::lms::matrix34610 	static scalar_type const a13() {
34611 		return scalar_type(-0.1624);
34612 	}
34613 
a21color::constant::lms::matrix34614 	static scalar_type const a21() {
34615 		return scalar_type(-0.7036);
34616 	}
a22color::constant::lms::matrix34617 	static scalar_type const a22() {
34618 		return scalar_type(1.6975);
34619 	}
a23color::constant::lms::matrix34620 	static scalar_type const a23() {
34621 		return scalar_type(0.0061);
34622 	}
34623 
a31color::constant::lms::matrix34624 	static scalar_type const a31() {
34625 		return scalar_type(0.0030);
34626 	}
a32color::constant::lms::matrix34627 	static scalar_type const a32() {
34628 		return scalar_type(0.0136);
34629 	}
a33color::constant::lms::matrix34630 	static scalar_type const a33() {
34631 		return scalar_type(0.9834);
34632 	}
34633 
i11color::constant::lms::matrix34634 	static scalar_type const i11() {
34635 		return 1.096123820835510 ;
34636 	}
i12color::constant::lms::matrix34637 	static scalar_type const i12() {
34638 		return -0.278869000218287;
34639 	}
i13color::constant::lms::matrix34640 	static scalar_type const i13() {
34641 		return 0.182745179382773;
34642 	}
34643 
i21color::constant::lms::matrix34644 	static scalar_type const i21() {
34645 		return 0.454369041975359 ;
34646 	}
i22color::constant::lms::matrix34647 	static scalar_type const i22() {
34648 		return 0.473533154307412 ;
34649 	}
i23color::constant::lms::matrix34650 	static scalar_type const i23() {
34651 		return 0.072097803717229;
34652 	}
34653 
i31color::constant::lms::matrix34654 	static scalar_type const i31() {
34655 		return -0.009627608738429 ;
34656 	}
i32color::constant::lms::matrix34657 	static scalar_type const i32() {
34658 		return -0.005698031216113 ;
34659 	}
i33color::constant::lms::matrix34660 	static scalar_type const i33() {
34661 		return 1.015325639954540;
34662 	}
34663 };
34664 
34665 }
34666 }
34667 }
34668 
34669 namespace color {
34670 namespace _internal {
34671 namespace lms {
34672 namespace bound {
34673 
34674 template< typename index_name, typename scalar_name, ::color::constant::lms::reference_enum reference_number >
34675 struct scalar {
34676 public:
34677 	typedef scalar_name scalar_type;
34678 	typedef index_name index_type;
34679 
34680 	typedef ::color::constant::lms::matrix< scalar_type, reference_number > matrix_type;
34681 
34682 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
34683 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
34684 
34685 	typedef typename trait_type::instance_type instance_type;
34686 	typedef typename trait_type::return_image_type return_image_type;
34687 
34688 	typedef typename index_trait_type::instance_type index_instance_type;
34689 	typedef typename index_trait_type::model_type index_input_const_type;
34690 
34691 	typedef ::color::_internal::lms::bound::scalar< index_type, scalar_type, reference_number > this_type;
34692 
maxcolor::_internal::lms::bound::scalar34693 	static scalar_type max(scalar_type const& s) {
34694 		return (scalar_type(0) < s) ? s : scalar_type(0);
34695 	}
mincolor::_internal::lms::bound::scalar34696 	static scalar_type min(scalar_type const& s) {
34697 		return (s < scalar_type(0)) ? s : scalar_type(0);
34698 	}
34699 
l_maxcolor::_internal::lms::bound::scalar34700 	static scalar_type l_max() {
34701 		return scalar_type(100) * (this_type::max(matrix_type::a11()) + this_type::max(matrix_type::a12()) + this_type::max(matrix_type::a13()));
34702 	}
l_mincolor::_internal::lms::bound::scalar34703 	static scalar_type l_min() {
34704 		return scalar_type(100) * (this_type::min(matrix_type::a11()) + this_type::min(matrix_type::a12()) + this_type::min(matrix_type::a13()));
34705 	}
34706 
m_maxcolor::_internal::lms::bound::scalar34707 	static scalar_type m_max() {
34708 		return scalar_type(100) * (this_type::max(matrix_type::a21()) + this_type::max(matrix_type::a22()) + this_type::max(matrix_type::a23()));
34709 	}
m_mincolor::_internal::lms::bound::scalar34710 	static scalar_type m_min() {
34711 		return scalar_type(100) * (this_type::min(matrix_type::a21()) + this_type::min(matrix_type::a22()) + this_type::min(matrix_type::a23()));
34712 	}
34713 
s_maxcolor::_internal::lms::bound::scalar34714 	static scalar_type s_max() {
34715 		return scalar_type(100) * (this_type::max(matrix_type::a31()) + this_type::max(matrix_type::a32()) + this_type::max(matrix_type::a33()));
34716 	}
s_mincolor::_internal::lms::bound::scalar34717 	static scalar_type s_min() {
34718 		return scalar_type(100) * (this_type::min(matrix_type::a31()) + this_type::min(matrix_type::a32()) + this_type::min(matrix_type::a33()));
34719 	}
34720 
34721 	template< index_instance_type index >
maximumcolor::_internal::lms::bound::scalar34722 	static return_image_type maximum() {
34723 		static scalar_type max_list[] = { this_type::l_max(), this_type::m_max(), this_type::s_max() };
34724 		return max_list[index];
34725 	}
34726 
maximumcolor::_internal::lms::bound::scalar34727 	static return_image_type maximum(index_input_const_type index) {
34728 		static scalar_type max_list[] = { this_type::l_max(), this_type::m_max(), this_type::s_max() };
34729 		return max_list[index];
34730 	}
34731 
34732 	template< index_instance_type index >
minimumcolor::_internal::lms::bound::scalar34733 	static return_image_type minimum() {
34734 		static scalar_type min_list[] = { this_type::l_min(), this_type::m_min(), this_type::s_min() };
34735 		return min_list[index];
34736 	}
34737 
minimumcolor::_internal::lms::bound::scalar34738 	static return_image_type minimum(index_input_const_type index) {
34739 		static scalar_type min_list[] = { this_type::l_min(), this_type::m_min(), this_type::s_min() };
34740 		return min_list[index];
34741 	}
34742 
34743 	template< index_instance_type index >
rangecolor::_internal::lms::bound::scalar34744 	static return_image_type range() {
34745 		static instance_type range_list[] = { this_type::l_max() - this_type::l_min(), this_type::m_max() - this_type::m_min(), this_type::s_max() - this_type::s_min() };
34746 		return range_list[index];
34747 	}
34748 
rangecolor::_internal::lms::bound::scalar34749 	static return_image_type range(index_input_const_type index) {
34750 		static instance_type range_list[] = { this_type::l_max() - this_type::l_min(), this_type::m_max() - this_type::m_min(), this_type::s_max() - this_type::s_min() };
34751 		return range_list[index];
34752 	}
34753 };
34754 
34755 }
34756 }
34757 }
34758 }
34759 
34760 namespace color {
34761 namespace trait {
34762 
34763 template< ::color::constant::lms::reference_enum reference_number >
34764 struct bound< ::color::category::lms_float<reference_number> >
34765 	: public ::color::_internal::lms::bound::scalar< typename ::color::trait::index< ::color::category::lms_float<reference_number> >::instance_type, float, reference_number > {
34766 };
34767 
34768 template< ::color::constant::lms::reference_enum reference_number >
34769 struct bound< ::color::category::lms_double<reference_number> >
34770 	: public ::color::_internal::lms::bound::scalar< typename ::color::trait::index< ::color::category::lms_double<reference_number> >::instance_type, double, reference_number > {
34771 };
34772 
34773 template< ::color::constant::lms::reference_enum reference_number >
34774 struct bound< ::color::category::lms_ldouble<reference_number> >
34775 	: public ::color::_internal::lms::bound::scalar< typename ::color::trait::index< ::color::category::lms_ldouble<reference_number> >::instance_type, long double, reference_number > {
34776 };
34777 
34778 }
34779 }
34780 
34781 namespace color {
34782 namespace trait {
34783 
34784 template< ::color::constant::lms::reference_enum reference_number >
34785 struct component< ::color::category::lms_uint8<reference_number> >
34786 	: public ::color::_internal::utility::component::array< std::uint8_t > {
34787 };
34788 
34789 template< ::color::constant::lms::reference_enum reference_number >
34790 struct component< ::color::category::lms_uint16<reference_number> >
34791 	: public ::color::_internal::utility::component::array< std::uint16_t > {
34792 };
34793 
34794 template< ::color::constant::lms::reference_enum reference_number >
34795 struct component< ::color::category::lms_uint32<reference_number> >
34796 	: public ::color::_internal::utility::component::array< std::uint32_t > {
34797 };
34798 
34799 template< ::color::constant::lms::reference_enum reference_number >
34800 struct component< ::color::category::lms_uint64<reference_number> >
34801 	: public ::color::_internal::utility::component::array< std::uint64_t > {
34802 };
34803 
34804 }
34805 }
34806 namespace color {
34807 namespace trait {
34808 
34809 template< ::color::constant::lms::reference_enum reference_number >
34810 struct component< ::color::category::lms_float<reference_number> >
34811 	: public ::color::_internal::utility::component::array< float > {
34812 };
34813 
34814 template< ::color::constant::lms::reference_enum reference_number >
34815 struct component< ::color::category::lms_double<reference_number> >
34816 	: public ::color::_internal::utility::component::array< double > {
34817 };
34818 
34819 template< ::color::constant::lms::reference_enum reference_number >
34820 struct component< ::color::category::lms_ldouble<reference_number> >
34821 	: public ::color::_internal::utility::component::array< long double > {
34822 };
34823 
34824 }
34825 }
34826 
34827 namespace color {
34828 namespace trait {
34829 
34830 template< ::color::constant::lms::reference_enum reference_number >
34831 struct container< ::color::category::lms_float<reference_number> >
34832 	: public ::color::_internal::utility::container::array< float, 3 > {
34833 };
34834 
34835 template< ::color::constant::lms::reference_enum reference_number >
34836 struct container< ::color::category::lms_double<reference_number> >
34837 	: public ::color::_internal::utility::container::array< double, 3 > {
34838 };
34839 
34840 template< ::color::constant::lms::reference_enum reference_number >
34841 struct container< ::color::category::lms_ldouble<reference_number> >
34842 	: public ::color::_internal::utility::container::array< long double, 3 > {
34843 };
34844 
34845 }
34846 }
34847 
34848 namespace color {
34849 namespace trait {
34850 
34851 template< ::color::constant::lms::reference_enum reference_number >
34852 struct container< ::color::category::lms_uint8<reference_number> >
34853 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
34854 };
34855 
34856 template< ::color::constant::lms::reference_enum reference_number >
34857 struct container< ::color::category::lms_uint16<reference_number> >
34858 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
34859 };
34860 
34861 template< ::color::constant::lms::reference_enum reference_number >
34862 struct container< ::color::category::lms_uint32<reference_number> >
34863 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
34864 };
34865 
34866 template< ::color::constant::lms::reference_enum reference_number >
34867 struct container< ::color::category::lms_uint64<reference_number> >
34868 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
34869 };
34870 
34871 }
34872 }
34873 
34874 namespace color {
34875 
34876 template< typename type_name, ::color::constant::lms::reference_enum reference_number = ::color::constant::lms::von_Kries_D65_entity >
34877 using lms = ::color::model< typename ::color::category::lms< type_name, reference_number > >;
34878 
34879 }
34880 
34881 namespace color {
34882 namespace place {
34883 namespace _internal {
34884 
34885 template< typename tag_name, ::color::constant::lms::reference_enum reference_number >
34886 struct lightness< ::color::category::lms< tag_name, reference_number > > {
34887 public:
34888 	typedef ::color::category::lms< tag_name, reference_number > category_type;
34889 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
34890 
34891 	enum { position_enum = 0 };
34892 	enum { has_enum = true };
34893 
positioncolor::place::_internal::lightness34894 	static index_instance_type position() {
34895 		return position_enum;
34896 	}
34897 };
34898 
34899 }
34900 }
34901 }
34902 
34903 namespace color {
34904 namespace get {
34905 
34906 template< typename tag_name, ::color::constant::lms::reference_enum reference_number >
34907 inline
34908 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::lms<tag_name,reference_number> >::akin_type >::return_type
gray(::color::model<::color::category::lms<tag_name,reference_number>> const & color_parameter)34909 gray(::color::model< ::color::category::lms<tag_name,reference_number> > const& color_parameter) {
34910 	typedef ::color::category::lms< tag_name, reference_number > category_type;
34911 	typedef typename ::color::akin::gray< category_type >::akin_type akin_category_type;
34912 	typedef ::color::_internal::reformat< akin_category_type, category_type > reformat_type;
34913 	enum {
34914 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
34915 	};
34916 	enum {
34917 		gray_p = ::color::place::_internal::gray<akin_category_type>::position_enum
34918 	};
34919 	return reformat_type::template process<gray_p,lightness_p>(color_parameter.template get<lightness_p>());
34920 }
34921 
34922 }
34923 }
34924 
34925 namespace color {
34926 namespace get {
34927 
34928 template< typename tag_name, ::color::constant::lms::reference_enum reference_number >
34929 inline
34930 typename ::color::model< ::color::category::lms< tag_name,reference_number> >::component_const_type
lightness(::color::model<::color::category::lms<tag_name,reference_number>> const & color_parameter)34931 lightness(::color::model< ::color::category::lms<tag_name,reference_number> > const& color_parameter) {
34932 	typedef ::color::category::lms<tag_name,reference_number> category_type;
34933 	enum {
34934 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
34935 	};
34936 	return color_parameter.template get<lightness_p>();
34937 }
34938 
34939 }
34940 }
34941 
34942 namespace color {
34943 namespace set {
34944 
34945 template< typename tag_name, ::color::constant::lms::reference_enum lms_reference_number >
34946 inline
34947 void
gray(::color::model<::color::category::lms<tag_name,lms_reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::lms<tag_name,lms_reference_number>>::akin_type>::model_type component_parameter)34948 gray
34949 (
34950 	::color::model< ::color::category::lms< tag_name, lms_reference_number > > & color_parameter
34951 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::lms< tag_name, lms_reference_number > >::akin_type >::model_type component_parameter
34952 ) {
34953 	typedef ::color::category::lms< tag_name, lms_reference_number > category_type;
34954 	typedef typename ::color::akin::gray< category_type >::akin_type akin_category_type;
34955 	typedef ::color::_internal::reformat< category_type, akin_category_type > reformat_type;
34956 	enum {
34957 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
34958 	};
34959 	enum {
34960 		gray_p = ::color::place::_internal::lightness<akin_category_type>::position_enum
34961 	};
34962 	color_parameter.template set<lightness_p>(reformat_type::template process<lightness_p,gray_p>(component_parameter));
34963 }
34964 
34965 }
34966 }
34967 
34968 namespace color {
34969 namespace set {
34970 template< typename tag_name, ::color::constant::lms::reference_enum reference_number >
34971 inline
34972 void
lightness(::color::model<::color::category::lms<tag_name,reference_number>> & color_parameter,typename::color::model<::color::category::lms<tag_name,reference_number>>::component_input_const_type component_parameter)34973 lightness
34974 (
34975 	::color::model< ::color::category::lms<tag_name,reference_number> > & color_parameter,
34976 	typename ::color::model< ::color::category::lms<tag_name,reference_number> >::component_input_const_type component_parameter
34977 ) {
34978 	typedef ::color::category::lms<tag_name,reference_number> category_type;
34979 	enum {
34980 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
34981 	};
34982 	color_parameter.template set<lightness_p>(component_parameter);
34983 }
34984 
34985 }
34986 }
34987 
34988 namespace color {
34989 namespace set {
34990 
34991 template< typename tag_name, ::color::constant::lms::reference_enum lms_reference_number >
34992 inline
34993 void
red(::color::model<::color::category::lms<tag_name,lms_reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::lms<tag_name,lms_reference_number>>::akin_type>::model_type component_parameter)34994 red
34995 (
34996 	::color::model< ::color::category::lms< tag_name, lms_reference_number > > & color_parameter
34997 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::lms< tag_name, lms_reference_number > >::akin_type >::model_type component_parameter
34998 ) {
34999 	typedef ::color::category::lms< tag_name, lms_reference_number > category_type;
35000 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
35001 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
35002 	::color::model< akin_type > rgb(color_parameter);
35003 	rgb.template set< red_p > (component_parameter);
35004 	color_parameter = rgb;
35005 }
35006 
35007 }
35008 }
35009 
35010 namespace color {
35011 namespace set {
35012 
35013 template< typename tag_name, ::color::constant::lms::reference_enum lms_reference_number >
35014 inline
35015 void
green(::color::model<::color::category::lms<tag_name,lms_reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::lms<tag_name,lms_reference_number>>::akin_type>::model_type component_parameter)35016 green
35017 (
35018 	::color::model< ::color::category::lms< tag_name, lms_reference_number > > & color_parameter
35019 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::lms< tag_name, lms_reference_number > >::akin_type >::model_type component_parameter
35020 ) {
35021 	typedef ::color::category::lms< tag_name, lms_reference_number > category_type;
35022 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
35023 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
35024 	::color::model< akin_type > rgb(color_parameter);
35025 	rgb.template set< green_p > (component_parameter);
35026 	color_parameter = rgb;
35027 }
35028 
35029 }
35030 }
35031 
35032 namespace color {
35033 namespace set {
35034 
35035 template< typename tag_name, ::color::constant::lms::reference_enum reference_number >
35036 inline
35037 void
blue(::color::model<::color::category::lms<tag_name,reference_number>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::lms<tag_name,reference_number>>::akin_type>::model_type component_parameter)35038 blue
35039 (
35040 	::color::model< ::color::category::lms< tag_name, reference_number > > & color_parameter
35041 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::lms< tag_name, reference_number > >::akin_type >::model_type component_parameter
35042 ) {
35043 	typedef ::color::category::lms< tag_name, reference_number > category_type;
35044 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
35045 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
35046 	::color::model< akin_type > rgb(color_parameter);
35047 	rgb.template set<blue_p > (component_parameter);
35048 	color_parameter = rgb;
35049 }
35050 
35051 }
35052 }
35053 
35054 namespace color {
35055 namespace _internal {
35056 
35057 template
35058 <
35059 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35060 	,typename gray_tag_name
35061 	>
35062 struct convert
35063 	<
35064 	::color::category::lms< lms_tag_name, lms_reference_number >
35065 	,::color::category::gray< gray_tag_name >
35066 	> {
35067 public:
35068 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35069 	typedef ::color::category::gray< gray_tag_name > gray_category_type, category_right_type;
35070 
35071 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35072 
35073 	typedef ::color::model< lms_category_type > lms_model_type;
35074 	typedef ::color::model< gray_category_type > gray_model_type;
35075 
35076 	typedef ::color::xyz< scalar_type > xyz_model_type;
35077 
35078 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35079 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35080 
35081 	typedef typename container_left_trait_type::input_type container_left_input_type;
35082 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35083 
processcolor::_internal::convert35084 	static void process
35085 	(
35086 		container_left_input_type left
35087 		,container_right_const_input_type right
35088 	) {
35089 		left = lms_model_type(xyz_model_type(gray_model_type(right))).container();
35090 	}
35091 };
35092 
35093 }
35094 }
35095 
35096 namespace color {
35097 namespace _internal {
35098 
35099 template
35100 <
35101 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35102 	,typename cmy_tag_name
35103 	>
35104 struct convert
35105 	<
35106 	::color::category::lms< lms_tag_name, lms_reference_number >
35107 	,::color::category::cmy< cmy_tag_name >
35108 	> {
35109 public:
35110 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35111 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_right_type;
35112 
35113 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35114 
35115 	typedef ::color::model< cmy_category_type > cmy_model_type;
35116 	typedef ::color::model< lms_category_type > lms_model_type;
35117 
35118 	typedef ::color::rgb< scalar_type > rgb_model_type;
35119 	typedef ::color::xyz< scalar_type > xyz_model_type;
35120 
35121 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35122 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35123 
35124 	typedef typename container_left_trait_type::input_type container_left_input_type;
35125 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35126 
processcolor::_internal::convert35127 	static void process
35128 	(
35129 		container_left_input_type left
35130 		,container_right_const_input_type right
35131 	) {
35132 		left = lms_model_type(xyz_model_type(rgb_model_type(cmy_model_type(right)))).container();
35133 	}
35134 };
35135 
35136 }
35137 }
35138 
35139 namespace color {
35140 namespace _internal {
35141 
35142 template
35143 <
35144 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35145 	,typename cmyk_tag_name
35146 	>
35147 struct convert
35148 	<
35149 	::color::category::lms< lms_tag_name, lms_reference_number >
35150 	,::color::category::cmyk< cmyk_tag_name >
35151 	> {
35152 public:
35153 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35154 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
35155 
35156 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35157 
35158 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
35159 	typedef ::color::model< lms_category_type > lms_model_type;
35160 
35161 	typedef ::color::rgb< scalar_type > rgb_model_type;
35162 	typedef ::color::xyz< scalar_type > xyz_model_type;
35163 
35164 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35165 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35166 
35167 	typedef typename container_left_trait_type::input_type container_left_input_type;
35168 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35169 
processcolor::_internal::convert35170 	static void process
35171 	(
35172 		container_left_input_type left
35173 		,container_right_const_input_type right
35174 	) {
35175 		left = lms_model_type(xyz_model_type(rgb_model_type(cmyk_model_type(right)))).container();
35176 	}
35177 };
35178 
35179 }
35180 }
35181 
35182 namespace color {
35183 namespace _internal {
35184 
35185 template
35186 <
35187 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35188 	,typename hsl_tag_name
35189 	>
35190 struct convert
35191 	<
35192 	::color::category::lms< lms_tag_name, lms_reference_number >
35193 	,::color::category::hsl< hsl_tag_name >
35194 	> {
35195 public:
35196 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35197 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
35198 
35199 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35200 
35201 	typedef ::color::model< hsl_category_type > hsl_model_type;
35202 	typedef ::color::model< lms_category_type > lms_model_type;
35203 
35204 	typedef ::color::rgb< scalar_type > rgb_model_type;
35205 	typedef ::color::xyz< scalar_type > xyz_model_type;
35206 
35207 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35208 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35209 
35210 	typedef typename container_left_trait_type::input_type container_left_input_type;
35211 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35212 
processcolor::_internal::convert35213 	static void process
35214 	(
35215 		container_left_input_type left
35216 		,container_right_const_input_type right
35217 	) {
35218 		left = lms_model_type(xyz_model_type(rgb_model_type(hsl_model_type(right)))).container();
35219 	}
35220 };
35221 
35222 }
35223 }
35224 
35225 namespace color {
35226 namespace _internal {
35227 
35228 template
35229 <
35230 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35231 	,typename hsv_tag_name
35232 	>
35233 struct convert
35234 	<
35235 	::color::category::lms< lms_tag_name, lms_reference_number >
35236 	,::color::category::hsv< hsv_tag_name >
35237 	> {
35238 public:
35239 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35240 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
35241 
35242 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35243 
35244 	typedef ::color::model< hsv_category_type > hsv_model_type;
35245 	typedef ::color::model< lms_category_type > lms_model_type;
35246 
35247 	typedef ::color::rgb< scalar_type > rgb_model_type;
35248 	typedef ::color::xyz< scalar_type > xyz_model_type;
35249 
35250 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35251 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35252 
35253 	typedef typename container_left_trait_type::input_type container_left_input_type;
35254 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35255 
processcolor::_internal::convert35256 	static void process
35257 	(
35258 		container_left_input_type left
35259 		,container_right_const_input_type right
35260 	) {
35261 		left = lms_model_type(xyz_model_type(rgb_model_type(hsv_model_type(right)))).container();
35262 	}
35263 };
35264 
35265 }
35266 }
35267 
35268 namespace color {
35269 namespace _internal {
35270 
35271 template
35272 <
35273 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35274 	,typename hsi_tag_name
35275 	>
35276 struct convert
35277 	<
35278 	::color::category::lms< lms_tag_name, lms_reference_number >
35279 	,::color::category::hsi< hsi_tag_name >
35280 	> {
35281 public:
35282 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35283 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
35284 
35285 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35286 
35287 	typedef ::color::model< hsi_category_type > hsi_model_type;
35288 	typedef ::color::model< lms_category_type > lms_model_type;
35289 
35290 	typedef ::color::rgb< scalar_type > rgb_model_type;
35291 	typedef ::color::xyz< scalar_type > xyz_model_type;
35292 
35293 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35294 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35295 
35296 	typedef typename container_left_trait_type::input_type container_left_input_type;
35297 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35298 
processcolor::_internal::convert35299 	static void process
35300 	(
35301 		container_left_input_type left
35302 		,container_right_const_input_type right
35303 	) {
35304 		left = lms_model_type(xyz_model_type(rgb_model_type(hsi_model_type(right)))).container();
35305 	}
35306 };
35307 
35308 }
35309 }
35310 
35311 namespace color {
35312 namespace _internal {
35313 
35314 template
35315 <
35316 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35317 	,typename hwb_tag_name
35318 	>
35319 struct convert
35320 	<
35321 	::color::category::lms< lms_tag_name, lms_reference_number >
35322 	,::color::category::hwb< hwb_tag_name >
35323 	> {
35324 public:
35325 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35326 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
35327 
35328 	typedef typename ::color::trait::scalar< lms_category_type >::instance_type scalar_type;
35329 
35330 	typedef ::color::model< lms_category_type > lms_model_type;
35331 	typedef ::color::model< hwb_category_type > hwb_model_type;
35332 
35333 	typedef ::color::xyz< scalar_type > xyz_model_type;
35334 	typedef ::color::rgb< scalar_type > rgb_model_type;
35335 	typedef ::color::hsv< scalar_type > hsv_model_type;
35336 
35337 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35338 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35339 
35340 	typedef typename container_left_trait_type::input_type container_left_input_type;
35341 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35342 
processcolor::_internal::convert35343 	static void process
35344 	(
35345 		container_left_input_type left
35346 		,container_right_const_input_type right
35347 	) {
35348 		left = lms_model_type(xyz_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right))))).container();
35349 	}
35350 };
35351 
35352 }
35353 }
35354 
35355 namespace color {
35356 namespace _internal {
35357 
35358 template
35359 <
35360 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35361 	,typename rgb_tag_name
35362 	>
35363 struct convert
35364 	<
35365 	::color::category::lms< lms_tag_name, lms_reference_number >
35366 	,::color::category::rgb< rgb_tag_name >
35367 	> {
35368 public:
35369 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35370 	typedef ::color::category::rgb< rgb_tag_name > rgb_category_type, category_right_type;
35371 
35372 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35373 
35374 	typedef ::color::model< lms_category_type > lms_model_type;
35375 	typedef ::color::model< rgb_category_type > rgb_model_type;
35376 
35377 	typedef ::color::xyz< scalar_type > xyz_model_type;
35378 
35379 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35380 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35381 
35382 	typedef typename container_left_trait_type::input_type container_left_input_type;
35383 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35384 
processcolor::_internal::convert35385 	static void process
35386 	(
35387 		container_left_input_type left
35388 		,container_right_const_input_type right
35389 	) {
35390 		left = lms_model_type(xyz_model_type(rgb_model_type(right))).container();
35391 	}
35392 };
35393 
35394 }
35395 }
35396 
35397 namespace color {
35398 namespace _internal {
35399 
35400 template
35401 <
35402 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35403 	,typename yiq_tag_name
35404 	>
35405 struct convert
35406 	<
35407 	::color::category::lms< lms_tag_name, lms_reference_number >
35408 	,::color::category::yiq< yiq_tag_name >
35409 	> {
35410 public:
35411 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35412 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
35413 
35414 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35415 
35416 	typedef ::color::model< yiq_category_type > yiq_model_type;
35417 	typedef ::color::model< lms_category_type > lms_model_type;
35418 
35419 	typedef ::color::rgb< scalar_type > rgb_model_type;
35420 	typedef ::color::xyz< scalar_type > xyz_model_type;
35421 
35422 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35423 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35424 
35425 	typedef typename container_left_trait_type::input_type container_left_input_type;
35426 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35427 
processcolor::_internal::convert35428 	static void process
35429 	(
35430 		container_left_input_type left
35431 		,container_right_const_input_type right
35432 	) {
35433 		left = lms_model_type(xyz_model_type(rgb_model_type(yiq_model_type(right)))).container();
35434 	}
35435 };
35436 
35437 }
35438 }
35439 
35440 namespace color {
35441 namespace _internal {
35442 
35443 template
35444 <
35445 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35446 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
35447 	>
35448 struct convert
35449 	<
35450 	::color::category::lms< lms_tag_name, lms_reference_number >
35451 	,::color::category::yuv< yuv_tag_name, yuv_reference_number >
35452 	> {
35453 public:
35454 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35455 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_right_type;
35456 
35457 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35458 
35459 	typedef ::color::model< yuv_category_type > yuv_model_type;
35460 	typedef ::color::model< lms_category_type > lms_model_type;
35461 
35462 	typedef ::color::rgb< scalar_type > rgb_model_type;
35463 	typedef ::color::xyz< scalar_type > xyz_model_type;
35464 
35465 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35466 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35467 
35468 	typedef typename container_left_trait_type::input_type container_left_input_type;
35469 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35470 
processcolor::_internal::convert35471 	static void process
35472 	(
35473 		container_left_input_type left
35474 		,container_right_const_input_type right
35475 	) {
35476 		left = lms_model_type(xyz_model_type(rgb_model_type(yuv_model_type(right)))).container();
35477 	}
35478 };
35479 
35480 }
35481 }
35482 
35483 namespace color {
35484 namespace _internal {
35485 
35486 template
35487 <
35488 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35489 	,typename YCgCo_tag_name
35490 	>
35491 struct convert
35492 	<
35493 	::color::category::lms< lms_tag_name, lms_reference_number >
35494 	,::color::category::YCgCo< YCgCo_tag_name >
35495 	> {
35496 public:
35497 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35498 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
35499 
35500 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35501 
35502 	typedef ::color::model< lms_category_type > lms_model_type;
35503 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
35504 
35505 	typedef ::color::rgb< scalar_type > rgb_model_type;
35506 	typedef ::color::xyz< scalar_type > xyz_model_type;
35507 
35508 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35509 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35510 
35511 	typedef typename container_left_trait_type::input_type container_left_input_type;
35512 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35513 
processcolor::_internal::convert35514 	static void process
35515 	(
35516 		container_left_input_type left
35517 		,container_right_const_input_type right
35518 	) {
35519 		left = lms_model_type(xyz_model_type(rgb_model_type(YCgCo_model_type(right)))).container();
35520 	}
35521 };
35522 
35523 }
35524 }
35525 
35526 namespace color {
35527 namespace _internal {
35528 
35529 template
35530 <
35531 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35532 	,typename YDbDr_tag_name
35533 	>
35534 struct convert
35535 	<
35536 	::color::category::lms< lms_tag_name, lms_reference_number >
35537 	,::color::category::YDbDr< YDbDr_tag_name >
35538 	> {
35539 public:
35540 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35541 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
35542 
35543 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35544 
35545 	typedef ::color::model< lms_category_type > lms_model_type;
35546 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
35547 
35548 	typedef ::color::rgb< scalar_type > rgb_model_type;
35549 	typedef ::color::xyz< scalar_type > xyz_model_type;
35550 
35551 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35552 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35553 
35554 	typedef typename container_left_trait_type::input_type container_left_input_type;
35555 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35556 
processcolor::_internal::convert35557 	static void process
35558 	(
35559 		container_left_input_type left
35560 		,container_right_const_input_type right
35561 	) {
35562 		left = lms_model_type(xyz_model_type(rgb_model_type(YDbDr_model_type(right)))).container();
35563 	}
35564 };
35565 
35566 }
35567 }
35568 
35569 namespace color {
35570 namespace _internal {
35571 
35572 template
35573 <
35574 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35575 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
35576 	>
35577 struct convert
35578 	<
35579 	::color::category::lms< lms_tag_name, lms_reference_number >
35580 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
35581 	> {
35582 public:
35583 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35584 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_right_type;
35585 
35586 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35587 
35588 	typedef ::color::model< lms_category_type > lms_model_type;
35589 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
35590 
35591 	typedef ::color::rgb< scalar_type > rgb_model_type;
35592 	typedef ::color::xyz< scalar_type > xyz_model_type;
35593 
35594 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35595 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35596 
35597 	typedef typename container_left_trait_type::input_type container_left_input_type;
35598 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35599 
processcolor::_internal::convert35600 	static void process
35601 	(
35602 		container_left_input_type left
35603 		,container_right_const_input_type right
35604 	) {
35605 		left = lms_model_type(xyz_model_type(rgb_model_type(YPbPr_model_type(right)))).container();
35606 	}
35607 };
35608 
35609 }
35610 }
35611 
35612 namespace color {
35613 namespace _internal {
35614 
35615 template
35616 <
35617 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35618 	,typename xyz_tag_name
35619 	>
35620 struct convert
35621 	<
35622 	::color::category::lms< lms_tag_name, lms_reference_number >
35623 	,::color::category::xyz< xyz_tag_name >
35624 	> {
35625 public:
35626 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35627 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
35628 
35629 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35630 
35631 	typedef ::color::category::lms< scalar_type, lms_reference_number > lmsSCALAR_category_type;
35632 	typedef ::color::category::xyz< scalar_type > xyzSCALAR_category_type;
35633 
35634 	typedef ::color::model< lms_category_type > lms_model_type;
35635 	typedef ::color::model< xyz_category_type > xyz_model_type;
35636 
35637 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35638 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35639 
35640 	typedef typename container_left_trait_type::input_type container_left_input_type;
35641 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35642 
35643 	typedef ::color::_internal::reformat< lms_category_type, lmsSCALAR_category_type > reformatLMS_type;
35644 	typedef ::color::_internal::reformat< xyzSCALAR_category_type, xyz_category_type > reformatXYZ_type;
35645 
35646 	typedef ::color::constant::lms::matrix< scalar_type, lms_reference_number > matrix_type;
35647 
35648 	typedef ::color::constant::xyz::illuminant::point< scalar_type, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > white_point_type;
35649 
processcolor::_internal::convert35650 	static void process
35651 	(
35652 		container_left_input_type left
35653 		,container_right_const_input_type right
35654 	) {
35655 		scalar_type x = reformatXYZ_type::template process<0,0>(container_right_trait_type::template get<0>(right));
35656 		scalar_type y = reformatXYZ_type::template process<1,1>(container_right_trait_type::template get<1>(right));
35657 		scalar_type z = reformatXYZ_type::template process<2,2>(container_right_trait_type::template get<2>(right));
35658 		scalar_type l = matrix_type::a11() * x + matrix_type::a12() * y + matrix_type::a13() * z;
35659 		scalar_type m = matrix_type::a21() * x + matrix_type::a22() * y + matrix_type::a23() * z;
35660 		scalar_type s = matrix_type::a31() * x + matrix_type::a32() * y + matrix_type::a33() * z;
35661 		container_left_trait_type::template set<0>(left, reformatLMS_type::template process< 0, 0>(l));
35662 		container_left_trait_type::template set<1>(left, reformatLMS_type::template process< 1, 1>(m));
35663 		container_left_trait_type::template set<2>(left, reformatLMS_type::template process< 2, 2>(s));
35664 	}
35665 
35666 };
35667 
35668 }
35669 }
35670 
35671 namespace color {
35672 namespace _internal {
35673 
35674 template
35675 <
35676 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35677 	,typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
35678 	>
35679 struct convert
35680 	<
35681 	::color::category::lms< lms_tag_name, lms_reference_number >
35682 	,::color::category::lab< lab_tag_name, lab_reference_number >
35683 	> {
35684 public:
35685 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35686 	typedef ::color::category::lab< lab_tag_name, lab_reference_number > lab_category_type, category_right_type;
35687 
35688 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35689 
35690 	typedef ::color::model< lms_category_type > lms_model_type;
35691 	typedef ::color::model< lab_category_type > lab_model_type;
35692 
35693 	typedef ::color::xyz< scalar_type > xyz_model_type;
35694 
35695 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35696 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35697 
35698 	typedef typename container_left_trait_type::input_type container_left_input_type;
35699 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35700 
processcolor::_internal::convert35701 	static void process
35702 	(
35703 		container_left_input_type left
35704 		,container_right_const_input_type right
35705 	) {
35706 		left = lms_model_type(xyz_model_type(lab_model_type(right))).container();
35707 	}
35708 };
35709 
35710 }
35711 }
35712 namespace color {
35713 namespace _internal {
35714 
35715 template
35716 <
35717 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
35718 	,typename xyy_tag_name
35719 	>
35720 struct convert
35721 	<
35722 	::color::category::lms< lms_tag_name, lms_reference_number >
35723 	,::color::category::xyy< xyy_tag_name >
35724 	> {
35725 public:
35726 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
35727 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
35728 
35729 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35730 
35731 	typedef ::color::model< lms_category_type > lms_model_type;
35732 	typedef ::color::model< xyy_category_type > xyy_model_type;
35733 
35734 	typedef ::color::xyz< scalar_type > xyz_model_type;
35735 
35736 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35737 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35738 
35739 	typedef typename container_left_trait_type::input_type container_left_input_type;
35740 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35741 
processcolor::_internal::convert35742 	static void process
35743 	(
35744 		container_left_input_type left
35745 		,container_right_const_input_type right
35746 	) {
35747 		left = lms_model_type(xyz_model_type(xyy_model_type(right))).container();
35748 	}
35749 };
35750 
35751 }
35752 }
35753 namespace color {
35754 namespace _internal {
35755 
35756 template
35757 <
35758 	typename tag_left_name, ::color::constant::lms::reference_enum left_reference_number
35759 	,typename tag_right_name, ::color::constant::lms::reference_enum right_reference_number
35760 	>
35761 struct convert
35762 	<
35763 	::color::category::lms< tag_left_name, left_reference_number >
35764 	,::color::category::lms< tag_right_name, right_reference_number >
35765 	> {
35766 public:
35767 	typedef ::color::category::lms< tag_left_name, left_reference_number> category_left_type;
35768 	typedef ::color::category::lms< tag_right_name, right_reference_number> category_right_type;
35769 
35770 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
35771 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
35772 
35773 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
35774 
35775 	typedef typename container_left_trait_type::input_type container_left_input_type;
35776 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
35777 
processcolor::_internal::convert35778 	static void process
35779 	(
35780 		container_left_input_type left
35781 		,container_right_const_input_type right
35782 	) {
35783 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
35784 		container_left_trait_type::template set<1>(left, reformat_type::template process<1,1>(container_right_trait_type::template get<1>(right)));
35785 		container_left_trait_type::template set<2>(left, reformat_type::template process<2,2>(container_right_trait_type::template get<2>(right)));
35786 	}
35787 };
35788 
35789 }
35790 }
35791 
35792 namespace color {
35793 namespace akin {
35794 
35795 template< >struct luv< ::color::category::gray_uint8 > {
35796 	typedef ::color::category::luv_uint8 akin_type;
35797 };
35798 template< >struct luv< ::color::category::gray_uint16 > {
35799 	typedef ::color::category::luv_uint16 akin_type;
35800 };
35801 template< >struct luv< ::color::category::gray_uint32 > {
35802 	typedef ::color::category::luv_uint32 akin_type;
35803 };
35804 template< >struct luv< ::color::category::gray_uint64 > {
35805 	typedef ::color::category::luv_uint64 akin_type;
35806 };
35807 template< >struct luv< ::color::category::gray_float > {
35808 	typedef ::color::category::luv_float akin_type;
35809 };
35810 template< >struct luv< ::color::category::gray_double > {
35811 	typedef ::color::category::luv_double akin_type;
35812 };
35813 template< >struct luv< ::color::category::gray_ldouble > {
35814 	typedef ::color::category::luv_ldouble akin_type;
35815 };
35816 
35817 }
35818 }
35819 
35820 namespace color {
35821 namespace akin {
35822 
35823 template< >struct luv< ::color::category::cmy_uint8 > {
35824 	typedef ::color::category::luv_uint8 akin_type;
35825 };
35826 template< >struct luv< ::color::category::cmy_uint16 > {
35827 	typedef ::color::category::luv_uint16 akin_type;
35828 };
35829 template< >struct luv< ::color::category::cmy_uint32 > {
35830 	typedef ::color::category::luv_uint32 akin_type;
35831 };
35832 template< >struct luv< ::color::category::cmy_uint64 > {
35833 	typedef ::color::category::luv_uint64 akin_type;
35834 };
35835 template< >struct luv< ::color::category::cmy_float > {
35836 	typedef ::color::category::luv_float akin_type;
35837 };
35838 template< >struct luv< ::color::category::cmy_double > {
35839 	typedef ::color::category::luv_double akin_type;
35840 };
35841 template< >struct luv< ::color::category::cmy_ldouble > {
35842 	typedef ::color::category::luv_ldouble akin_type;
35843 };
35844 
35845 }
35846 }
35847 
35848 namespace color {
35849 namespace akin {
35850 
35851 template< >struct luv< ::color::category::cmyk_uint8 > {
35852 	typedef ::color::category::luv_uint8 akin_type;
35853 };
35854 template< >struct luv< ::color::category::cmyk_uint16 > {
35855 	typedef ::color::category::luv_uint16 akin_type;
35856 };
35857 template< >struct luv< ::color::category::cmyk_uint32 > {
35858 	typedef ::color::category::luv_uint32 akin_type;
35859 };
35860 template< >struct luv< ::color::category::cmyk_uint64 > {
35861 	typedef ::color::category::luv_uint64 akin_type;
35862 };
35863 template< >struct luv< ::color::category::cmyk_float > {
35864 	typedef ::color::category::luv_float akin_type;
35865 };
35866 template< >struct luv< ::color::category::cmyk_double > {
35867 	typedef ::color::category::luv_double akin_type;
35868 };
35869 template< >struct luv< ::color::category::cmyk_ldouble > {
35870 	typedef ::color::category::luv_ldouble akin_type;
35871 };
35872 
35873 }
35874 }
35875 
35876 namespace color {
35877 namespace akin {
35878 
35879 template< >struct luv< ::color::category::hsl_uint8 > {
35880 	typedef ::color::category::luv_uint8 akin_type;
35881 };
35882 template< >struct luv< ::color::category::hsl_uint16 > {
35883 	typedef ::color::category::luv_uint16 akin_type;
35884 };
35885 template< >struct luv< ::color::category::hsl_uint32 > {
35886 	typedef ::color::category::luv_uint32 akin_type;
35887 };
35888 template< >struct luv< ::color::category::hsl_uint64 > {
35889 	typedef ::color::category::luv_uint64 akin_type;
35890 };
35891 template< >struct luv< ::color::category::hsl_float > {
35892 	typedef ::color::category::luv_float akin_type;
35893 };
35894 template< >struct luv< ::color::category::hsl_double > {
35895 	typedef ::color::category::luv_double akin_type;
35896 };
35897 template< >struct luv< ::color::category::hsl_ldouble > {
35898 	typedef ::color::category::luv_ldouble akin_type;
35899 };
35900 
35901 }
35902 }
35903 
35904 namespace color {
35905 namespace akin {
35906 
35907 template< >struct luv< ::color::category::hsv_uint8 > {
35908 	typedef ::color::category::luv_uint8 akin_type;
35909 };
35910 template< >struct luv< ::color::category::hsv_uint16 > {
35911 	typedef ::color::category::luv_uint16 akin_type;
35912 };
35913 template< >struct luv< ::color::category::hsv_uint32 > {
35914 	typedef ::color::category::luv_uint32 akin_type;
35915 };
35916 template< >struct luv< ::color::category::hsv_uint64 > {
35917 	typedef ::color::category::luv_uint64 akin_type;
35918 };
35919 template< >struct luv< ::color::category::hsv_float > {
35920 	typedef ::color::category::luv_float akin_type;
35921 };
35922 template< >struct luv< ::color::category::hsv_double > {
35923 	typedef ::color::category::luv_double akin_type;
35924 };
35925 template< >struct luv< ::color::category::hsv_ldouble > {
35926 	typedef ::color::category::luv_ldouble akin_type;
35927 };
35928 
35929 }
35930 }
35931 
35932 namespace color {
35933 namespace akin {
35934 
35935 template< >struct luv< ::color::category::hsi_uint8 > {
35936 	typedef ::color::category::luv_uint8 akin_type;
35937 };
35938 template< >struct luv< ::color::category::hsi_uint16 > {
35939 	typedef ::color::category::luv_uint16 akin_type;
35940 };
35941 template< >struct luv< ::color::category::hsi_uint32 > {
35942 	typedef ::color::category::luv_uint32 akin_type;
35943 };
35944 template< >struct luv< ::color::category::hsi_uint64 > {
35945 	typedef ::color::category::luv_uint64 akin_type;
35946 };
35947 template< >struct luv< ::color::category::hsi_float > {
35948 	typedef ::color::category::luv_float akin_type;
35949 };
35950 template< >struct luv< ::color::category::hsi_double > {
35951 	typedef ::color::category::luv_double akin_type;
35952 };
35953 template< >struct luv< ::color::category::hsi_ldouble > {
35954 	typedef ::color::category::luv_ldouble akin_type;
35955 };
35956 
35957 }
35958 }
35959 
35960 namespace color {
35961 namespace akin {
35962 
35963 template
35964 <
35965 	typename tag_name
35966 
35967 	>
35968 struct luv< ::color::category::hwb< tag_name > > {
35969 public:
35970 	typedef ::color::category::luv< tag_name > akin_type;
35971 };
35972 
35973 }
35974 }
35975 
35976 namespace color {
35977 namespace akin {
35978 
35979 template< >struct luv< ::color::category::rgb_uint8 > {
35980 	typedef ::color::category::luv_uint8 akin_type;
35981 };
35982 template< >struct luv< ::color::category::rgb_uint16 > {
35983 	typedef ::color::category::luv_uint16 akin_type;
35984 };
35985 template< >struct luv< ::color::category::rgb_uint32 > {
35986 	typedef ::color::category::luv_uint32 akin_type;
35987 };
35988 template< >struct luv< ::color::category::rgb_uint64 > {
35989 	typedef ::color::category::luv_uint64 akin_type;
35990 };
35991 template< >struct luv< ::color::category::rgb_float > {
35992 	typedef ::color::category::luv_float akin_type;
35993 };
35994 template< >struct luv< ::color::category::rgb_double > {
35995 	typedef ::color::category::luv_double akin_type;
35996 };
35997 template< >struct luv< ::color::category::rgb_ldouble > {
35998 	typedef ::color::category::luv_ldouble akin_type;
35999 };
36000 
36001 }
36002 }
36003 
36004 namespace color {
36005 namespace akin {
36006 
36007 template< >struct luv< ::color::category::yiq_uint8 > {
36008 	typedef ::color::category::luv_uint8 akin_type;
36009 };
36010 template< >struct luv< ::color::category::yiq_uint16 > {
36011 	typedef ::color::category::luv_uint16 akin_type;
36012 };
36013 template< >struct luv< ::color::category::yiq_uint32 > {
36014 	typedef ::color::category::luv_uint32 akin_type;
36015 };
36016 template< >struct luv< ::color::category::yiq_uint64 > {
36017 	typedef ::color::category::luv_uint64 akin_type;
36018 };
36019 template< >struct luv< ::color::category::yiq_float > {
36020 	typedef ::color::category::luv_float akin_type;
36021 };
36022 template< >struct luv< ::color::category::yiq_double > {
36023 	typedef ::color::category::luv_double akin_type;
36024 };
36025 template< >struct luv< ::color::category::yiq_ldouble > {
36026 	typedef ::color::category::luv_ldouble akin_type;
36027 };
36028 
36029 }
36030 }
36031 
36032 namespace color {
36033 namespace akin {
36034 
36035 template< ::color::constant::yuv::reference_enum reference_number >struct luv< ::color::category::yuv_uint8 <reference_number> > {
36036 	typedef ::color::category::luv_uint8 akin_type;
36037 };
36038 template< ::color::constant::yuv::reference_enum reference_number >struct luv< ::color::category::yuv_uint16 <reference_number> > {
36039 	typedef ::color::category::luv_uint16 akin_type;
36040 };
36041 template< ::color::constant::yuv::reference_enum reference_number >struct luv< ::color::category::yuv_uint32 <reference_number> > {
36042 	typedef ::color::category::luv_uint32 akin_type;
36043 };
36044 template< ::color::constant::yuv::reference_enum reference_number >struct luv< ::color::category::yuv_uint64 <reference_number> > {
36045 	typedef ::color::category::luv_uint64 akin_type;
36046 };
36047 template< ::color::constant::yuv::reference_enum reference_number >struct luv< ::color::category::yuv_float <reference_number> > {
36048 	typedef ::color::category::luv_float akin_type;
36049 };
36050 template< ::color::constant::yuv::reference_enum reference_number >struct luv< ::color::category::yuv_double <reference_number> > {
36051 	typedef ::color::category::luv_double akin_type;
36052 };
36053 template< ::color::constant::yuv::reference_enum reference_number >struct luv< ::color::category::yuv_ldouble<reference_number> > {
36054 	typedef ::color::category::luv_ldouble akin_type;
36055 };
36056 
36057 }
36058 }
36059 
36060 namespace color {
36061 namespace akin {
36062 
36063 template< >struct luv< ::color::category::YCgCo_uint8 > {
36064 	typedef ::color::category::luv_uint8 akin_type;
36065 };
36066 template< >struct luv< ::color::category::YCgCo_uint16 > {
36067 	typedef ::color::category::luv_uint16 akin_type;
36068 };
36069 template< >struct luv< ::color::category::YCgCo_uint32 > {
36070 	typedef ::color::category::luv_uint32 akin_type;
36071 };
36072 template< >struct luv< ::color::category::YCgCo_uint64 > {
36073 	typedef ::color::category::luv_uint64 akin_type;
36074 };
36075 template< >struct luv< ::color::category::YCgCo_float > {
36076 	typedef ::color::category::luv_float akin_type;
36077 };
36078 template< >struct luv< ::color::category::YCgCo_double > {
36079 	typedef ::color::category::luv_double akin_type;
36080 };
36081 template< >struct luv< ::color::category::YCgCo_ldouble > {
36082 	typedef ::color::category::luv_ldouble akin_type;
36083 };
36084 
36085 }
36086 }
36087 
36088 namespace color {
36089 namespace akin {
36090 
36091 template< >struct luv< ::color::category::YDbDr_uint8 > {
36092 	typedef ::color::category::luv_uint8 akin_type;
36093 };
36094 template< >struct luv< ::color::category::YDbDr_uint16 > {
36095 	typedef ::color::category::luv_uint16 akin_type;
36096 };
36097 template< >struct luv< ::color::category::YDbDr_uint32 > {
36098 	typedef ::color::category::luv_uint32 akin_type;
36099 };
36100 template< >struct luv< ::color::category::YDbDr_uint64 > {
36101 	typedef ::color::category::luv_uint64 akin_type;
36102 };
36103 template< >struct luv< ::color::category::YDbDr_float > {
36104 	typedef ::color::category::luv_float akin_type;
36105 };
36106 template< >struct luv< ::color::category::YDbDr_double > {
36107 	typedef ::color::category::luv_double akin_type;
36108 };
36109 template< >struct luv< ::color::category::YDbDr_ldouble > {
36110 	typedef ::color::category::luv_ldouble akin_type;
36111 };
36112 
36113 }
36114 }
36115 
36116 namespace color {
36117 namespace akin {
36118 
36119 template< ::color::constant::YPbPr::reference_enum reference_number >struct luv< ::color::category::YPbPr_uint8 <reference_number> > {
36120 	typedef ::color::category::luv_uint8 akin_type;
36121 };
36122 template< ::color::constant::YPbPr::reference_enum reference_number >struct luv< ::color::category::YPbPr_uint16 <reference_number> > {
36123 	typedef ::color::category::luv_uint16 akin_type;
36124 };
36125 template< ::color::constant::YPbPr::reference_enum reference_number >struct luv< ::color::category::YPbPr_uint32 <reference_number> > {
36126 	typedef ::color::category::luv_uint32 akin_type;
36127 };
36128 template< ::color::constant::YPbPr::reference_enum reference_number >struct luv< ::color::category::YPbPr_uint64 <reference_number> > {
36129 	typedef ::color::category::luv_uint64 akin_type;
36130 };
36131 template< ::color::constant::YPbPr::reference_enum reference_number >struct luv< ::color::category::YPbPr_float <reference_number> > {
36132 	typedef ::color::category::luv_float akin_type;
36133 };
36134 template< ::color::constant::YPbPr::reference_enum reference_number >struct luv< ::color::category::YPbPr_double <reference_number> > {
36135 	typedef ::color::category::luv_double akin_type;
36136 };
36137 template< ::color::constant::YPbPr::reference_enum reference_number >struct luv< ::color::category::YPbPr_ldouble<reference_number> > {
36138 	typedef ::color::category::luv_ldouble akin_type;
36139 };
36140 
36141 }
36142 }
36143 
36144 namespace color {
36145 namespace akin {
36146 
36147 template< >struct luv< ::color::category::xyz_uint8 > {
36148 	typedef ::color::category::luv_uint8 akin_type;
36149 };
36150 template< >struct luv< ::color::category::xyz_uint16 > {
36151 	typedef ::color::category::luv_uint16 akin_type;
36152 };
36153 template< >struct luv< ::color::category::xyz_uint32 > {
36154 	typedef ::color::category::luv_uint32 akin_type;
36155 };
36156 template< >struct luv< ::color::category::xyz_uint64 > {
36157 	typedef ::color::category::luv_uint64 akin_type;
36158 };
36159 template< >struct luv< ::color::category::xyz_float > {
36160 	typedef ::color::category::luv_float akin_type;
36161 };
36162 template< >struct luv< ::color::category::xyz_double > {
36163 	typedef ::color::category::luv_double akin_type;
36164 };
36165 template< >struct luv< ::color::category::xyz_ldouble > {
36166 	typedef ::color::category::luv_ldouble akin_type;
36167 };
36168 
36169 }
36170 }
36171 
36172 namespace color {
36173 namespace akin {
36174 
36175 template
36176 <
36177 	typename tag_name
36178 	,::color::constant::lab::reference_enum reference_number
36179 
36180 	>
36181 struct luv< ::color::category::lab< tag_name, reference_number > > {
36182 public:
36183 	typedef ::color::category::luv< tag_name > akin_type;
36184 };
36185 
36186 }
36187 }
36188 
36189 namespace color {
36190 namespace akin {
36191 
36192 template
36193 <
36194 	typename tag_name
36195 
36196 	>
36197 struct luv< ::color::category::xyy< tag_name > > {
36198 public:
36199 	typedef ::color::category::luv< tag_name > akin_type;
36200 };
36201 
36202 }
36203 }
36204 
36205 namespace color {
36206 namespace akin {
36207 
36208 template
36209 <
36210 	typename tag_name
36211 	,::color::constant::lms::reference_enum reference_number
36212 
36213 	>
36214 struct luv< ::color::category::lms< tag_name, reference_number > > {
36215 public:
36216 	typedef ::color::category::luv< tag_name > akin_type;
36217 };
36218 
36219 }
36220 }
36221 
36222 namespace color {
36223 namespace akin {
36224 
36225 template< typename tag_name >
36226 struct luv< ::color::category::luv< tag_name > > {
36227 public:
36228 	typedef ::color::category::luv< tag_name > akin_type;
36229 };
36230 
36231 }
36232 }
36233 
36234 namespace color {
36235 namespace akin {
36236 
36237 template
36238 <
36239 	typename tag_name
36240 
36241 	>
36242 struct luv< ::color::category::LabCH< tag_name > > {
36243 public:
36244 	typedef ::color::category::luv< tag_name > akin_type;
36245 };
36246 
36247 }
36248 }
36249 
36250 namespace color {
36251 namespace akin {
36252 
36253 template< >struct luv< ::color::category::LuvCH_uint8 > {
36254 	typedef ::color::category::luv_uint8 akin_type;
36255 };
36256 template< >struct luv< ::color::category::LuvCH_uint16 > {
36257 	typedef ::color::category::luv_uint16 akin_type;
36258 };
36259 template< >struct luv< ::color::category::LuvCH_uint32 > {
36260 	typedef ::color::category::luv_uint32 akin_type;
36261 };
36262 template< >struct luv< ::color::category::LuvCH_uint64 > {
36263 	typedef ::color::category::luv_uint64 akin_type;
36264 };
36265 template< >struct luv< ::color::category::LuvCH_float > {
36266 	typedef ::color::category::luv_float akin_type;
36267 };
36268 template< >struct luv< ::color::category::LuvCH_double > {
36269 	typedef ::color::category::luv_double akin_type;
36270 };
36271 template< >struct luv< ::color::category::LuvCH_ldouble > {
36272 	typedef ::color::category::luv_ldouble akin_type;
36273 };
36274 
36275 }
36276 }
36277 
36278 namespace color {
36279 namespace trait {
36280 
36281 template <> struct info< ::color::category::luv_uint8 > {
36282 public:
36283 	enum { implemented_entity = true };
36284 	enum { meaningful_entity = true };
36285 };
36286 template <> struct info< ::color::category::luv_uint16 > {
36287 public:
36288 	enum { implemented_entity = true };
36289 	enum { meaningful_entity = true };
36290 };
36291 template <> struct info< ::color::category::luv_uint32 > {
36292 public:
36293 	enum { implemented_entity = true };
36294 	enum { meaningful_entity = true };
36295 };
36296 template <> struct info< ::color::category::luv_uint64 > {
36297 public:
36298 	enum { implemented_entity = true };
36299 	enum { meaningful_entity = true };
36300 };
36301 template <> struct info< ::color::category::luv_float > {
36302 public:
36303 	enum { implemented_entity = true };
36304 	enum { meaningful_entity = true };
36305 };
36306 template <> struct info< ::color::category::luv_double > {
36307 public:
36308 	enum { implemented_entity = true };
36309 	enum { meaningful_entity = true };
36310 };
36311 template <> struct info< ::color::category::luv_ldouble > {
36312 public:
36313 	enum { implemented_entity = true };
36314 	enum { meaningful_entity = true };
36315 };
36316 
36317 }
36318 }
36319 
36320 namespace color {
36321 namespace _internal {
36322 namespace luv {
36323 namespace bound {
36324 
36325 template< typename number_name, typename index_name >
36326 struct constrain {
36327 public:
36328 	typedef number_name number_type;
36329 	typedef index_name index_type;
36330 
36331 	typedef ::color::_internal::utility::type::traitC< number_type > trait_type;
36332 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
36333 
36334 	typedef typename trait_type::instance_type instance_type;
36335 	typedef typename trait_type::return_image_type return_image_type;
36336 
36337 	typedef typename index_trait_type::instance_type index_instance_type;
36338 	typedef typename index_trait_type::model_type index_input_const_type;
36339 
36340 	template< index_instance_type index >
maximumcolor::_internal::luv::bound::constrain36341 	static return_image_type maximum() {
36342 		static instance_type max_list[] = { 100, 127, 127 };
36343 		return max_list[index];
36344 	}
36345 
maximumcolor::_internal::luv::bound::constrain36346 	static return_image_type maximum(index_input_const_type index) {
36347 		static instance_type max_list[] = { 100, 127, 127 };
36348 		return max_list[index];
36349 	}
36350 
36351 	template< index_instance_type index >
minimumcolor::_internal::luv::bound::constrain36352 	static return_image_type minimum() {
36353 		static instance_type min_list[] = { 0, -127, -127 };
36354 		return min_list[index];
36355 	}
36356 
minimumcolor::_internal::luv::bound::constrain36357 	static return_image_type minimum(index_input_const_type index) {
36358 		static instance_type min_list[] = { 0, -127, -127 };
36359 		return min_list[index];
36360 	}
36361 
36362 	template< index_instance_type index >
rangecolor::_internal::luv::bound::constrain36363 	static return_image_type range() {
36364 		static instance_type range_list[] = { 100, 255, 255 };
36365 		return range_list[index];
36366 	}
36367 
rangecolor::_internal::luv::bound::constrain36368 	static return_image_type range(index_input_const_type index) {
36369 		static instance_type range_list[] = { 100, 255, 255 };
36370 		return range_list[index];
36371 	}
36372 };
36373 
36374 }
36375 }
36376 }
36377 }
36378 
36379 namespace color {
36380 namespace trait {
36381 
36382 template<>
36383 struct bound< ::color::category::luv_int8 >
36384 	: public ::color::_internal::luv::bound::constrain< std::int16_t, typename ::color::trait::index< ::color::category::luv_int8 >::instance_type > {
36385 };
36386 
36387 template<>
36388 struct bound< ::color::category::luv_int16 >
36389 	: public ::color::_internal::luv::bound::constrain< std::int16_t, typename ::color::trait::index< ::color::category::luv_int16 >::instance_type > {
36390 };
36391 
36392 template<>
36393 struct bound< ::color::category::luv_int32 >
36394 	: public ::color::_internal::luv::bound::constrain< std::int32_t, typename ::color::trait::index< ::color::category::luv_int32 >::instance_type > {
36395 };
36396 
36397 template<>
36398 struct bound< ::color::category::luv_int64 >
36399 	: public ::color::_internal::luv::bound::constrain< std::int64_t, typename ::color::trait::index< ::color::category::luv_int64 >::instance_type > {
36400 };
36401 
36402 }
36403 }
36404 namespace color {
36405 namespace _internal {
36406 namespace luv {
36407 namespace bound {
36408 
36409 template< typename number_name, typename index_name >
36410 struct positive {
36411 public:
36412 	typedef number_name number_type;
36413 	typedef index_name index_type;
36414 
36415 	typedef ::color::_internal::utility::type::traitC< number_type > trait_type;
36416 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
36417 
36418 	typedef typename trait_type::instance_type instance_type;
36419 	typedef typename trait_type::return_image_type return_image_type;
36420 
36421 	typedef typename index_trait_type::instance_type index_instance_type;
36422 	typedef typename index_trait_type::model_type index_input_const_type;
36423 
36424 	typedef ::color::_internal::luv::bound::positive< number_type, index_name > this_type;
36425 
lower100color::_internal::luv::bound::positive36426 	static instance_type lower100() {
36427 		return 0;
36428 	}
36429 
higher100color::_internal::luv::bound::positive36430 	static instance_type higher100() {
36431 		return std::numeric_limits<number_type>::max();
36432 	}
36433 
span100color::_internal::luv::bound::positive36434 	static instance_type span100() {
36435 		return this_type::higher100() - this_type::lower100();
36436 	}
36437 
highercolor::_internal::luv::bound::positive36438 	static instance_type higher() {
36439 		return std::numeric_limits<number_type>::max()/2 + 128;
36440 	}
36441 
lowercolor::_internal::luv::bound::positive36442 	static instance_type lower() {
36443 		return std::numeric_limits<number_type>::max()/2 - 127;
36444 	}
36445 
spancolor::_internal::luv::bound::positive36446 	static instance_type span() {
36447 		return this_type::higher() - this_type::lower();
36448 	}
36449 
36450 	template< index_instance_type index >
maximumcolor::_internal::luv::bound::positive36451 	static return_image_type maximum() {
36452 		static instance_type max_list[] = { this_type::higher100(), this_type::higher(), this_type::higher() };
36453 		return max_list[index];
36454 	}
36455 
maximumcolor::_internal::luv::bound::positive36456 	static return_image_type maximum(index_input_const_type index) {
36457 		static instance_type max_list[] = { this_type::higher100(), this_type::higher(), this_type::higher() };
36458 		return max_list[index];
36459 	}
36460 
36461 	template< index_instance_type index >
minimumcolor::_internal::luv::bound::positive36462 	static return_image_type minimum() {
36463 		static instance_type min_list[] = { this_type::lower100(), this_type::lower(), this_type::lower() };
36464 		return min_list[index];
36465 	}
36466 
minimumcolor::_internal::luv::bound::positive36467 	static return_image_type minimum(index_input_const_type index) {
36468 		static instance_type min_list[] = { this_type::lower100(), this_type::lower(), this_type::lower() };
36469 		return min_list[index];
36470 	}
36471 
36472 	template< index_instance_type index >
rangecolor::_internal::luv::bound::positive36473 	static return_image_type range() {
36474 		static instance_type range_list[] = { this_type::span100(), this_type::span(), this_type::span() };
36475 		return range_list[index];
36476 	}
36477 
rangecolor::_internal::luv::bound::positive36478 	static return_image_type range(index_input_const_type index) {
36479 		static instance_type range_list[] = { this_type::span100(), this_type::span(), this_type::span() };
36480 		return range_list[index];
36481 	}
36482 };
36483 
36484 }
36485 }
36486 }
36487 }
36488 
36489 namespace color {
36490 namespace trait {
36491 
36492 template<>
36493 struct bound< ::color::category::luv_uint8 >
36494 	: public ::color::_internal::luv::bound::positive< std::uint8_t, typename ::color::trait::index< ::color::category::luv_uint8 >::instance_type > {
36495 };
36496 
36497 template<>
36498 struct bound< ::color::category::luv_uint16 >
36499 	: public ::color::_internal::luv::bound::positive< std::uint16_t, typename ::color::trait::index< ::color::category::luv_uint16 >::instance_type > {
36500 };
36501 
36502 template<>
36503 struct bound< ::color::category::luv_uint32 >
36504 	: public ::color::_internal::luv::bound::positive< std::uint32_t, typename ::color::trait::index< ::color::category::luv_uint32 >::instance_type > {
36505 };
36506 
36507 template<>
36508 struct bound< ::color::category::luv_uint64 >
36509 	: public ::color::_internal::luv::bound::positive< std::uint64_t, typename ::color::trait::index< ::color::category::luv_uint64 >::instance_type > {
36510 };
36511 
36512 }
36513 }
36514 namespace color {
36515 namespace trait {
36516 
36517 template< >
36518 struct bound< ::color::category::luv_float >
36519 	: public ::color::_internal::luv::bound::constrain< float, typename ::color::trait::index< ::color::category::luv_float >::instance_type > {
36520 };
36521 
36522 template< >
36523 struct bound< ::color::category::luv_double >
36524 	: public ::color::_internal::luv::bound::constrain< double, typename ::color::trait::index< ::color::category::luv_double >::instance_type > {
36525 };
36526 
36527 template< >
36528 struct bound< ::color::category::luv_ldouble >
36529 	: public ::color::_internal::luv::bound::constrain< long double, typename ::color::trait::index< ::color::category::luv_ldouble >::instance_type > {
36530 };
36531 
36532 }
36533 }
36534 
36535 namespace color {
36536 namespace trait {
36537 
36538 template< >
36539 struct component< ::color::category::luv_uint8 >
36540 	: public ::color::_internal::utility::component::array< std::uint8_t > {
36541 };
36542 
36543 template< >
36544 struct component< ::color::category::luv_uint16 >
36545 	: public ::color::_internal::utility::component::array< std::uint16_t > {
36546 };
36547 
36548 template< >
36549 struct component< ::color::category::luv_uint32 >
36550 	: public ::color::_internal::utility::component::array< std::uint32_t > {
36551 };
36552 
36553 template< >
36554 struct component< ::color::category::luv_uint64 >
36555 	: public ::color::_internal::utility::component::array< std::uint64_t > {
36556 };
36557 
36558 }
36559 }
36560 namespace color {
36561 namespace trait {
36562 
36563 template< >
36564 struct component< ::color::category::luv_float >
36565 	: public ::color::_internal::utility::component::array< float > {
36566 };
36567 
36568 template< >
36569 struct component< ::color::category::luv_double >
36570 	: public ::color::_internal::utility::component::array< double > {
36571 };
36572 
36573 template< >
36574 struct component< ::color::category::luv_ldouble >
36575 	: public ::color::_internal::utility::component::array< long double > {
36576 };
36577 
36578 }
36579 }
36580 
36581 namespace color {
36582 namespace trait {
36583 
36584 template<>
36585 struct container< ::color::category::luv_int8 >
36586 	: public ::color::_internal::utility::container::array< std::int8_t, 3 > {
36587 };
36588 
36589 template<>
36590 struct container< ::color::category::luv_int16 >
36591 	: public ::color::_internal::utility::container::array< std::int16_t, 3 > {
36592 };
36593 
36594 template<>
36595 struct container< ::color::category::luv_int32 >
36596 	: public ::color::_internal::utility::container::array< std::int32_t, 3 > {
36597 };
36598 
36599 template<>
36600 struct container< ::color::category::luv_int64 >
36601 	: public ::color::_internal::utility::container::array< std::int64_t, 3 > {
36602 };
36603 
36604 }
36605 }
36606 namespace color {
36607 namespace trait {
36608 
36609 template< >
36610 struct container< ::color::category::luv_uint8 >
36611 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
36612 };
36613 
36614 template< >
36615 struct container< ::color::category::luv_uint16 >
36616 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
36617 };
36618 
36619 template< >
36620 struct container< ::color::category::luv_uint32 >
36621 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
36622 };
36623 
36624 template< >
36625 struct container< ::color::category::luv_uint64 >
36626 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
36627 };
36628 
36629 }
36630 }
36631 namespace color {
36632 namespace trait {
36633 
36634 template< >
36635 struct container< ::color::category::luv_float >
36636 	: public ::color::_internal::utility::container::array< float, 3 > {
36637 };
36638 
36639 template< >
36640 struct container< ::color::category::luv_double >
36641 	: public ::color::_internal::utility::container::array< double, 3 > {
36642 };
36643 
36644 template< >
36645 struct container< ::color::category::luv_ldouble >
36646 	: public ::color::_internal::utility::container::array< long double, 3 > {
36647 };
36648 
36649 }
36650 }
36651 
36652 namespace color {
36653 
36654 template< typename type_name >
36655 using luv = ::color::model< typename ::color::category::luv< type_name > >;
36656 
36657 }
36658 
36659 namespace color {
36660 namespace place {
36661 namespace _internal {
36662 
36663 template< typename tag_name >
36664 struct lightness< ::color::category::luv< tag_name > > {
36665 public:
36666 	typedef ::color::category::luv< tag_name > category_type;
36667 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
36668 
36669 	enum { position_enum = 0 };
36670 	enum { has_enum = true };
36671 
positioncolor::place::_internal::lightness36672 	static index_instance_type position() {
36673 		return position_enum;
36674 	}
36675 };
36676 
36677 }
36678 }
36679 }
36680 
36681 namespace color {
36682 namespace get {
36683 
36684 template< typename tag_name >
36685 inline
36686 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::luv<tag_name> >::akin_type >::return_type
gray(::color::model<::color::category::luv<tag_name>> const & color_parameter)36687 gray(::color::model< ::color::category::luv<tag_name> > const& color_parameter) {
36688 	typedef ::color::category::luv< tag_name > category_type;
36689 	typedef typename ::color::akin::gray< category_type >::akin_type akin_category_type;
36690 	typedef ::color::_internal::reformat< akin_category_type, category_type > reformat_type;
36691 	enum {
36692 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
36693 	};
36694 	enum {
36695 		gray_p = ::color::place::_internal::gray<akin_category_type>::position_enum
36696 	};
36697 	return reformat_type::template process<gray_p,lightness_p>(color_parameter.template get<lightness_p>());
36698 }
36699 
36700 }
36701 }
36702 
36703 namespace color {
36704 namespace get {
36705 
36706 template< typename tag_name >
36707 inline
36708 typename ::color::model< ::color::category::luv< tag_name> >::component_const_type
lightness(::color::model<::color::category::luv<tag_name>> const & color_parameter)36709 lightness(::color::model< ::color::category::luv<tag_name> > const& color_parameter) {
36710 	typedef ::color::category::luv< tag_name> category_type;
36711 	enum {
36712 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
36713 	};
36714 	return color_parameter.template get<lightness_p>();
36715 }
36716 
36717 }
36718 }
36719 
36720 namespace color {
36721 namespace get {
36722 
36723 template
36724 <
36725 
36726 	typename tag_name
36727 	>
36728 inline
36729 typename ::color::model< ::color::category::luv< tag_name> >::component_const_type
saturation(::color::model<::color::category::luv<tag_name>> const & c)36730 saturation(::color::model< ::color::category::luv< tag_name> > const& c) {
36731 	typedef ::color::category::luv< tag_name> category_type;
36732 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
36733 	typedef ::color::constant::xyz::illuminant::point< scalar_type, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > white_point_type;
36734 	static scalar_type un = scalar_type(4)* white_point_type::X()/(white_point_type::X() + scalar_type(15)*white_point_type::Y() + scalar_type(3)*white_point_type::Z());
36735 	static scalar_type vn = scalar_type(9)* white_point_type::Y()/(white_point_type::X() + scalar_type(15)*white_point_type::Y() + scalar_type(3)*white_point_type::Z());
36736 	scalar_type u = c [1] - un;
36737 	scalar_type v = c [2] - vn;
36738 	return typename ::color::model< ::color::category::luv< tag_name> >::component_const_type(scalar_type(13) * sqrt(u*u + v*v));
36739 }
36740 
36741 }
36742 }
36743 
36744 namespace color {
36745 namespace set {
36746 
36747 template< typename tag_name >
36748 inline
36749 void
gray(::color::model<::color::category::luv<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::luv<tag_name>>::akin_type>::model_type component_parameter)36750 gray
36751 (
36752 	::color::model< ::color::category::luv< tag_name > > & color_parameter
36753 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::luv< tag_name > >::akin_type >::model_type component_parameter
36754 ) {
36755 	typedef ::color::category::luv< tag_name > category_type;
36756 	typedef typename ::color::akin::gray< category_type >::akin_type akin_category_type;
36757 	typedef ::color::_internal::reformat< category_type, akin_category_type > reformat_type;
36758 	enum {
36759 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
36760 	};
36761 	enum {
36762 		gray_p = ::color::place::_internal::lightness<akin_category_type>::position_enum
36763 	};
36764 	color_parameter.template set<lightness_p>(reformat_type::template process<lightness_p,gray_p>(component_parameter));
36765 }
36766 
36767 }
36768 }
36769 
36770 namespace color {
36771 namespace set {
36772 template< typename tag_name >
36773 inline
36774 void
lightness(::color::model<::color::category::luv<tag_name>> & color_parameter,typename::color::model<::color::category::luv<tag_name>>::component_input_const_type component_parameter)36775 lightness
36776 (
36777 	::color::model< ::color::category::luv<tag_name> > & color_parameter,
36778 	typename ::color::model< ::color::category::luv<tag_name> >::component_input_const_type component_parameter
36779 ) {
36780 	typedef ::color::category::luv<tag_name> category_type;
36781 	enum {
36782 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
36783 	};
36784 	color_parameter.template set<lightness_p>(component_parameter);
36785 }
36786 
36787 }
36788 }
36789 
36790 namespace color {
36791 namespace set {
36792 
36793 template< typename tag_name >
36794 inline
36795 void
red(::color::model<::color::category::luv<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::luv<tag_name>>::akin_type>::model_type component_parameter)36796 red
36797 (
36798 	::color::model< ::color::category::luv< tag_name > > & color_parameter
36799 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::luv< tag_name > >::akin_type >::model_type component_parameter
36800 ) {
36801 	typedef ::color::category::luv< tag_name > category_type;
36802 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
36803 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
36804 	::color::model< akin_type > rgb(color_parameter);
36805 	rgb.template set< red_p > (component_parameter);
36806 	color_parameter = rgb;
36807 }
36808 
36809 }
36810 }
36811 
36812 namespace color {
36813 namespace set {
36814 
36815 template< typename tag_name >
36816 inline
36817 void
green(::color::model<::color::category::luv<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::luv<tag_name>>::akin_type>::model_type component_parameter)36818 green
36819 (
36820 	::color::model< ::color::category::luv< tag_name > > & color_parameter
36821 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::luv< tag_name > >::akin_type >::model_type component_parameter
36822 ) {
36823 	typedef ::color::category::luv< tag_name > category_type;
36824 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
36825 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
36826 	::color::model< akin_type > rgb(color_parameter);
36827 	rgb.template set< green_p > (component_parameter);
36828 	color_parameter = rgb;
36829 }
36830 
36831 }
36832 }
36833 
36834 namespace color {
36835 namespace set {
36836 
36837 template< typename tag_name >
36838 inline
36839 void
blue(::color::model<::color::category::luv<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::luv<tag_name>>::akin_type>::model_type component_parameter)36840 blue
36841 (
36842 	::color::model< ::color::category::luv< tag_name > > & color_parameter
36843 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::luv< tag_name > >::akin_type >::model_type component_parameter
36844 ) {
36845 	typedef ::color::category::luv< tag_name > category_type;
36846 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
36847 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
36848 	::color::model< akin_type > rgb(color_parameter);
36849 	rgb.template set<blue_p > (component_parameter);
36850 	color_parameter = rgb;
36851 }
36852 
36853 }
36854 }
36855 
36856 namespace color {
36857 namespace _internal {
36858 
36859 template
36860 <
36861 	typename luv_tag_name
36862 	,typename gray_tag_name
36863 	>
36864 struct convert
36865 	<
36866 	::color::category::luv< luv_tag_name >
36867 	,::color::category::gray< gray_tag_name >
36868 	> {
36869 public:
36870 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
36871 	typedef ::color::category::gray< gray_tag_name > gray_category_type, category_right_type;
36872 
36873 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
36874 
36875 	typedef ::color::model< luv_category_type > luv_model_type;
36876 	typedef ::color::model< gray_category_type > gray_model_type;
36877 
36878 	typedef ::color::xyz< scalar_type > xyz_model_type;
36879 
36880 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
36881 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
36882 
36883 	typedef typename container_left_trait_type::input_type container_left_input_type;
36884 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
36885 
processcolor::_internal::convert36886 	static void process
36887 	(
36888 		container_left_input_type left
36889 		,container_right_const_input_type right
36890 	) {
36891 		left = luv_model_type(xyz_model_type(gray_model_type(right))).container();
36892 	}
36893 };
36894 
36895 }
36896 }
36897 
36898 namespace color {
36899 namespace _internal {
36900 
36901 template
36902 <
36903 	typename luv_tag_name
36904 	,typename cmy_tag_name
36905 	>
36906 struct convert
36907 	<
36908 	::color::category::luv< luv_tag_name >
36909 	,::color::category::cmy< cmy_tag_name >
36910 	> {
36911 public:
36912 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
36913 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_right_type;
36914 
36915 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
36916 
36917 	typedef ::color::model< cmy_category_type > cmy_model_type;
36918 	typedef ::color::model< luv_category_type > luv_model_type;
36919 
36920 	typedef ::color::rgb< scalar_type > rgb_model_type;
36921 	typedef ::color::xyz< scalar_type > xyz_model_type;
36922 
36923 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
36924 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
36925 
36926 	typedef typename container_left_trait_type::input_type container_left_input_type;
36927 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
36928 
processcolor::_internal::convert36929 	static void process
36930 	(
36931 		container_left_input_type left
36932 		,container_right_const_input_type right
36933 	) {
36934 		left = luv_model_type(xyz_model_type(rgb_model_type(cmy_model_type(right)))).container();
36935 	}
36936 };
36937 
36938 }
36939 }
36940 
36941 namespace color {
36942 namespace _internal {
36943 
36944 template
36945 <
36946 	typename luv_tag_name
36947 	,typename cmyk_tag_name
36948 	>
36949 struct convert
36950 	<
36951 	::color::category::luv< luv_tag_name >
36952 	,::color::category::cmyk< cmyk_tag_name >
36953 	> {
36954 public:
36955 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
36956 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
36957 
36958 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
36959 
36960 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
36961 	typedef ::color::model< luv_category_type > luv_model_type;
36962 
36963 	typedef ::color::rgb< scalar_type > rgb_model_type;
36964 	typedef ::color::xyz< scalar_type > xyz_model_type;
36965 
36966 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
36967 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
36968 
36969 	typedef typename container_left_trait_type::input_type container_left_input_type;
36970 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
36971 
processcolor::_internal::convert36972 	static void process
36973 	(
36974 		container_left_input_type left
36975 		,container_right_const_input_type right
36976 	) {
36977 		left = luv_model_type(xyz_model_type(rgb_model_type(cmyk_model_type(right)))).container();
36978 	}
36979 };
36980 
36981 }
36982 }
36983 
36984 namespace color {
36985 namespace _internal {
36986 
36987 template
36988 <
36989 	typename luv_tag_name
36990 	,typename hsl_tag_name
36991 	>
36992 struct convert
36993 	<
36994 	::color::category::luv< luv_tag_name >
36995 	,::color::category::hsl< hsl_tag_name >
36996 	> {
36997 public:
36998 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
36999 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
37000 
37001 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
37002 
37003 	typedef ::color::model< hsl_category_type > hsl_model_type;
37004 	typedef ::color::model< luv_category_type > luv_model_type;
37005 
37006 	typedef ::color::rgb< scalar_type > rgb_model_type;
37007 	typedef ::color::xyz< scalar_type > xyz_model_type;
37008 
37009 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37010 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37011 
37012 	typedef typename container_left_trait_type::input_type container_left_input_type;
37013 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37014 
processcolor::_internal::convert37015 	static void process
37016 	(
37017 		container_left_input_type left
37018 		,container_right_const_input_type right
37019 	) {
37020 		left = luv_model_type(xyz_model_type(rgb_model_type(hsl_model_type(right)))).container();
37021 	}
37022 };
37023 
37024 }
37025 }
37026 
37027 namespace color {
37028 namespace _internal {
37029 
37030 template
37031 <
37032 	typename luv_tag_name
37033 	,typename hsv_tag_name
37034 	>
37035 struct convert
37036 	<
37037 	::color::category::luv< luv_tag_name >
37038 	,::color::category::hsv< hsv_tag_name >
37039 	> {
37040 public:
37041 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
37042 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
37043 
37044 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
37045 
37046 	typedef ::color::model< hsv_category_type > hsv_model_type;
37047 	typedef ::color::model< luv_category_type > luv_model_type;
37048 
37049 	typedef ::color::rgb< scalar_type > rgb_model_type;
37050 	typedef ::color::xyz< scalar_type > xyz_model_type;
37051 
37052 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37053 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37054 
37055 	typedef typename container_left_trait_type::input_type container_left_input_type;
37056 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37057 
processcolor::_internal::convert37058 	static void process
37059 	(
37060 		container_left_input_type left
37061 		,container_right_const_input_type right
37062 	) {
37063 		left = luv_model_type(xyz_model_type(rgb_model_type(hsv_model_type(right)))).container();
37064 	}
37065 };
37066 
37067 }
37068 }
37069 
37070 namespace color {
37071 namespace _internal {
37072 
37073 template
37074 <
37075 	typename luv_tag_name
37076 	,typename hsi_tag_name
37077 	>
37078 struct convert
37079 	<
37080 	::color::category::luv< luv_tag_name >
37081 	,::color::category::hsi< hsi_tag_name >
37082 	> {
37083 public:
37084 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
37085 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
37086 
37087 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
37088 
37089 	typedef ::color::model< hsi_category_type > hsi_model_type;
37090 	typedef ::color::model< luv_category_type > luv_model_type;
37091 
37092 	typedef ::color::rgb< scalar_type > rgb_model_type;
37093 	typedef ::color::xyz< scalar_type > xyz_model_type;
37094 
37095 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37096 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37097 
37098 	typedef typename container_left_trait_type::input_type container_left_input_type;
37099 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37100 
processcolor::_internal::convert37101 	static void process
37102 	(
37103 		container_left_input_type left
37104 		,container_right_const_input_type right
37105 	) {
37106 		left = luv_model_type(xyz_model_type(rgb_model_type(hsi_model_type(right)))).container();
37107 	}
37108 };
37109 
37110 }
37111 }
37112 
37113 namespace color {
37114 namespace _internal {
37115 
37116 template
37117 <
37118 	typename luv_tag_name
37119 	,typename hwb_tag_name
37120 	>
37121 struct convert
37122 	<
37123 	::color::category::luv< luv_tag_name >
37124 	,::color::category::hwb< hwb_tag_name >
37125 	> {
37126 public:
37127 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
37128 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
37129 
37130 	typedef typename ::color::trait::scalar< luv_category_type >::instance_type scalar_type;
37131 
37132 	typedef ::color::model< luv_category_type > luv_model_type;
37133 	typedef ::color::model< hwb_category_type > hwb_model_type;
37134 
37135 	typedef ::color::rgb< scalar_type > rgb_model_type;
37136 	typedef ::color::hsv< scalar_type > hsv_model_type;
37137 
37138 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37139 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37140 
37141 	typedef typename container_left_trait_type::input_type container_left_input_type;
37142 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37143 
processcolor::_internal::convert37144 	static void process
37145 	(
37146 		container_left_input_type left
37147 		,container_right_const_input_type right
37148 	) {
37149 		left = luv_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right)))).container();
37150 	}
37151 };
37152 
37153 }
37154 }
37155 
37156 namespace color {
37157 namespace _internal {
37158 
37159 template
37160 <
37161 	typename luv_tag_name
37162 	,typename rgb_tag_name
37163 	>
37164 struct convert
37165 	<
37166 	::color::category::luv< luv_tag_name >
37167 	,::color::category::rgb< rgb_tag_name >
37168 	> {
37169 public:
37170 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
37171 	typedef ::color::category::rgb< rgb_tag_name > rgb_category_type, category_right_type;
37172 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
37173 
37174 	typedef ::color::model< luv_category_type > luv_model_type;
37175 	typedef ::color::model< rgb_category_type > rgb_model_type;
37176 
37177 	typedef ::color::xyz< scalar_type > xyz_model_type;
37178 
37179 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37180 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37181 
37182 	typedef typename container_left_trait_type::input_type container_left_input_type;
37183 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37184 
processcolor::_internal::convert37185 	static void process
37186 	(
37187 		container_left_input_type left
37188 		,container_right_const_input_type right
37189 	) {
37190 		left = luv_model_type(xyz_model_type(rgb_model_type(right))).container();
37191 	}
37192 };
37193 
37194 }
37195 }
37196 
37197 namespace color {
37198 namespace _internal {
37199 
37200 template
37201 <
37202 	typename luv_tag_name
37203 	,typename yiq_tag_name
37204 	>
37205 struct convert
37206 	<
37207 	::color::category::luv< luv_tag_name >
37208 	,::color::category::yiq< yiq_tag_name >
37209 	> {
37210 public:
37211 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
37212 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
37213 
37214 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
37215 
37216 	typedef ::color::model< yiq_category_type > yiq_model_type;
37217 	typedef ::color::model< luv_category_type > luv_model_type;
37218 
37219 	typedef ::color::rgb< scalar_type > rgb_model_type;
37220 	typedef ::color::xyz< scalar_type > xyz_model_type;
37221 
37222 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37223 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37224 
37225 	typedef typename container_left_trait_type::input_type container_left_input_type;
37226 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37227 
processcolor::_internal::convert37228 	static void process
37229 	(
37230 		container_left_input_type left
37231 		,container_right_const_input_type right
37232 	) {
37233 		left = luv_model_type(xyz_model_type(rgb_model_type(yiq_model_type(right)))).container();
37234 	}
37235 };
37236 
37237 }
37238 }
37239 
37240 namespace color {
37241 namespace _internal {
37242 
37243 template
37244 <
37245 	typename luv_tag_name
37246 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum reference_number
37247 	>
37248 struct convert
37249 	<
37250 	::color::category::luv< luv_tag_name >
37251 	,::color::category::yuv< yuv_tag_name, reference_number >
37252 	> {
37253 public:
37254 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
37255 	typedef ::color::category::yuv< yuv_tag_name, reference_number > yuv_category_type, category_right_type;
37256 
37257 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
37258 
37259 	typedef ::color::model< yuv_category_type > yuv_model_type;
37260 	typedef ::color::model< luv_category_type > luv_model_type;
37261 
37262 	typedef ::color::rgb< scalar_type > rgb_model_type;
37263 	typedef ::color::xyz< scalar_type > xyz_model_type;
37264 
37265 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37266 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37267 
37268 	typedef typename container_left_trait_type::input_type container_left_input_type;
37269 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37270 
processcolor::_internal::convert37271 	static void process
37272 	(
37273 		container_left_input_type left
37274 		,container_right_const_input_type right
37275 	) {
37276 		left = luv_model_type(xyz_model_type(rgb_model_type(yuv_model_type(right)))).container();
37277 	}
37278 };
37279 
37280 }
37281 }
37282 
37283 namespace color {
37284 namespace _internal {
37285 
37286 template
37287 <
37288 	typename luv_tag_name
37289 	,typename YCgCo_tag_name
37290 	>
37291 struct convert
37292 	<
37293 	::color::category::luv< luv_tag_name >
37294 	,::color::category::YCgCo< YCgCo_tag_name >
37295 	> {
37296 public:
37297 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
37298 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
37299 
37300 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
37301 
37302 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
37303 	typedef ::color::model< luv_category_type > luv_model_type;
37304 
37305 	typedef ::color::rgb< scalar_type > rgb_model_type;
37306 	typedef ::color::xyz< scalar_type > xyz_model_type;
37307 
37308 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37309 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37310 
37311 	typedef typename container_left_trait_type::input_type container_left_input_type;
37312 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37313 
processcolor::_internal::convert37314 	static void process
37315 	(
37316 		container_left_input_type left
37317 		,container_right_const_input_type right
37318 	) {
37319 		left = luv_model_type(xyz_model_type(rgb_model_type(YCgCo_model_type(right)))).container();
37320 	}
37321 };
37322 
37323 }
37324 }
37325 
37326 namespace color {
37327 namespace _internal {
37328 
37329 template
37330 <
37331 	typename luv_tag_name
37332 	,typename YDbDr_tag_name
37333 	>
37334 struct convert
37335 	<
37336 	::color::category::luv< luv_tag_name >
37337 	,::color::category::YDbDr< YDbDr_tag_name >
37338 	> {
37339 public:
37340 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
37341 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
37342 
37343 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
37344 
37345 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
37346 	typedef ::color::model< luv_category_type > luv_model_type;
37347 
37348 	typedef ::color::rgb< scalar_type > rgb_model_type;
37349 	typedef ::color::xyz< scalar_type > xyz_model_type;
37350 
37351 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37352 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37353 
37354 	typedef typename container_left_trait_type::input_type container_left_input_type;
37355 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37356 
processcolor::_internal::convert37357 	static void process
37358 	(
37359 		container_left_input_type left
37360 		,container_right_const_input_type right
37361 	) {
37362 		left = luv_model_type(xyz_model_type(rgb_model_type(YDbDr_model_type(right)))).container();
37363 	}
37364 };
37365 
37366 }
37367 }
37368 
37369 namespace color {
37370 namespace _internal {
37371 
37372 template
37373 <
37374 	typename luv_tag_name
37375 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
37376 	>
37377 struct convert
37378 	<
37379 	::color::category::luv< luv_tag_name >
37380 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
37381 	> {
37382 public:
37383 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
37384 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_right_type;
37385 
37386 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
37387 
37388 	typedef ::color::model< luv_category_type > luv_model_type;
37389 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
37390 
37391 	typedef ::color::rgb< scalar_type > rgb_model_type;
37392 	typedef ::color::xyz< scalar_type > xyz_model_type;
37393 
37394 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37395 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37396 
37397 	typedef typename container_left_trait_type::input_type container_left_input_type;
37398 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37399 
processcolor::_internal::convert37400 	static void process
37401 	(
37402 		container_left_input_type left
37403 		,container_right_const_input_type right
37404 	) {
37405 		left = luv_model_type(xyz_model_type(rgb_model_type(YPbPr_model_type(right)))).container();
37406 	}
37407 };
37408 
37409 }
37410 }
37411 
37412 namespace color {
37413 namespace _internal {
37414 namespace constant {
37415 
37416 template< typename scalar_name >
37417 struct luv {
37418 public:
37419 	typedef scalar_name scalar_type;
37420 
37421 	typedef ::color::constant::xyz::illuminant::point< scalar_type, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > white_point_type;
37422 
u0color::_internal::constant::luv37423 	static scalar_type u0() {
37424 		return scalar_type(4)* white_point_type::X()/(white_point_type::X() + scalar_type(15)*white_point_type::Y() + scalar_type(3)*white_point_type::Z());
37425 	}
v0color::_internal::constant::luv37426 	static scalar_type v0() {
37427 		return scalar_type(9)* white_point_type::Y()/(white_point_type::X() + scalar_type(15)*white_point_type::Y() + scalar_type(3)*white_point_type::Z());
37428 	}
37429 
37430 	typedef ::color::_internal::constant::luv<scalar_type> this_type;
37431 
l_mincolor::_internal::constant::luv37432 	static scalar_type const l_min() {
37433 		return 0;
37434 	}
l_maxcolor::_internal::constant::luv37435 	static scalar_type const l_max() {
37436 		return 100;
37437 	}
l_rangecolor::_internal::constant::luv37438 	static scalar_type const l_range() {
37439 		return 100;
37440 	}
37441 
u_mincolor::_internal::constant::luv37442 	static scalar_type const u_min() {
37443 		static scalar_type l, u, v;
37444 		static bool dummy = xyz2luv(scalar_type(0), scalar_type(100), scalar_type(0), l, u, v);
37445 		return u;
37446 	}
37447 
u_maxcolor::_internal::constant::luv37448 	static scalar_type const u_max() {
37449 		static scalar_type l, u, v;
37450 		static bool dummy = xyz2luv(scalar_type(100), scalar_type(5.8771597073058741145), scalar_type(0), l, u, v);
37451 		return u;
37452 	}
u_rangecolor::_internal::constant::luv37453 	static scalar_type const u_range() {
37454 		return this_type::u_max() - this_type::u_min();
37455 	}
37456 
v_mincolor::_internal::constant::luv37457 	static scalar_type const v_min() {
37458 		static scalar_type l, u, v;
37459 		static bool dummy = xyz2luv(scalar_type(100), scalar_type(12.20694118257431526330947), scalar_type(100), l, u, v);
37460 		return v;
37461 	}
37462 
v_maxcolor::_internal::constant::luv37463 	static scalar_type const v_max() {
37464 		static scalar_type l, u, v;
37465 		static bool dummy = xyz2luv(scalar_type(0), scalar_type(100), scalar_type(0), l, u, v);
37466 		return v;
37467 	}
v_rangecolor::_internal::constant::luv37468 	static scalar_type const v_range() {
37469 		return this_type::v_max() - this_type::v_min();
37470 	}
37471 
u_diversecolor::_internal::constant::luv37472 	static scalar_type u_diverse(scalar_type const& normal) {
37473 		return this_type::u_range() * normal + this_type::u_min();
37474 	}
u_normalizecolor::_internal::constant::luv37475 	static scalar_type u_normalize(scalar_type const& divert) {
37476 		return (divert - this_type::u_min()) /this_type::u_range();
37477 	}
37478 
v_diversecolor::_internal::constant::luv37479 	static scalar_type v_diverse(scalar_type const& normal) {
37480 		return this_type::v_range() * normal + this_type::v_min();
37481 	}
v_normalizecolor::_internal::constant::luv37482 	static scalar_type v_normalize(scalar_type const& divert) {
37483 		return (divert - this_type::v_min()) /this_type::v_range();
37484 	}
37485 
xyz2luvcolor::_internal::constant::luv37486 	static bool xyz2luv
37487 	(
37488 		scalar_type const& x, scalar_type const& y, scalar_type const& z
37489 		,scalar_type & l, scalar_type & u, scalar_type & v
37490 	) {
37491 		scalar_type epsilon = 1e-6;
37492 		scalar_type yr = y / (white_point_type::Y() * scalar_type(100));
37493 		if(scalar_type(216)/scalar_type(24389) < yr) {
37494 			l = scalar_type(116)*scalar_type(cbrt(yr))-scalar_type(16);
37495 		} else {
37496 			l = scalar_type(24389)/scalar_type(27)* yr;
37497 		}
37498 		scalar_type up = scalar_type(4) * x/(x + scalar_type(15)*y + scalar_type(3)*z);
37499 		if(x < epsilon) {
37500 			up=0;
37501 		}
37502 		scalar_type vp = scalar_type(9) * y/(x + scalar_type(15)*y + scalar_type(3)*z);
37503 		if(y < epsilon) {
37504 			vp=0;
37505 		}
37506 		u = 13*l*(up - u0());
37507 		v = 13*l*(vp - v0());
37508 		return true;
37509 	}
37510 
37511 };
37512 
37513 }
37514 }
37515 }
37516 
37517 namespace color {
37518 namespace _internal {
37519 
37520 template
37521 <
37522 	typename luv_tag_name
37523 	,typename xyz_tag_name
37524 	>
37525 struct convert
37526 	<
37527 	::color::category::luv< luv_tag_name >
37528 	,::color::category::xyz< xyz_tag_name >
37529 	> {
37530 public:
37531 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
37532 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
37533 
37534 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
37535 
37536 	typedef ::color::category::luv< scalar_type > luvSCALAR_category_type;
37537 	typedef ::color::category::xyz< scalar_type > xyzSCALAR_category_type;
37538 
37539 	typedef ::color::model< luv_category_type > luv_model_type;
37540 	typedef ::color::model< xyz_category_type > xyz_model_type;
37541 
37542 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37543 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37544 
37545 	typedef typename container_left_trait_type::input_type container_left_input_type;
37546 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37547 
37548 	typedef ::color::_internal::reformat< luv_category_type, luvSCALAR_category_type > reformatLUV_type;
37549 	typedef ::color::_internal::reformat< xyzSCALAR_category_type, xyz_category_type > reformatXYZ_type;
37550 
37551 	typedef ::color::constant::xyz::illuminant::point< scalar_type, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > white_point_type;
37552 
processcolor::_internal::convert37553 	static void process
37554 	(
37555 		container_left_input_type left
37556 		,container_right_const_input_type right
37557 	) {
37558 		static scalar_type u0 = 4* white_point_type::X()/(white_point_type::X() + 15*white_point_type::Y() + 3*white_point_type::Z());
37559 		static scalar_type v0 = 9* white_point_type::Y()/(white_point_type::X() + 15*white_point_type::Y() + 3*white_point_type::Z());
37560 		scalar_type x = reformatXYZ_type::template process<0,0>(container_right_trait_type::template get<0>(right));
37561 		scalar_type y = reformatXYZ_type::template process<1,1>(container_right_trait_type::template get<1>(right));
37562 		scalar_type z = reformatXYZ_type::template process<2,2>(container_right_trait_type::template get<2>(right));
37563 		scalar_type l;
37564 		scalar_type u;
37565 		scalar_type v;
37566 		::color::_internal::constant::luv< scalar_type >::xyz2luv(x, y, z, l, u, v);
37567 		container_left_trait_type::template set<0>(left, reformatLUV_type::template process<0,0>(l));
37568 		container_left_trait_type::template set<1>(left, reformatLUV_type::template process<1,1>(u));
37569 		container_left_trait_type::template set<2>(left, reformatLUV_type::template process<2,2>(v));
37570 	}
37571 
37572 };
37573 
37574 }
37575 }
37576 
37577 namespace color {
37578 namespace _internal {
37579 
37580 template
37581 <
37582 	typename luv_tag_name
37583 	,typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
37584 	>
37585 struct convert
37586 	<
37587 	::color::category::luv< luv_tag_name >
37588 	,::color::category::lab< lab_tag_name, reference_number >
37589 	> {
37590 public:
37591 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
37592 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_right_type;
37593 
37594 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
37595 
37596 	typedef ::color::model< luv_category_type > luv_model_type;
37597 	typedef ::color::xyz< scalar_type > xyz_model_type;
37598 	typedef ::color::model< lab_category_type > lab_model_type;
37599 
37600 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37601 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37602 
37603 	typedef typename container_left_trait_type::input_type container_left_input_type;
37604 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37605 
processcolor::_internal::convert37606 	static void process
37607 	(
37608 		container_left_input_type left
37609 		,container_right_const_input_type right
37610 	) {
37611 		left = luv_model_type(xyz_model_type(lab_model_type(right))).container();
37612 	}
37613 };
37614 
37615 }
37616 }
37617 
37618 namespace color {
37619 namespace _internal {
37620 
37621 template
37622 <
37623 	typename luv_tag_name
37624 	,typename xyy_tag_name
37625 	>
37626 struct convert
37627 	<
37628 	::color::category::luv< luv_tag_name >
37629 	,::color::category::xyy< xyy_tag_name >
37630 	> {
37631 public:
37632 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
37633 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
37634 
37635 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
37636 
37637 	typedef ::color::model< luv_category_type > luv_model_type;
37638 	typedef ::color::xyz< scalar_type > xyz_model_type;
37639 	typedef ::color::model< xyy_category_type > xyy_model_type;
37640 
37641 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37642 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37643 
37644 	typedef typename container_left_trait_type::input_type container_left_input_type;
37645 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37646 
processcolor::_internal::convert37647 	static void process
37648 	(
37649 		container_left_input_type left
37650 		,container_right_const_input_type right
37651 	) {
37652 		left = luv_model_type(xyz_model_type(xyy_model_type(right))).container();
37653 	}
37654 };
37655 
37656 }
37657 }
37658 
37659 namespace color {
37660 namespace _internal {
37661 
37662 template
37663 <
37664 	typename luv_tag_name
37665 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
37666 	>
37667 struct convert
37668 	<
37669 	::color::category::luv< luv_tag_name >
37670 	,::color::category::lms< lms_tag_name, lms_reference_number >
37671 	> {
37672 public:
37673 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
37674 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
37675 
37676 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
37677 
37678 	typedef ::color::model< luv_category_type > luv_model_type;
37679 	typedef ::color::model< lms_category_type > lms_model_type;
37680 
37681 	typedef ::color::xyz< scalar_type > xyz_model_type;
37682 
37683 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37684 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37685 
37686 	typedef typename container_left_trait_type::input_type container_left_input_type;
37687 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37688 
processcolor::_internal::convert37689 	static void process
37690 	(
37691 		container_left_input_type left
37692 		,container_right_const_input_type right
37693 	) {
37694 		left = luv_model_type(xyz_model_type(lms_model_type(right))).container();
37695 	}
37696 };
37697 
37698 }
37699 }
37700 namespace color {
37701 namespace _internal {
37702 
37703 template
37704 <
37705 	typename tag_left_name
37706 	,typename tag_right_name
37707 	>
37708 struct convert
37709 	<
37710 	::color::category::luv< tag_left_name >
37711 	,::color::category::luv< tag_right_name>
37712 	> {
37713 public:
37714 	typedef ::color::category::luv< tag_left_name > category_left_type;
37715 	typedef ::color::category::luv< tag_right_name> category_right_type;
37716 
37717 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
37718 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
37719 
37720 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
37721 
37722 	typedef typename container_left_trait_type::input_type container_left_input_type;
37723 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
37724 
processcolor::_internal::convert37725 	static void process
37726 	(
37727 		container_left_input_type left
37728 		,container_right_const_input_type right
37729 	) {
37730 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
37731 		container_left_trait_type::template set<1>(left, reformat_type::template process<1,1>(container_right_trait_type::template get<1>(right)));
37732 		container_left_trait_type::template set<2>(left, reformat_type::template process<2,2>(container_right_trait_type::template get<2>(right)));
37733 	}
37734 };
37735 
37736 }
37737 }
37738 
37739 namespace color {
37740 namespace akin {
37741 
37742 template< >struct LabCH< ::color::category::gray_uint8 > {
37743 	typedef ::color::category::LabCH_uint8 akin_type;
37744 };
37745 template< >struct LabCH< ::color::category::gray_uint16 > {
37746 	typedef ::color::category::LabCH_uint16 akin_type;
37747 };
37748 template< >struct LabCH< ::color::category::gray_uint32 > {
37749 	typedef ::color::category::LabCH_uint32 akin_type;
37750 };
37751 template< >struct LabCH< ::color::category::gray_uint64 > {
37752 	typedef ::color::category::LabCH_uint64 akin_type;
37753 };
37754 template< >struct LabCH< ::color::category::gray_float > {
37755 	typedef ::color::category::LabCH_float akin_type;
37756 };
37757 template< >struct LabCH< ::color::category::gray_double > {
37758 	typedef ::color::category::LabCH_double akin_type;
37759 };
37760 template< >struct LabCH< ::color::category::gray_ldouble > {
37761 	typedef ::color::category::LabCH_ldouble akin_type;
37762 };
37763 
37764 }
37765 }
37766 
37767 namespace color {
37768 namespace akin {
37769 
37770 template< typename tag_name >
37771 struct LabCH< ::color::category::cmy< tag_name > > {
37772 public:
37773 	typedef ::color::category::LabCH< tag_name > akin_type;
37774 };
37775 
37776 }
37777 }
37778 
37779 namespace color {
37780 namespace akin {
37781 
37782 template< >struct LabCH< ::color::category::cmyk_uint8 > {
37783 	typedef ::color::category::LabCH_uint8 akin_type;
37784 };
37785 template< >struct LabCH< ::color::category::cmyk_uint16 > {
37786 	typedef ::color::category::LabCH_uint16 akin_type;
37787 };
37788 template< >struct LabCH< ::color::category::cmyk_uint32 > {
37789 	typedef ::color::category::LabCH_uint32 akin_type;
37790 };
37791 template< >struct LabCH< ::color::category::cmyk_uint64 > {
37792 	typedef ::color::category::LabCH_uint64 akin_type;
37793 };
37794 template< >struct LabCH< ::color::category::cmyk_float > {
37795 	typedef ::color::category::LabCH_float akin_type;
37796 };
37797 template< >struct LabCH< ::color::category::cmyk_double > {
37798 	typedef ::color::category::LabCH_double akin_type;
37799 };
37800 template< >struct LabCH< ::color::category::cmyk_ldouble > {
37801 	typedef ::color::category::LabCH_ldouble akin_type;
37802 };
37803 
37804 }
37805 }
37806 
37807 namespace color {
37808 namespace akin {
37809 
37810 template< >struct LabCH< ::color::category::hsl_uint8 > {
37811 	typedef ::color::category::LabCH_uint8 akin_type;
37812 };
37813 template< >struct LabCH< ::color::category::hsl_uint16 > {
37814 	typedef ::color::category::LabCH_uint16 akin_type;
37815 };
37816 template< >struct LabCH< ::color::category::hsl_uint32 > {
37817 	typedef ::color::category::LabCH_uint32 akin_type;
37818 };
37819 template< >struct LabCH< ::color::category::hsl_uint64 > {
37820 	typedef ::color::category::LabCH_uint64 akin_type;
37821 };
37822 template< >struct LabCH< ::color::category::hsl_float > {
37823 	typedef ::color::category::LabCH_float akin_type;
37824 };
37825 template< >struct LabCH< ::color::category::hsl_double > {
37826 	typedef ::color::category::LabCH_double akin_type;
37827 };
37828 template< >struct LabCH< ::color::category::hsl_ldouble > {
37829 	typedef ::color::category::LabCH_ldouble akin_type;
37830 };
37831 
37832 }
37833 }
37834 
37835 namespace color {
37836 namespace akin {
37837 
37838 template< >struct LabCH< ::color::category::hsv_uint8 > {
37839 	typedef ::color::category::LabCH_uint8 akin_type;
37840 };
37841 template< >struct LabCH< ::color::category::hsv_uint16 > {
37842 	typedef ::color::category::LabCH_uint16 akin_type;
37843 };
37844 template< >struct LabCH< ::color::category::hsv_uint32 > {
37845 	typedef ::color::category::LabCH_uint32 akin_type;
37846 };
37847 template< >struct LabCH< ::color::category::hsv_uint64 > {
37848 	typedef ::color::category::LabCH_uint64 akin_type;
37849 };
37850 template< >struct LabCH< ::color::category::hsv_float > {
37851 	typedef ::color::category::LabCH_float akin_type;
37852 };
37853 template< >struct LabCH< ::color::category::hsv_double > {
37854 	typedef ::color::category::LabCH_double akin_type;
37855 };
37856 template< >struct LabCH< ::color::category::hsv_ldouble > {
37857 	typedef ::color::category::LabCH_ldouble akin_type;
37858 };
37859 
37860 }
37861 }
37862 
37863 namespace color {
37864 namespace akin {
37865 
37866 template< >struct LabCH< ::color::category::hsi_uint8 > {
37867 	typedef ::color::category::LabCH_uint8 akin_type;
37868 };
37869 template< >struct LabCH< ::color::category::hsi_uint16 > {
37870 	typedef ::color::category::LabCH_uint16 akin_type;
37871 };
37872 template< >struct LabCH< ::color::category::hsi_uint32 > {
37873 	typedef ::color::category::LabCH_uint32 akin_type;
37874 };
37875 template< >struct LabCH< ::color::category::hsi_uint64 > {
37876 	typedef ::color::category::LabCH_uint64 akin_type;
37877 };
37878 template< >struct LabCH< ::color::category::hsi_float > {
37879 	typedef ::color::category::LabCH_float akin_type;
37880 };
37881 template< >struct LabCH< ::color::category::hsi_double > {
37882 	typedef ::color::category::LabCH_double akin_type;
37883 };
37884 template< >struct LabCH< ::color::category::hsi_ldouble > {
37885 	typedef ::color::category::LabCH_ldouble akin_type;
37886 };
37887 
37888 }
37889 }
37890 
37891 namespace color {
37892 namespace akin {
37893 
37894 template
37895 <
37896 	typename tag_name
37897 
37898 	>
37899 struct LabCH< ::color::category::hwb< tag_name > > {
37900 public:
37901 	typedef ::color::category::LabCH< tag_name > akin_type;
37902 };
37903 
37904 }
37905 }
37906 
37907 namespace color {
37908 namespace akin {
37909 
37910 template< >struct LabCH< ::color::category::rgb_uint8 > {
37911 	typedef ::color::category::LabCH_uint8 akin_type;
37912 };
37913 template< >struct LabCH< ::color::category::rgb_uint16 > {
37914 	typedef ::color::category::LabCH_uint16 akin_type;
37915 };
37916 template< >struct LabCH< ::color::category::rgb_uint32 > {
37917 	typedef ::color::category::LabCH_uint32 akin_type;
37918 };
37919 template< >struct LabCH< ::color::category::rgb_uint64 > {
37920 	typedef ::color::category::LabCH_uint64 akin_type;
37921 };
37922 template< >struct LabCH< ::color::category::rgb_float > {
37923 	typedef ::color::category::LabCH_float akin_type;
37924 };
37925 template< >struct LabCH< ::color::category::rgb_double > {
37926 	typedef ::color::category::LabCH_double akin_type;
37927 };
37928 template< >struct LabCH< ::color::category::rgb_ldouble > {
37929 	typedef ::color::category::LabCH_ldouble akin_type;
37930 };
37931 
37932 }
37933 }
37934 
37935 namespace color {
37936 namespace akin {
37937 
37938 template< >struct LabCH< ::color::category::yiq_uint8 > {
37939 	typedef ::color::category::LabCH_uint8 akin_type;
37940 };
37941 template< >struct LabCH< ::color::category::yiq_uint16 > {
37942 	typedef ::color::category::LabCH_uint16 akin_type;
37943 };
37944 template< >struct LabCH< ::color::category::yiq_uint32 > {
37945 	typedef ::color::category::LabCH_uint32 akin_type;
37946 };
37947 template< >struct LabCH< ::color::category::yiq_uint64 > {
37948 	typedef ::color::category::LabCH_uint64 akin_type;
37949 };
37950 template< >struct LabCH< ::color::category::yiq_float > {
37951 	typedef ::color::category::LabCH_float akin_type;
37952 };
37953 template< >struct LabCH< ::color::category::yiq_double > {
37954 	typedef ::color::category::LabCH_double akin_type;
37955 };
37956 template< >struct LabCH< ::color::category::yiq_ldouble > {
37957 	typedef ::color::category::LabCH_ldouble akin_type;
37958 };
37959 
37960 }
37961 }
37962 
37963 namespace color {
37964 namespace akin {
37965 
37966 template< ::color::constant::yuv::reference_enum reference_number >struct LabCH< ::color::category::yuv_uint8 <reference_number> > {
37967 	typedef ::color::category::LabCH_uint8 akin_type;
37968 };
37969 template< ::color::constant::yuv::reference_enum reference_number >struct LabCH< ::color::category::yuv_uint16 <reference_number> > {
37970 	typedef ::color::category::LabCH_uint16 akin_type;
37971 };
37972 template< ::color::constant::yuv::reference_enum reference_number >struct LabCH< ::color::category::yuv_uint32 <reference_number> > {
37973 	typedef ::color::category::LabCH_uint32 akin_type;
37974 };
37975 template< ::color::constant::yuv::reference_enum reference_number >struct LabCH< ::color::category::yuv_uint64 <reference_number> > {
37976 	typedef ::color::category::LabCH_uint64 akin_type;
37977 };
37978 template< ::color::constant::yuv::reference_enum reference_number >struct LabCH< ::color::category::yuv_float <reference_number> > {
37979 	typedef ::color::category::LabCH_float akin_type;
37980 };
37981 template< ::color::constant::yuv::reference_enum reference_number >struct LabCH< ::color::category::yuv_double <reference_number> > {
37982 	typedef ::color::category::LabCH_double akin_type;
37983 };
37984 template< ::color::constant::yuv::reference_enum reference_number >struct LabCH< ::color::category::yuv_ldouble<reference_number> > {
37985 	typedef ::color::category::LabCH_ldouble akin_type;
37986 };
37987 
37988 }
37989 }
37990 
37991 namespace color {
37992 namespace akin {
37993 
37994 template< >struct LabCH< ::color::category::YCgCo_uint8 > {
37995 	typedef ::color::category::LabCH_uint8 akin_type;
37996 };
37997 template< >struct LabCH< ::color::category::YCgCo_uint16 > {
37998 	typedef ::color::category::LabCH_uint16 akin_type;
37999 };
38000 template< >struct LabCH< ::color::category::YCgCo_uint32 > {
38001 	typedef ::color::category::LabCH_uint32 akin_type;
38002 };
38003 template< >struct LabCH< ::color::category::YCgCo_uint64 > {
38004 	typedef ::color::category::LabCH_uint64 akin_type;
38005 };
38006 template< >struct LabCH< ::color::category::YCgCo_float > {
38007 	typedef ::color::category::LabCH_float akin_type;
38008 };
38009 template< >struct LabCH< ::color::category::YCgCo_double > {
38010 	typedef ::color::category::LabCH_double akin_type;
38011 };
38012 template< >struct LabCH< ::color::category::YCgCo_ldouble > {
38013 	typedef ::color::category::LabCH_ldouble akin_type;
38014 };
38015 
38016 }
38017 }
38018 
38019 namespace color {
38020 namespace akin {
38021 
38022 template< >struct LabCH< ::color::category::YDbDr_uint8 > {
38023 	typedef ::color::category::LabCH_uint8 akin_type;
38024 };
38025 template< >struct LabCH< ::color::category::YDbDr_uint16 > {
38026 	typedef ::color::category::LabCH_uint16 akin_type;
38027 };
38028 template< >struct LabCH< ::color::category::YDbDr_uint32 > {
38029 	typedef ::color::category::LabCH_uint32 akin_type;
38030 };
38031 template< >struct LabCH< ::color::category::YDbDr_uint64 > {
38032 	typedef ::color::category::LabCH_uint64 akin_type;
38033 };
38034 template< >struct LabCH< ::color::category::YDbDr_float > {
38035 	typedef ::color::category::LabCH_float akin_type;
38036 };
38037 template< >struct LabCH< ::color::category::YDbDr_double > {
38038 	typedef ::color::category::LabCH_double akin_type;
38039 };
38040 template< >struct LabCH< ::color::category::YDbDr_ldouble > {
38041 	typedef ::color::category::LabCH_ldouble akin_type;
38042 };
38043 
38044 }
38045 }
38046 
38047 namespace color {
38048 namespace akin {
38049 
38050 template< ::color::constant::YPbPr::reference_enum reference_number >struct LabCH< ::color::category::YPbPr_uint8 <reference_number> > {
38051 	typedef ::color::category::LabCH_uint8 akin_type;
38052 };
38053 template< ::color::constant::YPbPr::reference_enum reference_number >struct LabCH< ::color::category::YPbPr_uint16 <reference_number> > {
38054 	typedef ::color::category::LabCH_uint16 akin_type;
38055 };
38056 template< ::color::constant::YPbPr::reference_enum reference_number >struct LabCH< ::color::category::YPbPr_uint32 <reference_number> > {
38057 	typedef ::color::category::LabCH_uint32 akin_type;
38058 };
38059 template< ::color::constant::YPbPr::reference_enum reference_number >struct LabCH< ::color::category::YPbPr_uint64 <reference_number> > {
38060 	typedef ::color::category::LabCH_uint64 akin_type;
38061 };
38062 template< ::color::constant::YPbPr::reference_enum reference_number >struct LabCH< ::color::category::YPbPr_float <reference_number> > {
38063 	typedef ::color::category::LabCH_float akin_type;
38064 };
38065 template< ::color::constant::YPbPr::reference_enum reference_number >struct LabCH< ::color::category::YPbPr_double <reference_number> > {
38066 	typedef ::color::category::LabCH_double akin_type;
38067 };
38068 template< ::color::constant::YPbPr::reference_enum reference_number >struct LabCH< ::color::category::YPbPr_ldouble<reference_number> > {
38069 	typedef ::color::category::LabCH_ldouble akin_type;
38070 };
38071 
38072 }
38073 }
38074 
38075 namespace color {
38076 namespace akin {
38077 
38078 template< >struct LabCH< ::color::category::xyz_uint8 > {
38079 	typedef ::color::category::LabCH_uint8 akin_type;
38080 };
38081 template< >struct LabCH< ::color::category::xyz_uint16 > {
38082 	typedef ::color::category::LabCH_uint16 akin_type;
38083 };
38084 template< >struct LabCH< ::color::category::xyz_uint32 > {
38085 	typedef ::color::category::LabCH_uint32 akin_type;
38086 };
38087 template< >struct LabCH< ::color::category::xyz_uint64 > {
38088 	typedef ::color::category::LabCH_uint64 akin_type;
38089 };
38090 template< >struct LabCH< ::color::category::xyz_float > {
38091 	typedef ::color::category::LabCH_float akin_type;
38092 };
38093 template< >struct LabCH< ::color::category::xyz_double > {
38094 	typedef ::color::category::LabCH_double akin_type;
38095 };
38096 template< >struct LabCH< ::color::category::xyz_ldouble > {
38097 	typedef ::color::category::LabCH_ldouble akin_type;
38098 };
38099 
38100 }
38101 }
38102 
38103 namespace color {
38104 namespace akin {
38105 
38106 template< typename tag_name, ::color::constant::lab::reference_enum reference_number >
38107 struct LabCH< ::color::category::lab< tag_name, reference_number > > {
38108 public:
38109 	typedef ::color::category::LabCH< tag_name > akin_type;
38110 };
38111 
38112 }
38113 }
38114 
38115 namespace color {
38116 namespace akin {
38117 
38118 template< typename tag_name >
38119 struct LabCH< ::color::category::xyy< tag_name > > {
38120 public:
38121 	typedef ::color::category::LabCH< tag_name > akin_type;
38122 };
38123 
38124 }
38125 }
38126 
38127 namespace color {
38128 namespace akin {
38129 
38130 template
38131 <
38132 	typename tag_name
38133 	,::color::constant::lms::reference_enum reference_number
38134 
38135 	>
38136 struct LabCH< ::color::category::lms< tag_name, reference_number > > {
38137 public:
38138 	typedef ::color::category::LabCH< tag_name > akin_type;
38139 };
38140 
38141 }
38142 }
38143 
38144 namespace color {
38145 namespace akin {
38146 
38147 template< typename tag_name >
38148 struct LabCH< ::color::category::luv< tag_name > > {
38149 public:
38150 	typedef ::color::category::LabCH< tag_name > akin_type;
38151 };
38152 
38153 }
38154 }
38155 
38156 namespace color {
38157 namespace akin {
38158 
38159 template< typename tag_name >
38160 struct LabCH< ::color::category::LabCH< tag_name > > {
38161 public:
38162 	typedef ::color::category::LabCH< tag_name > akin_type;
38163 };
38164 
38165 }
38166 }
38167 
38168 namespace color {
38169 namespace akin {
38170 
38171 template< typename tag_name >
38172 struct LabCH< ::color::category::LuvCH< tag_name > > {
38173 public:
38174 	typedef ::color::category::LabCH< tag_name > akin_type;
38175 };
38176 
38177 }
38178 }
38179 
38180 namespace color {
38181 namespace trait {
38182 
38183 template <> struct info< ::color::category::LabCH_uint8 > {
38184 public:
38185 	enum { implemented_entity = true };
38186 	enum { meaningful_entity = true };
38187 };
38188 template <> struct info< ::color::category::LabCH_uint16 > {
38189 public:
38190 	enum { implemented_entity = true };
38191 	enum { meaningful_entity = true };
38192 };
38193 template <> struct info< ::color::category::LabCH_uint32 > {
38194 public:
38195 	enum { implemented_entity = true };
38196 	enum { meaningful_entity = true };
38197 };
38198 template <> struct info< ::color::category::LabCH_uint64 > {
38199 public:
38200 	enum { implemented_entity = true };
38201 	enum { meaningful_entity = true };
38202 };
38203 template <> struct info< ::color::category::LabCH_float > {
38204 public:
38205 	enum { implemented_entity = true };
38206 	enum { meaningful_entity = true };
38207 };
38208 template <> struct info< ::color::category::LabCH_double > {
38209 public:
38210 	enum { implemented_entity = true };
38211 	enum { meaningful_entity = true };
38212 };
38213 template <> struct info< ::color::category::LabCH_ldouble > {
38214 public:
38215 	enum { implemented_entity = true };
38216 	enum { meaningful_entity = true };
38217 };
38218 
38219 }
38220 }
38221 
38222 namespace color {
38223 namespace trait {
38224 
38225 template< >
38226 struct bound< ::color::category::LabCH_uint8 >
38227 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::LabCH_uint8 >::instance_type > {
38228 };
38229 
38230 template< >
38231 struct bound< ::color::category::LabCH_uint16 >
38232 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::LabCH_uint16 >::instance_type > {
38233 };
38234 
38235 template< >
38236 struct bound< ::color::category::LabCH_uint32 >
38237 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::LabCH_uint32 >::instance_type > {
38238 };
38239 
38240 template< >
38241 struct bound< ::color::category::LabCH_uint64 >
38242 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::LabCH_uint64 >::instance_type > {
38243 };
38244 
38245 }
38246 }
38247 
38248 namespace color {
38249 namespace _internal {
38250 namespace lab {
38251 namespace bound {
38252 template< typename scalar_name, typename index_name, ::color::constant::lab::reference_enum = ::color::constant::lab::error_entity >
38253 struct natural {
38254 };
38255 
38256 template< typename scalar_name, typename index_name >
38257 struct natural< scalar_name, index_name, ::color::constant::lab::CIE_entity > {
38258 public:
38259 	typedef scalar_name scalar_type;
38260 	typedef index_name index_type;
38261 
38262 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
38263 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
38264 
38265 	typedef typename trait_type::instance_type instance_type;
38266 	typedef typename trait_type::return_image_type return_image_type;
38267 
38268 	typedef typename index_trait_type::instance_type index_instance_type;
38269 	typedef typename index_trait_type::model_type index_input_const_type;
38270 
38271 	typedef natural< scalar_name, index_name, ::color::constant::lab::CIE_entity > this_type;
38272 
magiccolor::_internal::lab::bound::natural38273 	static instance_type magic() {
38274 		return instance_type(1)-instance_type(16)/instance_type(116);
38275 	}
38276 
38277 	template< index_instance_type index >
maximumcolor::_internal::lab::bound::natural38278 	static return_image_type maximum() {
38279 		static instance_type max_list[] = { 100, 500*this_type::magic(), 200*this_type::magic() };
38280 		return max_list[index];
38281 	}
38282 
maximumcolor::_internal::lab::bound::natural38283 	static return_image_type maximum(index_input_const_type index) {
38284 		static instance_type max_list[] = { 100, 500*this_type::magic(), 200*this_type::magic() };
38285 		return max_list[index];
38286 	}
38287 
38288 	template< index_instance_type index >
minimumcolor::_internal::lab::bound::natural38289 	static return_image_type minimum() {
38290 		static instance_type min_list[] = { 0, -500*this_type::magic(), -200*this_type::magic() };
38291 		return min_list[index];
38292 	}
38293 
minimumcolor::_internal::lab::bound::natural38294 	static return_image_type minimum(index_input_const_type index) {
38295 		static instance_type min_list[] = { 0, -500*this_type::magic(), -200*this_type::magic() };
38296 		return min_list[index];
38297 	}
38298 
38299 	template< index_instance_type index >
rangecolor::_internal::lab::bound::natural38300 	static return_image_type range() {
38301 		static instance_type range_list[] = { 100, 1000*this_type::magic(), 400*this_type::magic() };
38302 		return range_list[index];
38303 	}
38304 
rangecolor::_internal::lab::bound::natural38305 	static return_image_type range(index_input_const_type index) {
38306 		static instance_type range_list[] = { 100, 1000*this_type::magic(), 400*this_type::magic() };
38307 		return range_list[index];
38308 	}
38309 };
38310 
38311 template< typename scalar_name, typename index_name >
38312 struct natural< scalar_name, index_name, ::color::constant::lab::Hunter_entity > {
38313 public:
38314 	typedef scalar_name scalar_type;
38315 	typedef index_name index_type;
38316 
38317 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
38318 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
38319 
38320 	typedef typename trait_type::instance_type instance_type;
38321 	typedef typename trait_type::return_image_type return_image_type;
38322 
38323 	typedef typename index_trait_type::instance_type index_instance_type;
38324 	typedef typename index_trait_type::model_type index_input_const_type;
38325 
38326 	typedef natural< scalar_name, index_name, ::color::constant::lab::Hunter_entity > this_type;
38327 
38328 	template< index_instance_type index >
maximumcolor::_internal::lab::bound::natural38329 	static return_image_type maximum() {
38330 		static instance_type max_list[] = { 100, scalar_type(2552.3), scalar_type(67.0387) };
38331 		return max_list[index];
38332 	}
38333 
maximumcolor::_internal::lab::bound::natural38334 	static return_image_type maximum(index_input_const_type index) {
38335 		static instance_type max_list[] = { 100, scalar_type(2552.3), scalar_type(67.0387) };
38336 		return max_list[index];
38337 	}
38338 
38339 	template< index_instance_type index >
minimumcolor::_internal::lab::bound::natural38340 	static return_image_type minimum() {
38341 		static instance_type min_list[] = { 0, scalar_type(-172.355), scalar_type(-865.984) };
38342 		return min_list[index];
38343 	}
38344 
minimumcolor::_internal::lab::bound::natural38345 	static return_image_type minimum(index_input_const_type index) {
38346 		static instance_type min_list[] = { 0, scalar_type(-172.355), scalar_type(-865.984) };
38347 		return min_list[index];
38348 	}
38349 
38350 	template< index_instance_type index >
rangecolor::_internal::lab::bound::natural38351 	static return_image_type range() {
38352 		static instance_type range_list[] = { 100, this_type::maximum(1)-this_type::minimum(1), this_type::maximum(2)-this_type::minimum(2) };
38353 		return range_list[index];
38354 	}
38355 
rangecolor::_internal::lab::bound::natural38356 	static return_image_type range(index_input_const_type index) {
38357 		static instance_type range_list[] = { 100, this_type::maximum(1)-this_type::minimum(1), this_type::maximum(2)-this_type::minimum(2) };
38358 		return range_list[index];
38359 	}
38360 };
38361 
38362 }
38363 }
38364 }
38365 }
38366 
38367 namespace color {
38368 namespace _internal {
38369 namespace LabCH {
38370 namespace bound {
38371 
38372 template< typename index_name, typename scalar_name >
38373 struct scalar {
38374 public:
38375 	typedef scalar_name scalar_type;
38376 	typedef index_name index_type;
38377 
38378 	typedef ::color::_internal::lab::bound::natural< scalar_name, index_type, ::color::constant::lab::CIE_entity > lab_bound_type;
38379 
38380 	typedef ::color::_internal::utility::type::traitC< scalar_type > scalar_trait_type;
38381 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
38382 
38383 	typedef typename scalar_trait_type::instance_type scalar_instance_type;
38384 	typedef typename scalar_trait_type::return_image_type return_image_type;
38385 
38386 	typedef typename index_trait_type::instance_type index_instance_type;
38387 	typedef typename index_trait_type::model_type index_input_const_type;
38388 
38389 	typedef ::color::_internal::LabCH::bound::scalar< index_type, scalar_name > this_type;
38390 
c_maxcolor::_internal::LabCH::bound::scalar38391 	static scalar_instance_type c_max() {
38392 		scalar_instance_type a = std::max<scalar_instance_type>(fabs(lab_bound_type::template minimum<1>()), lab_bound_type::template maximum<1>());
38393 		scalar_instance_type b = std::max<scalar_instance_type>(fabs(lab_bound_type::template minimum<2>()), lab_bound_type::template maximum<2>());
38394 		return sqrt(a*a+b*b);
38395 	}
38396 
38397 	template< index_instance_type index >
maximumcolor::_internal::LabCH::bound::scalar38398 	static return_image_type maximum() {
38399 		static const scalar_instance_type max_list[] = { 100, this_type::c_max(), 360 };
38400 		return max_list[index];
38401 	}
38402 
maximumcolor::_internal::LabCH::bound::scalar38403 	static return_image_type maximum(index_input_const_type index) {
38404 		static const scalar_instance_type max_list[] = { 100, this_type::c_max(), 360 };
38405 		return max_list[index];
38406 	}
38407 
38408 	template< index_instance_type index >
minimumcolor::_internal::LabCH::bound::scalar38409 	static return_image_type minimum() {
38410 		static const scalar_instance_type min_list[] = { 0, 0, 0 };
38411 		return min_list[index];
38412 	}
38413 
minimumcolor::_internal::LabCH::bound::scalar38414 	static return_image_type minimum(index_input_const_type index) {
38415 		static const scalar_instance_type min_list[] = { 0, 0, 0 };
38416 		return min_list[index];
38417 	}
38418 
38419 	template< index_instance_type index >
rangecolor::_internal::LabCH::bound::scalar38420 	static return_image_type range() {
38421 		static const scalar_instance_type range_list[] = { 100, this_type::c_max(), 360 };
38422 		return range_list[index];
38423 	}
38424 
rangecolor::_internal::LabCH::bound::scalar38425 	static return_image_type range(index_input_const_type index) {
38426 		static const scalar_instance_type range_list[] = { 100, this_type::c_max(), 360 };
38427 		return range_list[index];
38428 	}
38429 };
38430 
38431 }
38432 }
38433 }
38434 }
38435 
38436 namespace color {
38437 namespace trait {
38438 
38439 template< >
38440 struct bound< ::color::category::LabCH_float >
38441 	: public ::color::_internal::LabCH::bound::scalar< typename ::color::trait::index< ::color::category::LabCH_float >::instance_type, float > {
38442 };
38443 
38444 template< >
38445 struct bound< ::color::category::LabCH_double >
38446 	: public ::color::_internal::LabCH::bound::scalar< typename ::color::trait::index< ::color::category::LabCH_double >::instance_type, double > {
38447 };
38448 
38449 template< >
38450 struct bound< ::color::category::LabCH_ldouble >
38451 	: public ::color::_internal::LabCH::bound::scalar< typename ::color::trait::index< ::color::category::LabCH_ldouble >::instance_type, long double > {
38452 };
38453 
38454 }
38455 }
38456 
38457 namespace color {
38458 namespace trait {
38459 
38460 template< >
38461 struct component< ::color::category::LabCH_float >
38462 	: public ::color::_internal::utility::component::array< float > {
38463 };
38464 
38465 template< >
38466 struct component< ::color::category::LabCH_double >
38467 	: public ::color::_internal::utility::component::array< double > {
38468 };
38469 
38470 template< >
38471 struct component< ::color::category::LabCH_ldouble >
38472 	: public ::color::_internal::utility::component::array< long double > {
38473 };
38474 
38475 }
38476 }
38477 
38478 namespace color {
38479 namespace trait {
38480 
38481 template< >
38482 struct component< ::color::category::LabCH_uint8 >
38483 	: public ::color::_internal::utility::component::array< std::uint8_t > {
38484 };
38485 
38486 template< >
38487 struct component< ::color::category::LabCH_uint16 >
38488 	: public ::color::_internal::utility::component::array< std::uint16_t > {
38489 };
38490 
38491 template< >
38492 struct component< ::color::category::LabCH_uint32 >
38493 	: public ::color::_internal::utility::component::array< std::uint32_t > {
38494 };
38495 
38496 template< >
38497 struct component< ::color::category::LabCH_uint64 >
38498 	: public ::color::_internal::utility::component::array< std::uint64_t > {
38499 };
38500 
38501 }
38502 }
38503 
38504 namespace color {
38505 namespace trait {
38506 
38507 template< >
38508 struct container< ::color::category::LabCH_float >
38509 	: public ::color::_internal::utility::container::array< float, 3 > {
38510 };
38511 
38512 template< >
38513 struct container< ::color::category::LabCH_double >
38514 	: public ::color::_internal::utility::container::array< double, 3 > {
38515 };
38516 
38517 template< >
38518 struct container< ::color::category::LabCH_ldouble >
38519 	: public ::color::_internal::utility::container::array< long double, 3 > {
38520 };
38521 
38522 }
38523 }
38524 
38525 namespace color {
38526 namespace trait {
38527 
38528 template< >
38529 struct container< ::color::category::LabCH_uint8 >
38530 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
38531 };
38532 
38533 template< >
38534 struct container< ::color::category::LabCH_uint16 >
38535 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
38536 };
38537 
38538 template< >
38539 struct container< ::color::category::LabCH_uint32 >
38540 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
38541 };
38542 
38543 template< >
38544 struct container< ::color::category::LabCH_uint64 >
38545 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
38546 };
38547 
38548 }
38549 }
38550 
38551 namespace color {
38552 
38553 template< typename type_name >
38554 using LabCH = ::color::model< typename ::color::category::LabCH< type_name > >;
38555 
38556 }
38557 
38558 namespace color {
38559 namespace place {
38560 namespace _internal {
38561 
38562 template< typename tag_name >
38563 struct hue< ::color::category::LabCH< tag_name > > {
38564 public:
38565 	typedef ::color::category::LabCH< tag_name > category_type;
38566 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
38567 
38568 	enum { position_enum = 2 };
38569 	enum { has_enum = true };
38570 
positioncolor::place::_internal::hue38571 	static index_instance_type position() {
38572 		return position_enum;
38573 	}
38574 };
38575 
38576 }
38577 }
38578 }
38579 
38580 namespace color {
38581 namespace check {
38582 namespace _internal {
38583 
38584 template<>
38585 struct integrity< ::color::category::LabCH_float> {
38586 public:
38587 	typedef ::color::category::LabCH_float category_type;
38588 
38589 	typedef ::color::model<category_type> model_type;
38590 	typedef ::color::trait::bound< category_type > bound_type;
38591 
38592 	enum {
38593 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
38594 	};
38595 
processcolor::check::_internal::integrity38596 	static bool process(model_type const& m) {
38597 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
38598 			return false;
38599 		}
38600 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
38601 			return false;
38602 		}
38603 		return true;
38604 	}
38605 };
38606 
38607 template<>
38608 struct integrity< ::color::category::LabCH_double > {
38609 public:
38610 	typedef ::color::category::LabCH_double category_type;
38611 
38612 	typedef ::color::model<category_type> model_type;
38613 	typedef ::color::trait::bound< category_type > bound_type;
38614 
38615 	enum {
38616 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
38617 	};
38618 
processcolor::check::_internal::integrity38619 	static bool process(model_type const& m) {
38620 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
38621 			return false;
38622 		}
38623 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
38624 			return false;
38625 		}
38626 		return true;
38627 	}
38628 };
38629 
38630 template<>
38631 struct integrity< ::color::category::LabCH_ldouble > {
38632 public:
38633 	typedef ::color::category::LabCH_ldouble category_type;
38634 
38635 	typedef ::color::model<category_type> model_type;
38636 	typedef ::color::trait::bound< category_type > bound_type;
38637 
38638 	enum {
38639 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
38640 	};
38641 
processcolor::check::_internal::integrity38642 	static bool process(model_type const& m) {
38643 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
38644 			return false;
38645 		}
38646 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
38647 			return false;
38648 		}
38649 		return true;
38650 	}
38651 };
38652 
38653 }
38654 }
38655 }
38656 
38657 namespace color {
38658 namespace place {
38659 namespace _internal {
38660 
38661 template< typename tag_name >
38662 struct chroma< ::color::category::LabCH< tag_name > > {
38663 public:
38664 	typedef ::color::category::LabCH< tag_name > category_type;
38665 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
38666 
38667 	enum { position_enum = 1 };
38668 	enum { has_enum = true };
38669 
positioncolor::place::_internal::chroma38670 	static index_instance_type position() {
38671 		return position_enum;
38672 	}
38673 };
38674 
38675 }
38676 }
38677 }
38678 
38679 namespace color {
38680 namespace place {
38681 namespace _internal {
38682 
38683 template< typename tag_name >
38684 struct lightness< ::color::category::LabCH< tag_name > > {
38685 public:
38686 	typedef ::color::category::LabCH< tag_name > category_type;
38687 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
38688 
38689 	enum { position_enum = 0 };
38690 	enum { has_enum = true };
38691 
positioncolor::place::_internal::lightness38692 	static index_instance_type position() {
38693 		return position_enum;
38694 	}
38695 };
38696 
38697 }
38698 }
38699 }
38700 
38701 namespace color {
38702 namespace check {
38703 namespace _internal {
38704 
38705 template< typename tag_name >
38706 struct unique< ::color::category::LabCH< tag_name > > {
38707 public:
38708 	typedef ::color::category::LabCH< tag_name > category_type;
38709 
38710 	typedef ::color::model<category_type> model_type;
38711 	typedef ::color::trait::bound< category_type > bound_type;
38712 
38713 	enum {
38714 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
38715 		,chroma_p = ::color::place::_internal::chroma<category_type>::position_enum
38716 		,hue_p = ::color::place::_internal::hue<category_type>::position_enum
38717 	};
38718 
processcolor::check::_internal::unique38719 	static bool process(model_type const& m) {
38720 		if(m.template get<chroma_p>() == bound_type::template minimum<chroma_p>()) {
38721 			return false;
38722 		}
38723 		if(m.template get<lightness_p>() == bound_type::template minimum<lightness_p>()) {
38724 			return false;
38725 		}
38726 		if(m.template get<lightness_p>() == bound_type::template maximum<lightness_p>()) {
38727 			if(m.template get<chroma_p>() == bound_type::template minimum<chroma_p>()) {
38728 				return false;
38729 			}
38730 		}
38731 		return true;
38732 	}
38733 };
38734 
38735 }
38736 }
38737 }
38738 
38739 namespace color {
38740 namespace fix {
38741 namespace _internal {
38742 namespace _privateLabCH {
38743 
38744 template< typename category_name >
38745 struct integrity {
38746 public:
38747 	typedef category_name category_type;
38748 
38749 	typedef typename ::color::model<category_type> model_type;
38750 	typedef typename ::color::trait::bound<category_type> bound_type;
38751 
38752 	enum {
38753 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
38754 	};
38755 
processcolor::fix::_internal::_privateLabCH::integrity38756 	static void process(model_type &result) {
38757 		if(result.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
38758 			result.template set<hue_p>(bound_type::template minimum<hue_p>());
38759 			return;
38760 		}
38761 		if(bound_type::template maximum<hue_p>() < result.template get<hue_p>()) {
38762 			result.template set<hue_p>(bound_type::template maximum<hue_p>());
38763 			return;
38764 		}
38765 	}
38766 
processcolor::fix::_internal::_privateLabCH::integrity38767 	static void process(model_type &result, model_type const& right) {
38768 		result = right;
38769 		if(result.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
38770 			result.template set<hue_p>(bound_type::template minimum<hue_p>());
38771 			return;
38772 		}
38773 		if(bound_type::template maximum<hue_p>() < result.template get<hue_p>()) {
38774 			result.template set<hue_p>(bound_type::template maximum<hue_p>());
38775 			return;
38776 		}
38777 	}
38778 
38779 };
38780 
38781 }
38782 
38783 template<> struct integrity< ::color::category::LabCH_float > : public ::color::fix::_internal::_privateLabCH::integrity< ::color::category::LabCH_float > { };
38784 template<> struct integrity< ::color::category::LabCH_double > : public ::color::fix::_internal::_privateLabCH::integrity< ::color::category::LabCH_double > { };
38785 template<> struct integrity< ::color::category::LabCH_ldouble > : public ::color::fix::_internal::_privateLabCH::integrity< ::color::category::LabCH_ldouble> { };
38786 
38787 }
38788 }
38789 }
38790 
38791 namespace color {
38792 namespace get {
38793 
38794 template< typename tag_name >
38795 inline
38796 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::LabCH<tag_name> >::akin_type >::return_type
red(::color::model<::color::category::LabCH<tag_name>> const & color_parameter)38797 red(::color::model< ::color::category::LabCH<tag_name> > const& color_parameter) {
38798 	typedef ::color::category::LabCH<tag_name> category_type;
38799 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_category_type;
38800 	enum { red_p = ::color::place::_internal::red<akin_category_type>::position_enum };
38801 	return ::color::model< akin_category_type >(color_parameter).template get<red_p>();
38802 }
38803 
38804 }
38805 }
38806 
38807 namespace color {
38808 namespace get {
38809 
38810 template< typename tag_name >
38811 inline
38812 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::LabCH<tag_name> >::akin_type >::return_type
green(::color::model<::color::category::LabCH<tag_name>> const & color_parameter)38813 green(::color::model< ::color::category::LabCH<tag_name> > const& color_parameter) {
38814 	typedef ::color::category::LabCH<tag_name> category_type;
38815 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_category_type;
38816 	enum { green_p = ::color::place::_internal::green<akin_category_type>::position_enum };
38817 	return ::color::model< akin_category_type >(color_parameter).template get<green_p>();
38818 }
38819 
38820 }
38821 }
38822 
38823 namespace color {
38824 namespace get {
38825 
38826 template< typename tag_name >
38827 inline
38828 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::LabCH<tag_name> >::akin_type >::return_type
blue(::color::model<::color::category::LabCH<tag_name>> const & color_parameter)38829 blue(::color::model< ::color::category::LabCH<tag_name> > const& color_parameter) {
38830 	typedef ::color::category::LabCH<tag_name> category_type;
38831 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_category_type;
38832 	enum { blue_p = ::color::place::_internal::blue<akin_category_type>::position_enum };
38833 	return ::color::model< akin_category_type >(color_parameter).template get<blue_p>();
38834 }
38835 
38836 }
38837 }
38838 
38839 namespace color {
38840 namespace get {
38841 
38842 template< typename tag_name >
38843 inline
38844 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::LabCH<tag_name> >::akin_type >::return_type
gray(::color::model<::color::category::LabCH<tag_name>> const & color_parameter)38845 gray(::color::model< ::color::category::LabCH<tag_name> > const& color_parameter) {
38846 	typedef ::color::category::LabCH< tag_name > category_type;
38847 	typedef typename ::color::akin::gray< category_type >::akin_type akin_category_type;
38848 	typedef ::color::_internal::reformat< akin_category_type, category_type > reformat_type;
38849 	enum {
38850 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
38851 	};
38852 	enum {
38853 		gray_p = ::color::place::_internal::gray<akin_category_type>::position_enum
38854 	};
38855 	return reformat_type::template process<gray_p,lightness_p>(color_parameter.template get<lightness_p>());
38856 }
38857 
38858 }
38859 }
38860 
38861 namespace color {
38862 namespace get {
38863 
38864 template< typename tag_name >
38865 inline
38866 typename ::color::model< ::color::category::LabCH< tag_name> >::component_const_type
hue(::color::model<::color::category::LabCH<tag_name>> const & color_parameter)38867 hue(::color::model< ::color::category::LabCH<tag_name> > const& color_parameter) {
38868 	typedef ::color::category::LabCH< tag_name> category_type;
38869 	enum {
38870 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
38871 	};
38872 	return color_parameter.template get<hue_p>();
38873 }
38874 
38875 }
38876 }
38877 
38878 namespace color {
38879 namespace get {
38880 
38881 template< typename tag_name >
38882 inline
38883 typename ::color::model< ::color::category::LabCH< tag_name> >::component_const_type
saturation(::color::model<::color::category::LabCH<tag_name>> const & c)38884 saturation(::color::model< ::color::category::LabCH< tag_name> > const& c) {
38885 	typedef ::color::category::LabCH< tag_name> category_type;
38886 	typedef typename ::color::trait::scalar<category_type> scalar_trait_type;
38887 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
38888 	enum {
38889 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
38890 		, chroma_p = ::color::place::_internal::chroma<category_type>::position_enum
38891 	};
38892 	auto const& L = c.template get< lightness_p>();
38893 	auto const& C = c.template get< chroma_p>();
38894 	if(false == scalar_trait_type::is_small(scalar_type(L))) {
38895 		return 0;
38896 	}
38897 	return C / L;
38898 }
38899 
38900 }
38901 }
38902 
38903 namespace color {
38904 namespace get {
38905 
38906 template< typename tag_name >
38907 inline
38908 typename ::color::model< ::color::category::LabCH< tag_name> >::component_const_type
lightness(::color::model<::color::category::LabCH<tag_name>> const & color_parameter)38909 lightness(::color::model< ::color::category::LabCH<tag_name> > const& color_parameter) {
38910 	typedef ::color::category::LabCH< tag_name> category_type;
38911 	enum {
38912 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
38913 	};
38914 	return color_parameter.template get<lightness_p>();
38915 }
38916 
38917 }
38918 }
38919 
38920 namespace color {
38921 namespace get {
38922 
38923 template< typename tag_name >
38924 inline
38925 typename ::color::model< ::color::category::LabCH< tag_name> >::component_const_type
chroma(::color::model<::color::category::LabCH<tag_name>> const & color_parameter)38926 chroma(::color::model< ::color::category::LabCH<tag_name> > const& color_parameter) {
38927 	typedef ::color::category::LabCH< tag_name> category_type;
38928 	enum {
38929 		chroma_p = ::color::place::_internal::chroma<category_type>::position_enum
38930 	};
38931 	return color_parameter.template get<chroma_p>();
38932 }
38933 
38934 }
38935 }
38936 
38937 namespace color {
38938 namespace set {
38939 
38940 template< typename tag_name >
38941 inline
38942 void
gray(::color::model<::color::category::LabCH<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::LabCH<tag_name>>::akin_type>::model_type component_parameter)38943 gray
38944 (
38945 	::color::model< ::color::category::LabCH< tag_name > > & color_parameter
38946 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::LabCH< tag_name > >::akin_type >::model_type component_parameter
38947 ) {
38948 	typedef ::color::category::LabCH< tag_name > category_type;
38949 	typedef typename ::color::akin::gray< category_type >::akin_type akin_category_type;
38950 	typedef ::color::_internal::reformat< category_type, akin_category_type > reformat_type;
38951 	enum {
38952 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
38953 	};
38954 	enum {
38955 		gray_p = ::color::place::_internal::lightness<akin_category_type>::position_enum
38956 	};
38957 	color_parameter.template set<lightness_p>(reformat_type::template process<lightness_p,gray_p>(component_parameter));
38958 }
38959 
38960 }
38961 }
38962 
38963 namespace color {
38964 namespace set {
38965 template< typename tag_name >
38966 inline
38967 void
lightness(::color::model<::color::category::LabCH<tag_name>> & color_parameter,typename::color::model<::color::category::LabCH<tag_name>>::component_input_const_type component_parameter)38968 lightness
38969 (
38970 	::color::model< ::color::category::LabCH<tag_name> > & color_parameter,
38971 	typename ::color::model< ::color::category::LabCH<tag_name> >::component_input_const_type component_parameter
38972 ) {
38973 	typedef ::color::category::LabCH<tag_name> category_type;
38974 	enum {
38975 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
38976 	};
38977 	color_parameter.template set<lightness_p>(component_parameter);
38978 }
38979 
38980 }
38981 }
38982 
38983 namespace color {
38984 namespace set {
38985 
38986 template< typename tag_name >
38987 inline
38988 void
red(::color::model<::color::category::LabCH<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::LabCH<tag_name>>::akin_type>::model_type component_parameter)38989 red
38990 (
38991 	::color::model< ::color::category::LabCH< tag_name > > & color_parameter
38992 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::LabCH< tag_name > >::akin_type >::model_type component_parameter
38993 ) {
38994 	typedef ::color::category::LabCH< tag_name > category_type;
38995 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
38996 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
38997 	::color::model< akin_type > rgb(color_parameter);
38998 	rgb.template set< red_p > (component_parameter);
38999 	color_parameter = rgb;
39000 }
39001 
39002 }
39003 }
39004 
39005 namespace color {
39006 namespace set {
39007 
39008 template< typename tag_name >
39009 inline
39010 void
green(::color::model<::color::category::LabCH<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::LabCH<tag_name>>::akin_type>::model_type component_parameter)39011 green
39012 (
39013 	::color::model< ::color::category::LabCH< tag_name > > & color_parameter
39014 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::LabCH< tag_name > >::akin_type >::model_type component_parameter
39015 ) {
39016 	typedef ::color::category::LabCH< tag_name > category_type;
39017 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
39018 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
39019 	::color::model< akin_type > rgb(color_parameter);
39020 	rgb.template set< green_p > (component_parameter);
39021 	color_parameter = rgb;
39022 }
39023 
39024 }
39025 }
39026 
39027 namespace color {
39028 namespace set {
39029 
39030 template< typename tag_name >
39031 inline
39032 void
blue(::color::model<::color::category::LabCH<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::LabCH<tag_name>>::akin_type>::model_type component_parameter)39033 blue
39034 (
39035 	::color::model< ::color::category::LabCH< tag_name > > & color_parameter
39036 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::LabCH< tag_name > >::akin_type >::model_type component_parameter
39037 ) {
39038 	typedef ::color::category::LabCH< tag_name > category_type;
39039 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
39040 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
39041 	::color::model< akin_type > rgb(color_parameter);
39042 	rgb.template set<blue_p > (component_parameter);
39043 	color_parameter = rgb;
39044 }
39045 
39046 }
39047 }
39048 
39049 namespace color {
39050 namespace _internal {
39051 
39052 template
39053 <
39054 	typename LabCH_tag_name
39055 	,typename gray_tag_name
39056 	>
39057 struct convert
39058 	<
39059 	::color::category::LabCH< LabCH_tag_name >
39060 	,::color::category::gray< gray_tag_name >
39061 	> {
39062 public:
39063 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39064 	typedef ::color::category::gray< gray_tag_name > category_right_type;
39065 
39066 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39067 
39068 	typedef ::color::category::LabCH< scalar_type > LabCHSCALAR_category_type;
39069 
39070 	typedef ::color::trait::bound<category_left_type> bound_left_trait_type;
39071 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39072 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39073 
39074 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
39075 	typedef ::color::_internal::reformat< category_left_type, LabCHSCALAR_category_type > reformatLabCH_type;
39076 
39077 	typedef typename container_left_trait_type::input_type container_left_input_type;
39078 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39079 
39080 	enum {
39081 		lightness_p = ::color::place::_internal::lightness<category_left_type>::position_enum
39082 		,chroma_p = ::color::place::_internal::chroma<category_left_type>::position_enum
39083 		,hue_p = ::color::place::_internal::hue<category_left_type>::position_enum
39084 	};
39085 
39086 	enum {
39087 		gray_p = ::color::place::_internal::gray<category_right_type>::position_enum
39088 	};
39089 
processcolor::_internal::convert39090 	static void process
39091 	(
39092 		container_left_input_type left
39093 		,container_right_const_input_type right
39094 	) {
39095 		container_left_trait_type::template set<0>(left, reformat_type::template process< lightness_p, 0 >(container_right_trait_type::template get<0>(right)));
39096 		container_left_trait_type::template set<1>(left, reformatLabCH_type::template process< chroma_p, 1 >(0));
39097 		container_left_trait_type::template set<2>(left, reformatLabCH_type::template process< hue_p, 2 >(0));
39098 	}
39099 };
39100 
39101 }
39102 }
39103 
39104 namespace color {
39105 namespace _internal {
39106 
39107 template
39108 <
39109 	typename LabCH_tag_name
39110 	,typename cmy_tag_name
39111 	>
39112 struct convert
39113 	<
39114 	::color::category::LabCH< LabCH_tag_name >
39115 	,::color::category::cmy< cmy_tag_name >
39116 	> {
39117 public:
39118 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39119 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_right_type;
39120 
39121 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39122 
39123 	typedef ::color::model< cmy_category_type > cmy_model_type;
39124 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39125 
39126 	typedef ::color::lab< scalar_type > lab_model_type;
39127 	typedef ::color::xyz< scalar_type > xyz_model_type;
39128 	typedef ::color::rgb< scalar_type > rgb_model_type;
39129 
39130 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39131 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39132 
39133 	typedef typename container_left_trait_type::input_type container_left_input_type;
39134 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39135 
processcolor::_internal::convert39136 	static void process
39137 	(
39138 		container_left_input_type left
39139 		,container_right_const_input_type right
39140 	) {
39141 		left = LabCH_model_type(lab_model_type(xyz_model_type(rgb_model_type(cmy_model_type(right))))).container();
39142 	}
39143 };
39144 
39145 }
39146 }
39147 
39148 namespace color {
39149 namespace _internal {
39150 
39151 template
39152 <
39153 	typename LabCH_tag_name
39154 	,typename cmyk_tag_name
39155 	>
39156 struct convert
39157 	<
39158 	::color::category::LabCH< LabCH_tag_name >
39159 	,::color::category::cmyk< cmyk_tag_name >
39160 	> {
39161 public:
39162 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39163 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
39164 
39165 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39166 
39167 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
39168 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39169 
39170 	typedef ::color::lab< scalar_type > lab_model_type;
39171 	typedef ::color::xyz< scalar_type > xyz_model_type;
39172 	typedef ::color::rgb< scalar_type > rgb_model_type;
39173 
39174 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39175 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39176 
39177 	typedef typename container_left_trait_type::input_type container_left_input_type;
39178 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39179 
processcolor::_internal::convert39180 	static void process
39181 	(
39182 		container_left_input_type left
39183 		,container_right_const_input_type right
39184 	) {
39185 		left = LabCH_model_type(lab_model_type(xyz_model_type(rgb_model_type(cmyk_model_type(right))))).container();
39186 	}
39187 };
39188 
39189 }
39190 }
39191 
39192 namespace color {
39193 namespace _internal {
39194 
39195 template
39196 <
39197 	typename LabCH_tag_name
39198 	,typename hsl_tag_name
39199 	>
39200 struct convert
39201 	<
39202 	::color::category::LabCH< LabCH_tag_name >
39203 	,::color::category::hsl< hsl_tag_name >
39204 	> {
39205 public:
39206 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39207 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
39208 
39209 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39210 
39211 	typedef ::color::model< hsl_category_type > hsl_model_type;
39212 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39213 
39214 	typedef ::color::lab< scalar_type > lab_model_type;
39215 	typedef ::color::xyz< scalar_type > xyz_model_type;
39216 	typedef ::color::rgb< scalar_type > rgb_model_type;
39217 
39218 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39219 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39220 
39221 	typedef typename container_left_trait_type::input_type container_left_input_type;
39222 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39223 
processcolor::_internal::convert39224 	static void process
39225 	(
39226 		container_left_input_type left
39227 		,container_right_const_input_type right
39228 	) {
39229 		left = LabCH_model_type(lab_model_type(xyz_model_type(rgb_model_type(hsl_model_type(right))))).container();
39230 	}
39231 };
39232 
39233 }
39234 }
39235 
39236 namespace color {
39237 namespace _internal {
39238 
39239 template
39240 <
39241 	typename LabCH_tag_name
39242 	,typename hsv_tag_name
39243 	>
39244 struct convert
39245 	<
39246 	::color::category::LabCH< LabCH_tag_name >
39247 	,::color::category::hsv< hsv_tag_name >
39248 	> {
39249 public:
39250 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39251 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
39252 
39253 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39254 
39255 	typedef ::color::model< hsv_category_type > hsv_model_type;
39256 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39257 
39258 	typedef ::color::lab< scalar_type > lab_model_type;
39259 	typedef ::color::xyz< scalar_type > xyz_model_type;
39260 	typedef ::color::rgb< scalar_type > rgb_model_type;
39261 
39262 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39263 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39264 
39265 	typedef typename container_left_trait_type::input_type container_left_input_type;
39266 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39267 
processcolor::_internal::convert39268 	static void process
39269 	(
39270 		container_left_input_type left
39271 		,container_right_const_input_type right
39272 	) {
39273 		left = LabCH_model_type(lab_model_type(xyz_model_type(rgb_model_type(hsv_model_type(right))))).container();
39274 	}
39275 };
39276 
39277 }
39278 }
39279 
39280 namespace color {
39281 namespace _internal {
39282 
39283 template
39284 <
39285 	typename LabCH_tag_name
39286 	,typename hsi_tag_name
39287 	>
39288 struct convert
39289 	<
39290 	::color::category::LabCH< LabCH_tag_name >
39291 	,::color::category::hsi< hsi_tag_name >
39292 	> {
39293 public:
39294 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39295 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
39296 
39297 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39298 
39299 	typedef ::color::model< hsi_category_type > hsi_model_type;
39300 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39301 
39302 	typedef ::color::lab< scalar_type > lab_model_type;
39303 	typedef ::color::xyz< scalar_type > xyz_model_type;
39304 	typedef ::color::rgb< scalar_type > rgb_model_type;
39305 
39306 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39307 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39308 
39309 	typedef typename container_left_trait_type::input_type container_left_input_type;
39310 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39311 
processcolor::_internal::convert39312 	static void process
39313 	(
39314 		container_left_input_type left
39315 		,container_right_const_input_type right
39316 	) {
39317 		left = LabCH_model_type(lab_model_type(xyz_model_type(rgb_model_type(hsi_model_type(right))))).container();
39318 	}
39319 };
39320 
39321 }
39322 }
39323 namespace color {
39324 namespace _internal {
39325 
39326 template
39327 <
39328 	typename LabCH_tag_name
39329 	,typename hwb_tag_name
39330 	>
39331 struct convert
39332 	<
39333 	::color::category::LabCH< LabCH_tag_name >
39334 	,::color::category::hwb< hwb_tag_name >
39335 	> {
39336 public:
39337 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39338 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
39339 
39340 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39341 
39342 	typedef ::color::model< hwb_category_type > hwb_model_type;
39343 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39344 
39345 	typedef ::color::lab< scalar_type > lab_model_type;
39346 	typedef ::color::xyz< scalar_type > xyz_model_type;
39347 	typedef ::color::rgb< scalar_type > rgb_model_type;
39348 	typedef ::color::hsv< scalar_type > hsv_model_type;
39349 
39350 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39351 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39352 
39353 	typedef typename container_left_trait_type::input_type container_left_input_type;
39354 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39355 
processcolor::_internal::convert39356 	static void process
39357 	(
39358 		container_left_input_type left
39359 		,container_right_const_input_type right
39360 	) {
39361 		left = LabCH_model_type(lab_model_type(xyz_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right)))))).container();
39362 	}
39363 };
39364 
39365 }
39366 }
39367 
39368 namespace color {
39369 namespace _internal {
39370 
39371 template
39372 <
39373 	typename LabCH_tag_name
39374 	,typename rgb_tag_name
39375 	>
39376 struct convert
39377 	<
39378 	::color::category::LabCH< LabCH_tag_name >
39379 	,::color::category::rgb< rgb_tag_name >
39380 	> {
39381 public:
39382 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39383 	typedef ::color::category::rgb< rgb_tag_name > rgb_category_type, category_right_type;
39384 
39385 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39386 
39387 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39388 	typedef ::color::model< rgb_category_type > rgb_model_type;
39389 
39390 	typedef ::color::xyz< scalar_type > xyz_model_type;
39391 	typedef ::color::lab< scalar_type > lab_model_type;
39392 
39393 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39394 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39395 
39396 	typedef typename container_left_trait_type::input_type container_left_input_type;
39397 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39398 
processcolor::_internal::convert39399 	static void process
39400 	(
39401 		container_left_input_type left
39402 		,container_right_const_input_type right
39403 	) {
39404 		left = LabCH_model_type(lab_model_type(xyz_model_type(rgb_model_type(right)))).container();
39405 	}
39406 };
39407 
39408 }
39409 }
39410 
39411 namespace color {
39412 namespace _internal {
39413 
39414 template
39415 <
39416 	typename LabCH_tag_name
39417 	,typename yiq_tag_name
39418 	>
39419 struct convert
39420 	<
39421 	::color::category::LabCH< LabCH_tag_name >
39422 	,::color::category::yiq< yiq_tag_name >
39423 	> {
39424 public:
39425 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39426 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
39427 
39428 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39429 
39430 	typedef ::color::model< yiq_category_type > yiq_model_type;
39431 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39432 
39433 	typedef ::color::lab< scalar_type > lab_model_type;
39434 	typedef ::color::xyz< scalar_type > xyz_model_type;
39435 	typedef ::color::rgb< scalar_type > rgb_model_type;
39436 
39437 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39438 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39439 
39440 	typedef typename container_left_trait_type::input_type container_left_input_type;
39441 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39442 
processcolor::_internal::convert39443 	static void process
39444 	(
39445 		container_left_input_type left
39446 		,container_right_const_input_type right
39447 	) {
39448 		left = LabCH_model_type(lab_model_type(xyz_model_type(rgb_model_type(yiq_model_type(right))))).container();
39449 	}
39450 };
39451 
39452 }
39453 }
39454 
39455 namespace color {
39456 namespace _internal {
39457 
39458 template
39459 <
39460 	typename LabCH_tag_name
39461 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum reference_number
39462 	>
39463 struct convert
39464 	<
39465 	::color::category::LabCH< LabCH_tag_name >
39466 	,::color::category::yuv< yuv_tag_name, reference_number >
39467 	> {
39468 public:
39469 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39470 	typedef ::color::category::yuv< yuv_tag_name, reference_number > yuv_category_type, category_right_type;
39471 
39472 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39473 
39474 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39475 	typedef ::color::model< yuv_category_type > yuv_model_type;
39476 
39477 	typedef ::color::lab< scalar_type > lab_model_type;
39478 	typedef ::color::xyz< scalar_type > xyz_model_type;
39479 	typedef ::color::rgb< scalar_type > rgb_model_type;
39480 
39481 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39482 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39483 
39484 	typedef typename container_left_trait_type::input_type container_left_input_type;
39485 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39486 
processcolor::_internal::convert39487 	static void process
39488 	(
39489 		container_left_input_type left
39490 		,container_right_const_input_type right
39491 	) {
39492 		left = LabCH_model_type(lab_model_type(xyz_model_type(rgb_model_type(yuv_model_type(right))))).container();
39493 	}
39494 };
39495 
39496 }
39497 }
39498 
39499 namespace color {
39500 namespace _internal {
39501 
39502 template
39503 <
39504 	typename LabCH_tag_name
39505 	,typename YCgCo_tag_name
39506 	>
39507 struct convert
39508 	<
39509 	::color::category::LabCH< LabCH_tag_name >
39510 	,::color::category::YCgCo< YCgCo_tag_name >
39511 	> {
39512 public:
39513 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39514 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
39515 
39516 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39517 
39518 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
39519 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39520 
39521 	typedef ::color::lab< scalar_type > lab_model_type;
39522 	typedef ::color::xyz< scalar_type > xyz_model_type;
39523 	typedef ::color::rgb< scalar_type > rgb_model_type;
39524 
39525 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39526 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39527 
39528 	typedef typename container_left_trait_type::input_type container_left_input_type;
39529 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39530 
processcolor::_internal::convert39531 	static void process
39532 	(
39533 		container_left_input_type left
39534 		,container_right_const_input_type right
39535 	) {
39536 		left = LabCH_model_type(lab_model_type(xyz_model_type(rgb_model_type(YCgCo_model_type(right))))).container();
39537 	}
39538 };
39539 
39540 }
39541 }
39542 
39543 namespace color {
39544 namespace _internal {
39545 
39546 template
39547 <
39548 	typename LabCH_tag_name
39549 	,typename YDbDr_tag_name
39550 	>
39551 struct convert
39552 	<
39553 	::color::category::LabCH< LabCH_tag_name >
39554 	,::color::category::YDbDr< YDbDr_tag_name >
39555 	> {
39556 public:
39557 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39558 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
39559 
39560 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39561 
39562 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
39563 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39564 
39565 	typedef ::color::lab< scalar_type > lab_model_type;
39566 	typedef ::color::xyz< scalar_type > xyz_model_type;
39567 	typedef ::color::rgb< scalar_type > rgb_model_type;
39568 
39569 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39570 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39571 
39572 	typedef typename container_left_trait_type::input_type container_left_input_type;
39573 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39574 
processcolor::_internal::convert39575 	static void process
39576 	(
39577 		container_left_input_type left
39578 		,container_right_const_input_type right
39579 	) {
39580 		left = LabCH_model_type(lab_model_type(xyz_model_type(rgb_model_type(YDbDr_model_type(right))))).container();
39581 	}
39582 };
39583 
39584 }
39585 }
39586 
39587 namespace color {
39588 namespace _internal {
39589 
39590 template
39591 <
39592 	typename LabCH_tag_name
39593 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum reference_number
39594 	>
39595 struct convert
39596 	<
39597 	::color::category::LabCH< LabCH_tag_name >
39598 	,::color::category::YPbPr< YPbPr_tag_name, reference_number >
39599 	> {
39600 public:
39601 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39602 	typedef ::color::category::YPbPr< YPbPr_tag_name, reference_number > YPbPr_category_type, category_right_type;
39603 
39604 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39605 
39606 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
39607 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39608 
39609 	typedef ::color::lab< scalar_type > lab_model_type;
39610 	typedef ::color::xyz< scalar_type > xyz_model_type;
39611 	typedef ::color::rgb< scalar_type > rgb_model_type;
39612 
39613 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39614 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39615 
39616 	typedef typename container_left_trait_type::input_type container_left_input_type;
39617 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39618 
processcolor::_internal::convert39619 	static void process
39620 	(
39621 		container_left_input_type left
39622 		,container_right_const_input_type right
39623 	) {
39624 		left = LabCH_model_type(lab_model_type(xyz_model_type(rgb_model_type(YPbPr_model_type(right))))).container();
39625 	}
39626 };
39627 
39628 }
39629 }
39630 
39631 namespace color {
39632 namespace _internal {
39633 
39634 template
39635 <
39636 	typename LabCH_tag_name
39637 	,typename xyz_tag_name
39638 	>
39639 struct convert
39640 	<
39641 	::color::category::LabCH< LabCH_tag_name >
39642 	,::color::category::xyz< xyz_tag_name >
39643 	> {
39644 public:
39645 
39646 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39647 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
39648 
39649 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39650 
39651 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39652 	typedef ::color::model< xyz_category_type > xyz_model_type;
39653 
39654 	typedef ::color::lab< scalar_type > lab_model_type;
39655 
39656 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39657 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39658 
39659 	typedef typename container_left_trait_type::input_type container_left_input_type;
39660 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39661 
processcolor::_internal::convert39662 	static void process
39663 	(
39664 		container_left_input_type left
39665 		,container_right_const_input_type right
39666 	) {
39667 		left = LabCH_model_type(lab_model_type(xyz_model_type(right))).container();
39668 	}
39669 
39670 };
39671 
39672 }
39673 }
39674 
39675 namespace color {
39676 namespace _internal {
39677 
39678 template
39679 <
39680 	typename LabCH_tag_name
39681 	,typename lab_tag_name
39682 	>
39683 struct convert
39684 	<
39685 	::color::category::LabCH< LabCH_tag_name >
39686 	,::color::category::lab< lab_tag_name, ::color::constant::lab::CIE_entity >
39687 	> {
39688 public:
39689 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39690 	typedef ::color::category::lab< lab_tag_name, ::color::constant::lab::CIE_entity > lab_category_type, category_right_type;
39691 
39692 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39693 
39694 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39695 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39696 
39697 	typedef typename container_left_trait_type::input_type container_left_input_type;
39698 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39699 
39700 	typedef typename ::color::LabCH< scalar_type >::category_type LabCHscalar_category_type;
39701 	typedef typename ::color::lab< scalar_type >::category_type LABscalar_category_type;
39702 
39703 	typedef ::color::_internal::reformat< category_left_type, LabCHscalar_category_type > reformatCH_type;
39704 	typedef ::color::_internal::reformat< LABscalar_category_type, category_right_type > reformatAB_type;
39705 
39706 	typedef ::color::constant::generic< LABscalar_category_type > generic_costant_type;
39707 
39708 	enum {
39709 		lightness_p = ::color::place::_internal::lightness<category_left_type>::position_enum
39710 		,chroma_p = ::color::place::_internal::chroma<category_left_type>::position_enum
39711 		,hue_p = ::color::place::_internal::hue<category_left_type>::position_enum
39712 	};
39713 
processcolor::_internal::convert39714 	static void process
39715 	(
39716 		container_left_input_type left
39717 		,container_right_const_input_type right
39718 	) {
39719 		scalar_type l = reformatAB_type::template process< 0, 0 >(container_right_trait_type::template get<0>(right));
39720 		scalar_type a = reformatAB_type::template process< 1, 1 >(container_right_trait_type::template get<1>(right));
39721 		scalar_type b = reformatAB_type::template process< 2, 2 >(container_right_trait_type::template get<2>(right));
39722 		scalar_type c = sqrt(a*a + b*b);
39723 		scalar_type h = atan2(b, a) * generic_costant_type::rad2deg();
39724 		if(h < 0) {
39725 			h += 360;
39726 		}
39727 		container_left_trait_type::template set<lightness_p>(left, reformatCH_type::template process< lightness_p, 0 >(l));
39728 		container_left_trait_type::template set<chroma_p >(left, reformatCH_type::template process< chroma_p, 1 >(c));
39729 		container_left_trait_type::template set<hue_p >(left, reformatCH_type::template process< hue_p, 2 >(h));
39730 	}
39731 };
39732 
39733 template
39734 <
39735 	typename LabCH_tag_name
39736 	,typename lab_tag_name
39737 	>
39738 struct convert
39739 	<
39740 	::color::category::LabCH< LabCH_tag_name >
39741 	,::color::category::lab< lab_tag_name, ::color::constant::lab::Hunter_entity >
39742 	> {
39743 public:
39744 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39745 	typedef ::color::category::lab< lab_tag_name, ::color::constant::lab::Hunter_entity > lab_category_type, category_right_type;
39746 
39747 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39748 
39749 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39750 	typedef ::color::model< lab_category_type > lab_model_type;
39751 
39752 	typedef ::color::xyz< scalar_type > xyz_model_type;
39753 
39754 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39755 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39756 
39757 	typedef typename container_left_trait_type::input_type container_left_input_type;
39758 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39759 
processcolor::_internal::convert39760 	static void process
39761 	(
39762 		container_left_input_type left
39763 		,container_right_const_input_type right
39764 	) {
39765 		left = LabCH_model_type(xyz_model_type(lab_model_type(right))).container();
39766 	}
39767 };
39768 
39769 }
39770 }
39771 
39772 namespace color {
39773 namespace _internal {
39774 
39775 template
39776 <
39777 	typename LabCH_tag_name
39778 	,typename xyy_tag_name
39779 	>
39780 struct convert
39781 	<
39782 	::color::category::LabCH< LabCH_tag_name >
39783 	,::color::category::xyy< xyy_tag_name >
39784 	> {
39785 public:
39786 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39787 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
39788 
39789 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39790 
39791 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39792 	typedef ::color::model< xyy_category_type > xyy_model_type;
39793 
39794 	typedef ::color::xyz< scalar_type > xyz_model_type;
39795 	typedef ::color::lab< scalar_type > lab_model_type;
39796 
39797 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39798 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39799 
39800 	typedef typename container_left_trait_type::input_type container_left_input_type;
39801 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39802 
processcolor::_internal::convert39803 	static void process
39804 	(
39805 		container_left_input_type left
39806 		,container_right_const_input_type right
39807 	) {
39808 		left = LabCH_model_type(lab_model_type(xyz_model_type(xyy_model_type(right)))).container();
39809 	}
39810 };
39811 
39812 }
39813 }
39814 
39815 namespace color {
39816 namespace _internal {
39817 
39818 template
39819 <
39820 	typename LabCH_tag_name
39821 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
39822 	>
39823 struct convert
39824 	<
39825 	::color::category::LabCH< LabCH_tag_name >
39826 	,::color::category::lms< lms_tag_name, lms_reference_number >
39827 	> {
39828 public:
39829 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39830 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
39831 
39832 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39833 
39834 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39835 	typedef ::color::model< lms_category_type > lms_model_type;
39836 
39837 	typedef ::color::xyz< scalar_type > xyz_model_type;
39838 	typedef ::color::rgb< scalar_type > rgb_model_type;
39839 	typedef ::color::hsv< scalar_type > hsv_model_type;
39840 
39841 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39842 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39843 
39844 	typedef typename container_left_trait_type::input_type container_left_input_type;
39845 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39846 
processcolor::_internal::convert39847 	static void process
39848 	(
39849 		container_left_input_type left
39850 		,container_right_const_input_type right
39851 	) {
39852 		left = LabCH_model_type(hsv_model_type(rgb_model_type(xyz_model_type(lms_model_type(right))))).container();
39853 	}
39854 };
39855 
39856 }
39857 }
39858 
39859 namespace color {
39860 namespace _internal {
39861 
39862 template
39863 <
39864 	typename LabCH_tag_name
39865 	,typename luv_tag_name
39866 	>
39867 struct convert
39868 	<
39869 	::color::category::LabCH< LabCH_tag_name >
39870 	,::color::category::luv< luv_tag_name >
39871 	> {
39872 public:
39873 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
39874 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
39875 
39876 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
39877 
39878 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
39879 	typedef ::color::model< luv_category_type > luv_model_type;
39880 
39881 	typedef ::color::xyz< scalar_type > xyz_model_type;
39882 	typedef ::color::lab< scalar_type > lab_model_type;
39883 
39884 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39885 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39886 
39887 	typedef typename container_left_trait_type::input_type container_left_input_type;
39888 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
39889 
processcolor::_internal::convert39890 	static void process
39891 	(
39892 		container_left_input_type left
39893 		,container_right_const_input_type right
39894 	) {
39895 		left = LabCH_model_type(lab_model_type(xyz_model_type(luv_model_type(right)))).container();
39896 	}
39897 };
39898 
39899 }
39900 }
39901 
39902 namespace color {
39903 namespace _internal {
39904 
39905 template
39906 <
39907 	typename tag_left_name
39908 	,typename tag_right_name
39909 	>
39910 struct convert
39911 	<
39912 	::color::category::LabCH< tag_left_name >
39913 	,::color::category::LabCH< tag_right_name>
39914 	> {
39915 public:
39916 	typedef ::color::category::LabCH< tag_left_name > category_left_type;
39917 	typedef ::color::category::LabCH< tag_right_name> category_right_type;
39918 
39919 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
39920 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
39921 
39922 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
39923 
39924 	typedef typename container_left_trait_type::input_type container_left_input_type;
39925 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
processcolor::_internal::convert39926 	static void process
39927 	(
39928 		container_left_input_type left
39929 		,container_right_const_input_type right
39930 	) {
39931 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
39932 		container_left_trait_type::template set<1>(left, reformat_type::template process<1,1>(container_right_trait_type::template get<1>(right)));
39933 		container_left_trait_type::template set<2>(left, reformat_type::template process<2,2>(container_right_trait_type::template get<2>(right)));
39934 	}
39935 };
39936 
39937 }
39938 }
39939 
39940 namespace color {
39941 namespace akin {
39942 
39943 template< >struct LuvCH< ::color::category::gray_uint8 > {
39944 	typedef ::color::category::LuvCH_uint8 akin_type;
39945 };
39946 template< >struct LuvCH< ::color::category::gray_uint16 > {
39947 	typedef ::color::category::LuvCH_uint16 akin_type;
39948 };
39949 template< >struct LuvCH< ::color::category::gray_uint32 > {
39950 	typedef ::color::category::LuvCH_uint32 akin_type;
39951 };
39952 template< >struct LuvCH< ::color::category::gray_uint64 > {
39953 	typedef ::color::category::LuvCH_uint64 akin_type;
39954 };
39955 template< >struct LuvCH< ::color::category::gray_float > {
39956 	typedef ::color::category::LuvCH_float akin_type;
39957 };
39958 template< >struct LuvCH< ::color::category::gray_double > {
39959 	typedef ::color::category::LuvCH_double akin_type;
39960 };
39961 template< >struct LuvCH< ::color::category::gray_ldouble > {
39962 	typedef ::color::category::LuvCH_ldouble akin_type;
39963 };
39964 
39965 }
39966 }
39967 
39968 namespace color {
39969 namespace akin {
39970 
39971 template< typename tag_name >
39972 struct LuvCH< ::color::category::cmy< tag_name > > {
39973 public:
39974 	typedef ::color::category::LuvCH< tag_name > akin_type;
39975 };
39976 
39977 }
39978 }
39979 
39980 namespace color {
39981 namespace akin {
39982 
39983 template< >struct LuvCH< ::color::category::cmyk_uint8 > {
39984 	typedef ::color::category::LuvCH_uint8 akin_type;
39985 };
39986 template< >struct LuvCH< ::color::category::cmyk_uint16 > {
39987 	typedef ::color::category::LuvCH_uint16 akin_type;
39988 };
39989 template< >struct LuvCH< ::color::category::cmyk_uint32 > {
39990 	typedef ::color::category::LuvCH_uint32 akin_type;
39991 };
39992 template< >struct LuvCH< ::color::category::cmyk_uint64 > {
39993 	typedef ::color::category::LuvCH_uint64 akin_type;
39994 };
39995 template< >struct LuvCH< ::color::category::cmyk_float > {
39996 	typedef ::color::category::LuvCH_float akin_type;
39997 };
39998 template< >struct LuvCH< ::color::category::cmyk_double > {
39999 	typedef ::color::category::LuvCH_double akin_type;
40000 };
40001 template< >struct LuvCH< ::color::category::cmyk_ldouble > {
40002 	typedef ::color::category::LuvCH_ldouble akin_type;
40003 };
40004 
40005 }
40006 }
40007 
40008 namespace color {
40009 namespace akin {
40010 
40011 template< >struct LuvCH< ::color::category::hsl_uint8 > {
40012 	typedef ::color::category::LuvCH_uint8 akin_type;
40013 };
40014 template< >struct LuvCH< ::color::category::hsl_uint16 > {
40015 	typedef ::color::category::LuvCH_uint16 akin_type;
40016 };
40017 template< >struct LuvCH< ::color::category::hsl_uint32 > {
40018 	typedef ::color::category::LuvCH_uint32 akin_type;
40019 };
40020 template< >struct LuvCH< ::color::category::hsl_uint64 > {
40021 	typedef ::color::category::LuvCH_uint64 akin_type;
40022 };
40023 template< >struct LuvCH< ::color::category::hsl_float > {
40024 	typedef ::color::category::LuvCH_float akin_type;
40025 };
40026 template< >struct LuvCH< ::color::category::hsl_double > {
40027 	typedef ::color::category::LuvCH_double akin_type;
40028 };
40029 template< >struct LuvCH< ::color::category::hsl_ldouble > {
40030 	typedef ::color::category::LuvCH_ldouble akin_type;
40031 };
40032 
40033 }
40034 }
40035 
40036 namespace color {
40037 namespace akin {
40038 
40039 template< >struct LuvCH< ::color::category::hsv_uint8 > {
40040 	typedef ::color::category::LuvCH_uint8 akin_type;
40041 };
40042 template< >struct LuvCH< ::color::category::hsv_uint16 > {
40043 	typedef ::color::category::LuvCH_uint16 akin_type;
40044 };
40045 template< >struct LuvCH< ::color::category::hsv_uint32 > {
40046 	typedef ::color::category::LuvCH_uint32 akin_type;
40047 };
40048 template< >struct LuvCH< ::color::category::hsv_uint64 > {
40049 	typedef ::color::category::LuvCH_uint64 akin_type;
40050 };
40051 template< >struct LuvCH< ::color::category::hsv_float > {
40052 	typedef ::color::category::LuvCH_float akin_type;
40053 };
40054 template< >struct LuvCH< ::color::category::hsv_double > {
40055 	typedef ::color::category::LuvCH_double akin_type;
40056 };
40057 template< >struct LuvCH< ::color::category::hsv_ldouble > {
40058 	typedef ::color::category::LuvCH_ldouble akin_type;
40059 };
40060 
40061 }
40062 }
40063 
40064 namespace color {
40065 namespace akin {
40066 
40067 template< >struct LuvCH< ::color::category::hsi_uint8 > {
40068 	typedef ::color::category::LuvCH_uint8 akin_type;
40069 };
40070 template< >struct LuvCH< ::color::category::hsi_uint16 > {
40071 	typedef ::color::category::LuvCH_uint16 akin_type;
40072 };
40073 template< >struct LuvCH< ::color::category::hsi_uint32 > {
40074 	typedef ::color::category::LuvCH_uint32 akin_type;
40075 };
40076 template< >struct LuvCH< ::color::category::hsi_uint64 > {
40077 	typedef ::color::category::LuvCH_uint64 akin_type;
40078 };
40079 template< >struct LuvCH< ::color::category::hsi_float > {
40080 	typedef ::color::category::LuvCH_float akin_type;
40081 };
40082 template< >struct LuvCH< ::color::category::hsi_double > {
40083 	typedef ::color::category::LuvCH_double akin_type;
40084 };
40085 template< >struct LuvCH< ::color::category::hsi_ldouble > {
40086 	typedef ::color::category::LuvCH_ldouble akin_type;
40087 };
40088 
40089 }
40090 }
40091 
40092 namespace color {
40093 namespace akin {
40094 
40095 template
40096 <
40097 	typename tag_name
40098 
40099 	>
40100 struct LuvCH< ::color::category::hwb< tag_name > > {
40101 public:
40102 	typedef ::color::category::LuvCH< tag_name > akin_type;
40103 };
40104 
40105 }
40106 }
40107 
40108 namespace color {
40109 namespace akin {
40110 
40111 template< >struct LuvCH< ::color::category::rgb_uint8 > {
40112 	typedef ::color::category::LuvCH_uint8 akin_type;
40113 };
40114 template< >struct LuvCH< ::color::category::rgb_uint16 > {
40115 	typedef ::color::category::LuvCH_uint16 akin_type;
40116 };
40117 template< >struct LuvCH< ::color::category::rgb_uint32 > {
40118 	typedef ::color::category::LuvCH_uint32 akin_type;
40119 };
40120 template< >struct LuvCH< ::color::category::rgb_uint64 > {
40121 	typedef ::color::category::LuvCH_uint64 akin_type;
40122 };
40123 template< >struct LuvCH< ::color::category::rgb_float > {
40124 	typedef ::color::category::LuvCH_float akin_type;
40125 };
40126 template< >struct LuvCH< ::color::category::rgb_double > {
40127 	typedef ::color::category::LuvCH_double akin_type;
40128 };
40129 template< >struct LuvCH< ::color::category::rgb_ldouble > {
40130 	typedef ::color::category::LuvCH_ldouble akin_type;
40131 };
40132 
40133 }
40134 }
40135 
40136 namespace color {
40137 namespace akin {
40138 
40139 template< >struct LuvCH< ::color::category::yiq_uint8 > {
40140 	typedef ::color::category::LuvCH_uint8 akin_type;
40141 };
40142 template< >struct LuvCH< ::color::category::yiq_uint16 > {
40143 	typedef ::color::category::LuvCH_uint16 akin_type;
40144 };
40145 template< >struct LuvCH< ::color::category::yiq_uint32 > {
40146 	typedef ::color::category::LuvCH_uint32 akin_type;
40147 };
40148 template< >struct LuvCH< ::color::category::yiq_uint64 > {
40149 	typedef ::color::category::LuvCH_uint64 akin_type;
40150 };
40151 template< >struct LuvCH< ::color::category::yiq_float > {
40152 	typedef ::color::category::LuvCH_float akin_type;
40153 };
40154 template< >struct LuvCH< ::color::category::yiq_double > {
40155 	typedef ::color::category::LuvCH_double akin_type;
40156 };
40157 template< >struct LuvCH< ::color::category::yiq_ldouble > {
40158 	typedef ::color::category::LuvCH_ldouble akin_type;
40159 };
40160 
40161 }
40162 }
40163 
40164 namespace color {
40165 namespace akin {
40166 
40167 template< ::color::constant::yuv::reference_enum reference_number >struct LuvCH< ::color::category::yuv_uint8 <reference_number> > {
40168 	typedef ::color::category::LuvCH_uint8 akin_type;
40169 };
40170 template< ::color::constant::yuv::reference_enum reference_number >struct LuvCH< ::color::category::yuv_uint16 <reference_number> > {
40171 	typedef ::color::category::LuvCH_uint16 akin_type;
40172 };
40173 template< ::color::constant::yuv::reference_enum reference_number >struct LuvCH< ::color::category::yuv_uint32 <reference_number> > {
40174 	typedef ::color::category::LuvCH_uint32 akin_type;
40175 };
40176 template< ::color::constant::yuv::reference_enum reference_number >struct LuvCH< ::color::category::yuv_uint64 <reference_number> > {
40177 	typedef ::color::category::LuvCH_uint64 akin_type;
40178 };
40179 template< ::color::constant::yuv::reference_enum reference_number >struct LuvCH< ::color::category::yuv_float <reference_number> > {
40180 	typedef ::color::category::LuvCH_float akin_type;
40181 };
40182 template< ::color::constant::yuv::reference_enum reference_number >struct LuvCH< ::color::category::yuv_double <reference_number> > {
40183 	typedef ::color::category::LuvCH_double akin_type;
40184 };
40185 template< ::color::constant::yuv::reference_enum reference_number >struct LuvCH< ::color::category::yuv_ldouble<reference_number> > {
40186 	typedef ::color::category::LuvCH_ldouble akin_type;
40187 };
40188 
40189 }
40190 }
40191 
40192 namespace color {
40193 namespace akin {
40194 
40195 template< >struct LuvCH< ::color::category::YCgCo_uint8 > {
40196 	typedef ::color::category::LuvCH_uint8 akin_type;
40197 };
40198 template< >struct LuvCH< ::color::category::YCgCo_uint16 > {
40199 	typedef ::color::category::LuvCH_uint16 akin_type;
40200 };
40201 template< >struct LuvCH< ::color::category::YCgCo_uint32 > {
40202 	typedef ::color::category::LuvCH_uint32 akin_type;
40203 };
40204 template< >struct LuvCH< ::color::category::YCgCo_uint64 > {
40205 	typedef ::color::category::LuvCH_uint64 akin_type;
40206 };
40207 template< >struct LuvCH< ::color::category::YCgCo_float > {
40208 	typedef ::color::category::LuvCH_float akin_type;
40209 };
40210 template< >struct LuvCH< ::color::category::YCgCo_double > {
40211 	typedef ::color::category::LuvCH_double akin_type;
40212 };
40213 template< >struct LuvCH< ::color::category::YCgCo_ldouble > {
40214 	typedef ::color::category::LuvCH_ldouble akin_type;
40215 };
40216 
40217 }
40218 }
40219 
40220 namespace color {
40221 namespace akin {
40222 
40223 template< >struct LuvCH< ::color::category::YDbDr_uint8 > {
40224 	typedef ::color::category::LuvCH_uint8 akin_type;
40225 };
40226 template< >struct LuvCH< ::color::category::YDbDr_uint16 > {
40227 	typedef ::color::category::LuvCH_uint16 akin_type;
40228 };
40229 template< >struct LuvCH< ::color::category::YDbDr_uint32 > {
40230 	typedef ::color::category::LuvCH_uint32 akin_type;
40231 };
40232 template< >struct LuvCH< ::color::category::YDbDr_uint64 > {
40233 	typedef ::color::category::LuvCH_uint64 akin_type;
40234 };
40235 template< >struct LuvCH< ::color::category::YDbDr_float > {
40236 	typedef ::color::category::LuvCH_float akin_type;
40237 };
40238 template< >struct LuvCH< ::color::category::YDbDr_double > {
40239 	typedef ::color::category::LuvCH_double akin_type;
40240 };
40241 template< >struct LuvCH< ::color::category::YDbDr_ldouble > {
40242 	typedef ::color::category::LuvCH_ldouble akin_type;
40243 };
40244 
40245 }
40246 }
40247 
40248 namespace color {
40249 namespace akin {
40250 
40251 template< ::color::constant::YPbPr::reference_enum reference_number >struct LuvCH< ::color::category::YPbPr_uint8 <reference_number> > {
40252 	typedef ::color::category::LuvCH_uint8 akin_type;
40253 };
40254 template< ::color::constant::YPbPr::reference_enum reference_number >struct LuvCH< ::color::category::YPbPr_uint16 <reference_number> > {
40255 	typedef ::color::category::LuvCH_uint16 akin_type;
40256 };
40257 template< ::color::constant::YPbPr::reference_enum reference_number >struct LuvCH< ::color::category::YPbPr_uint32 <reference_number> > {
40258 	typedef ::color::category::LuvCH_uint32 akin_type;
40259 };
40260 template< ::color::constant::YPbPr::reference_enum reference_number >struct LuvCH< ::color::category::YPbPr_uint64 <reference_number> > {
40261 	typedef ::color::category::LuvCH_uint64 akin_type;
40262 };
40263 template< ::color::constant::YPbPr::reference_enum reference_number >struct LuvCH< ::color::category::YPbPr_float <reference_number> > {
40264 	typedef ::color::category::LuvCH_float akin_type;
40265 };
40266 template< ::color::constant::YPbPr::reference_enum reference_number >struct LuvCH< ::color::category::YPbPr_double <reference_number> > {
40267 	typedef ::color::category::LuvCH_double akin_type;
40268 };
40269 template< ::color::constant::YPbPr::reference_enum reference_number >struct LuvCH< ::color::category::YPbPr_ldouble<reference_number> > {
40270 	typedef ::color::category::LuvCH_ldouble akin_type;
40271 };
40272 
40273 }
40274 }
40275 
40276 namespace color {
40277 namespace akin {
40278 
40279 template< >struct LuvCH< ::color::category::xyz_uint8 > {
40280 	typedef ::color::category::LuvCH_uint8 akin_type;
40281 };
40282 template< >struct LuvCH< ::color::category::xyz_uint16 > {
40283 	typedef ::color::category::LuvCH_uint16 akin_type;
40284 };
40285 template< >struct LuvCH< ::color::category::xyz_uint32 > {
40286 	typedef ::color::category::LuvCH_uint32 akin_type;
40287 };
40288 template< >struct LuvCH< ::color::category::xyz_uint64 > {
40289 	typedef ::color::category::LuvCH_uint64 akin_type;
40290 };
40291 template< >struct LuvCH< ::color::category::xyz_float > {
40292 	typedef ::color::category::LuvCH_float akin_type;
40293 };
40294 template< >struct LuvCH< ::color::category::xyz_double > {
40295 	typedef ::color::category::LuvCH_double akin_type;
40296 };
40297 template< >struct LuvCH< ::color::category::xyz_ldouble > {
40298 	typedef ::color::category::LuvCH_ldouble akin_type;
40299 };
40300 
40301 }
40302 }
40303 
40304 namespace color {
40305 namespace akin {
40306 
40307 template< typename tag_name, ::color::constant::lab::reference_enum reference_number >
40308 struct LuvCH< ::color::category::lab< tag_name, reference_number > > {
40309 public:
40310 	typedef ::color::category::LuvCH< tag_name > akin_type;
40311 };
40312 
40313 }
40314 }
40315 
40316 namespace color {
40317 namespace akin {
40318 
40319 template< typename tag_name >
40320 struct LuvCH< ::color::category::xyy< tag_name > > {
40321 public:
40322 	typedef ::color::category::LuvCH< tag_name > akin_type;
40323 };
40324 
40325 }
40326 }
40327 
40328 namespace color {
40329 namespace akin {
40330 
40331 template
40332 <
40333 	typename tag_name
40334 	,::color::constant::lms::reference_enum reference_number
40335 
40336 	>
40337 struct LuvCH< ::color::category::lms< tag_name, reference_number > > {
40338 public:
40339 	typedef ::color::category::LuvCH< tag_name > akin_type;
40340 };
40341 
40342 }
40343 }
40344 
40345 namespace color {
40346 namespace akin {
40347 
40348 template< typename tag_name >
40349 struct LuvCH< ::color::category::luv< tag_name > > {
40350 public:
40351 	typedef ::color::category::LuvCH< tag_name > akin_type;
40352 };
40353 
40354 }
40355 }
40356 
40357 namespace color {
40358 namespace akin {
40359 
40360 template< typename tag_name >
40361 struct LuvCH< ::color::category::LabCH< tag_name > > {
40362 public:
40363 	typedef ::color::category::LuvCH< tag_name > akin_type;
40364 };
40365 
40366 }
40367 }
40368 
40369 namespace color {
40370 namespace akin {
40371 
40372 template< typename tag_name >
40373 struct LuvCH< ::color::category::LuvCH< tag_name > > {
40374 public:
40375 	typedef ::color::category::LuvCH< tag_name > akin_type;
40376 };
40377 
40378 }
40379 }
40380 
40381 namespace color {
40382 namespace trait {
40383 
40384 template <> struct info< ::color::category::LuvCH_uint8 > {
40385 public:
40386 	enum { implemented_entity = true };
40387 	enum { meaningful_entity = true };
40388 };
40389 template <> struct info< ::color::category::LuvCH_uint16 > {
40390 public:
40391 	enum { implemented_entity = true };
40392 	enum { meaningful_entity = true };
40393 };
40394 template <> struct info< ::color::category::LuvCH_uint32 > {
40395 public:
40396 	enum { implemented_entity = true };
40397 	enum { meaningful_entity = true };
40398 };
40399 template <> struct info< ::color::category::LuvCH_uint64 > {
40400 public:
40401 	enum { implemented_entity = true };
40402 	enum { meaningful_entity = true };
40403 };
40404 template <> struct info< ::color::category::LuvCH_float > {
40405 public:
40406 	enum { implemented_entity = true };
40407 	enum { meaningful_entity = true };
40408 };
40409 template <> struct info< ::color::category::LuvCH_double > {
40410 public:
40411 	enum { implemented_entity = true };
40412 	enum { meaningful_entity = true };
40413 };
40414 template <> struct info< ::color::category::LuvCH_ldouble > {
40415 public:
40416 	enum { implemented_entity = true };
40417 	enum { meaningful_entity = true };
40418 };
40419 
40420 }
40421 }
40422 
40423 namespace color {
40424 namespace trait {
40425 
40426 template< >
40427 struct bound< ::color::category::LuvCH_uint8 >
40428 	: public ::color::_internal::utility::bound::general< std::uint8_t, typename ::color::trait::index< ::color::category::LuvCH_uint8 >::instance_type > {
40429 };
40430 
40431 template< >
40432 struct bound< ::color::category::LuvCH_uint16 >
40433 	: public ::color::_internal::utility::bound::general< std::uint16_t, typename ::color::trait::index< ::color::category::LuvCH_uint16 >::instance_type > {
40434 };
40435 
40436 template< >
40437 struct bound< ::color::category::LuvCH_uint32 >
40438 	: public ::color::_internal::utility::bound::general< std::uint32_t, typename ::color::trait::index< ::color::category::LuvCH_uint32 >::instance_type > {
40439 };
40440 
40441 template< >
40442 struct bound< ::color::category::LuvCH_uint64 >
40443 	: public ::color::_internal::utility::bound::general< std::uint64_t, typename ::color::trait::index< ::color::category::LuvCH_uint64 >::instance_type > {
40444 };
40445 
40446 }
40447 }
40448 
40449 namespace color {
40450 namespace _internal {
40451 namespace luv {
40452 namespace bound {
40453 
40454 template< typename scalar_name, typename index_name >
40455 struct natural {
40456 public:
40457 	typedef scalar_name scalar_type;
40458 	typedef index_name index_type;
40459 
40460 	typedef ::color::_internal::constant::luv< scalar_type > constant_type;
40461 	typedef ::color::_internal::utility::type::traitC< scalar_type > trait_type;
40462 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
40463 
40464 	typedef typename trait_type::instance_type instance_type;
40465 	typedef typename trait_type::return_image_type return_image_type;
40466 
40467 	typedef typename index_trait_type::instance_type index_instance_type;
40468 	typedef typename index_trait_type::model_type index_input_const_type;
40469 
40470 	template< index_instance_type index >
maximumcolor::_internal::luv::bound::natural40471 	static return_image_type maximum() {
40472 		static instance_type max_list[] = { constant_type::l_max(), constant_type::u_max(), constant_type::v_max() };
40473 		return max_list[index];
40474 	}
40475 
maximumcolor::_internal::luv::bound::natural40476 	static return_image_type maximum(index_input_const_type index) {
40477 		static instance_type max_list[] = { constant_type::l_max(), constant_type::u_max(), constant_type::v_max() };
40478 		return max_list[index];
40479 	}
40480 
40481 	template< index_instance_type index >
minimumcolor::_internal::luv::bound::natural40482 	static return_image_type minimum() {
40483 		static instance_type min_list[] = { constant_type::l_min(), constant_type::u_min(), constant_type::v_min() };
40484 		return min_list[index];
40485 	}
40486 
minimumcolor::_internal::luv::bound::natural40487 	static return_image_type minimum(index_input_const_type index) {
40488 		static instance_type min_list[] = { constant_type::l_min(), constant_type::u_min(), constant_type::v_min() };
40489 		return min_list[index];
40490 	}
40491 
40492 	template< index_instance_type index >
rangecolor::_internal::luv::bound::natural40493 	static return_image_type range() {
40494 		static instance_type range_list[] = { constant_type::l_max() - constant_type::l_min(), constant_type::u_max() - constant_type::u_min(), constant_type::v_max() - constant_type::v_min() };
40495 		return range_list[index];
40496 	}
40497 
rangecolor::_internal::luv::bound::natural40498 	static return_image_type range(index_input_const_type index) {
40499 		static instance_type range_list[] = { constant_type::l_max() - constant_type::l_min(), constant_type::u_max() - constant_type::u_min(), constant_type::v_max() - constant_type::v_min() };
40500 		return range_list[index];
40501 	}
40502 };
40503 
40504 }
40505 }
40506 }
40507 }
40508 
40509 namespace color {
40510 namespace _internal {
40511 namespace LuvCH {
40512 namespace bound {
40513 
40514 template< typename index_name, typename scalar_name >
40515 struct scalar {
40516 public:
40517 	typedef scalar_name scalar_type;
40518 	typedef index_name index_type;
40519 
40520 	typedef ::color::_internal::luv::bound::natural< scalar_name, index_type > luv_bound_type;
40521 
40522 	typedef ::color::_internal::utility::type::traitC< scalar_type > scalar_trait_type;
40523 	typedef ::color::_internal::utility::type::index< index_type > index_trait_type;
40524 
40525 	typedef typename scalar_trait_type::instance_type scalar_instance_type;
40526 	typedef typename scalar_trait_type::return_image_type return_image_type;
40527 
40528 	typedef typename index_trait_type::instance_type index_instance_type;
40529 	typedef typename index_trait_type::model_type index_input_const_type;
40530 
40531 	typedef ::color::_internal::LuvCH::bound::scalar< index_type, scalar_name > this_type;
40532 
c_maxcolor::_internal::LuvCH::bound::scalar40533 	static scalar_instance_type c_max() {
40534 		scalar_instance_type a = std::max<scalar_instance_type>(fabs(luv_bound_type::template minimum<1>()), luv_bound_type::template maximum<1>());
40535 		scalar_instance_type b = std::max<scalar_instance_type>(fabs(luv_bound_type::template minimum<2>()), luv_bound_type::template maximum<2>());
40536 		return sqrt(a*a + b*b);
40537 	}
40538 
40539 	template< index_instance_type index >
maximumcolor::_internal::LuvCH::bound::scalar40540 	static return_image_type maximum() {
40541 		static const scalar_instance_type max_list[] = { 100, this_type::c_max(), 360 };
40542 		return max_list[index];
40543 	}
40544 
maximumcolor::_internal::LuvCH::bound::scalar40545 	static return_image_type maximum(index_input_const_type index) {
40546 		static const scalar_instance_type max_list[] = { 100, this_type::c_max(), 360 };
40547 		return max_list[index];
40548 	}
40549 
40550 	template< index_instance_type index >
minimumcolor::_internal::LuvCH::bound::scalar40551 	static return_image_type minimum() {
40552 		static const scalar_instance_type min_list[] = { 0, 0, 0 };
40553 		return min_list[index];
40554 	}
40555 
minimumcolor::_internal::LuvCH::bound::scalar40556 	static return_image_type minimum(index_input_const_type index) {
40557 		static const scalar_instance_type min_list[] = { 0, 0, 0 };
40558 		return min_list[index];
40559 	}
40560 
40561 	template< index_instance_type index >
rangecolor::_internal::LuvCH::bound::scalar40562 	static return_image_type range() {
40563 		static const scalar_instance_type range_list[] = { 100, this_type::c_max(), 360 };
40564 		return range_list[index];
40565 	}
40566 
rangecolor::_internal::LuvCH::bound::scalar40567 	static return_image_type range(index_input_const_type index) {
40568 		static const scalar_instance_type range_list[] = { 100, this_type::c_max(), 360 };
40569 		return range_list[index];
40570 	}
40571 };
40572 
40573 }
40574 }
40575 }
40576 }
40577 
40578 namespace color {
40579 namespace trait {
40580 
40581 template< >
40582 struct bound< ::color::category::LuvCH_float >
40583 	: public ::color::_internal::LuvCH::bound::scalar< typename ::color::trait::index< ::color::category::LuvCH_float >::instance_type, float > {
40584 };
40585 
40586 template< >
40587 struct bound< ::color::category::LuvCH_double >
40588 	: public ::color::_internal::LuvCH::bound::scalar< typename ::color::trait::index< ::color::category::LuvCH_double >::instance_type, double > {
40589 };
40590 
40591 template< >
40592 struct bound< ::color::category::LuvCH_ldouble >
40593 	: public ::color::_internal::LuvCH::bound::scalar< typename ::color::trait::index< ::color::category::LuvCH_ldouble >::instance_type, long double > {
40594 };
40595 
40596 }
40597 }
40598 
40599 namespace color {
40600 namespace trait {
40601 
40602 template< >
40603 struct component< ::color::category::LuvCH_float >
40604 	: public ::color::_internal::utility::component::array< float > {
40605 };
40606 
40607 template< >
40608 struct component< ::color::category::LuvCH_double >
40609 	: public ::color::_internal::utility::component::array< double > {
40610 };
40611 
40612 template< >
40613 struct component< ::color::category::LuvCH_ldouble >
40614 	: public ::color::_internal::utility::component::array< long double > {
40615 };
40616 
40617 }
40618 }
40619 
40620 namespace color {
40621 namespace trait {
40622 
40623 template< >
40624 struct component< ::color::category::LuvCH_uint8 >
40625 	: public ::color::_internal::utility::component::array< std::uint8_t > {
40626 };
40627 
40628 template< >
40629 struct component< ::color::category::LuvCH_uint16 >
40630 	: public ::color::_internal::utility::component::array< std::uint16_t > {
40631 };
40632 
40633 template< >
40634 struct component< ::color::category::LuvCH_uint32 >
40635 	: public ::color::_internal::utility::component::array< std::uint32_t > {
40636 };
40637 
40638 template< >
40639 struct component< ::color::category::LuvCH_uint64 >
40640 	: public ::color::_internal::utility::component::array< std::uint64_t > {
40641 };
40642 
40643 }
40644 }
40645 
40646 namespace color {
40647 namespace trait {
40648 
40649 template< >
40650 struct container< ::color::category::LuvCH_float >
40651 	: public ::color::_internal::utility::container::array< float, 3 > {
40652 };
40653 
40654 template< >
40655 struct container< ::color::category::LuvCH_double >
40656 	: public ::color::_internal::utility::container::array< double, 3 > {
40657 };
40658 
40659 template< >
40660 struct container< ::color::category::LuvCH_ldouble >
40661 	: public ::color::_internal::utility::container::array< long double, 3 > {
40662 };
40663 
40664 }
40665 }
40666 
40667 namespace color {
40668 namespace trait {
40669 
40670 template< >
40671 struct container< ::color::category::LuvCH_uint8 >
40672 	: public ::color::_internal::utility::container::array< std::uint8_t, 3 > {
40673 };
40674 
40675 template< >
40676 struct container< ::color::category::LuvCH_uint16 >
40677 	: public ::color::_internal::utility::container::array< std::uint16_t, 3 > {
40678 };
40679 
40680 template< >
40681 struct container< ::color::category::LuvCH_uint32 >
40682 	: public ::color::_internal::utility::container::array< std::uint32_t, 3 > {
40683 };
40684 
40685 template< >
40686 struct container< ::color::category::LuvCH_uint64 >
40687 	: public ::color::_internal::utility::container::array< std::uint64_t, 3 > {
40688 };
40689 
40690 }
40691 }
40692 
40693 namespace color {
40694 
40695 template< typename type_name >
40696 using LuvCH = ::color::model< typename ::color::category::LuvCH< type_name> >;
40697 
40698 }
40699 
40700 namespace color {
40701 namespace place {
40702 namespace _internal {
40703 
40704 template< typename tag_name >
40705 struct hue< ::color::category::LuvCH< tag_name > > {
40706 public:
40707 	typedef ::color::category::LuvCH< tag_name > category_type;
40708 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
40709 
40710 	enum { position_enum = 2 };
40711 	enum { has_enum = true };
40712 
positioncolor::place::_internal::hue40713 	static index_instance_type position() {
40714 		return position_enum;
40715 	}
40716 };
40717 
40718 }
40719 }
40720 }
40721 
40722 namespace color {
40723 namespace check {
40724 namespace _internal {
40725 
40726 template<>
40727 struct integrity< ::color::category::LuvCH_float> {
40728 public:
40729 	typedef ::color::category::LuvCH_float category_type;
40730 
40731 	typedef ::color::model<category_type> model_type;
40732 	typedef ::color::trait::bound< category_type > bound_type;
40733 
40734 	enum {
40735 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
40736 	};
40737 
processcolor::check::_internal::integrity40738 	static bool process(model_type const& m) {
40739 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
40740 			return false;
40741 		}
40742 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
40743 			return false;
40744 		}
40745 		return true;
40746 	}
40747 };
40748 
40749 template<>
40750 struct integrity< ::color::category::LuvCH_double > {
40751 public:
40752 	typedef ::color::category::LuvCH_double category_type;
40753 
40754 	typedef ::color::model<category_type> model_type;
40755 	typedef ::color::trait::bound< category_type > bound_type;
40756 
40757 	enum {
40758 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
40759 	};
40760 
processcolor::check::_internal::integrity40761 	static bool process(model_type const& m) {
40762 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
40763 			return false;
40764 		}
40765 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
40766 			return false;
40767 		}
40768 		return true;
40769 	}
40770 };
40771 
40772 template<>
40773 struct integrity< ::color::category::LuvCH_ldouble > {
40774 public:
40775 	typedef ::color::category::LuvCH_ldouble category_type;
40776 
40777 	typedef ::color::model<category_type> model_type;
40778 	typedef ::color::trait::bound< category_type > bound_type;
40779 
40780 	enum {
40781 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
40782 	};
40783 
processcolor::check::_internal::integrity40784 	static bool process(model_type const& m) {
40785 		if(m.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
40786 			return false;
40787 		}
40788 		if(bound_type::template maximum<hue_p>() < m.template get<hue_p>()) {
40789 			return false;
40790 		}
40791 		return true;
40792 	}
40793 };
40794 
40795 }
40796 }
40797 }
40798 
40799 namespace color {
40800 namespace place {
40801 namespace _internal {
40802 
40803 template< typename tag_name >
40804 struct chroma< ::color::category::LuvCH< tag_name > > {
40805 public:
40806 	typedef ::color::category::LuvCH< tag_name > category_type;
40807 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
40808 
40809 	enum { position_enum = 1 };
40810 	enum { has_enum = true };
40811 
positioncolor::place::_internal::chroma40812 	static index_instance_type position() {
40813 		return position_enum;
40814 	}
40815 };
40816 
40817 }
40818 }
40819 }
40820 
40821 namespace color {
40822 namespace place {
40823 namespace _internal {
40824 
40825 template< typename tag_name >
40826 struct lightness< ::color::category::LuvCH< tag_name > > {
40827 public:
40828 	typedef ::color::category::LuvCH< tag_name > category_type;
40829 	typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;
40830 
40831 	enum { position_enum = 0 };
40832 	enum { has_enum = true };
40833 
positioncolor::place::_internal::lightness40834 	static index_instance_type position() {
40835 		return position_enum;
40836 	}
40837 };
40838 
40839 }
40840 }
40841 }
40842 
40843 namespace color {
40844 namespace check {
40845 namespace _internal {
40846 
40847 template< typename tag_name >
40848 struct unique< ::color::category::LuvCH< tag_name > > {
40849 public:
40850 	typedef ::color::category::LuvCH< tag_name > category_type;
40851 
40852 	typedef ::color::model<category_type> model_type;
40853 	typedef ::color::trait::bound< category_type > bound_type;
40854 
40855 	enum {
40856 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
40857 		,chroma_p = ::color::place::_internal::chroma<category_type>::position_enum
40858 		,hue_p = ::color::place::_internal::hue<category_type>::position_enum
40859 	};
40860 
processcolor::check::_internal::unique40861 	static bool process(model_type const& m) {
40862 		if(m.template get<chroma_p>() == bound_type::template minimum<chroma_p>()) {
40863 			return false;
40864 		}
40865 		if(m.template get<lightness_p>() == bound_type::template minimum<lightness_p>()) {
40866 			return false;
40867 		}
40868 		if(m.template get<lightness_p>() == bound_type::template maximum<lightness_p>()) {
40869 			if(m.template get<chroma_p>() == bound_type::template minimum<chroma_p>()) {
40870 				return false;
40871 			}
40872 		}
40873 		return true;
40874 	}
40875 };
40876 
40877 }
40878 }
40879 }
40880 
40881 namespace color {
40882 namespace fix {
40883 namespace _internal {
40884 namespace _privateLuvCH {
40885 
40886 template< typename category_name >
40887 struct integrity {
40888 public:
40889 	typedef category_name category_type;
40890 
40891 	typedef typename ::color::model<category_type> model_type;
40892 	typedef typename ::color::trait::bound<category_type> bound_type;
40893 
40894 	enum {
40895 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
40896 	};
40897 
processcolor::fix::_internal::_privateLuvCH::integrity40898 	static void process(model_type &result) {
40899 		if(result.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
40900 			result.template set<hue_p>(bound_type::template minimum<hue_p>());
40901 			return;
40902 		}
40903 		if(bound_type::template maximum<hue_p>() < result.template get<hue_p>()) {
40904 			result.template set<hue_p>(bound_type::template maximum<hue_p>());
40905 			return;
40906 		}
40907 	}
40908 
processcolor::fix::_internal::_privateLuvCH::integrity40909 	static void process(model_type &result, model_type const& right) {
40910 		result = right;
40911 		if(result.template get<hue_p>() < bound_type::template minimum<hue_p>()) {
40912 			result.template set<hue_p>(bound_type::template minimum<hue_p>());
40913 			return;
40914 		}
40915 		if(bound_type::template maximum<hue_p>() < result.template get<hue_p>()) {
40916 			result.template set<hue_p>(bound_type::template maximum<hue_p>());
40917 			return;
40918 		}
40919 	}
40920 
40921 };
40922 
40923 }
40924 
40925 template<> struct integrity< ::color::category::LuvCH_float > : public ::color::fix::_internal::_privateLuvCH::integrity< ::color::category::LuvCH_float > { };
40926 template<> struct integrity< ::color::category::LuvCH_double > : public ::color::fix::_internal::_privateLuvCH::integrity< ::color::category::LuvCH_double > { };
40927 template<> struct integrity< ::color::category::LuvCH_ldouble > : public ::color::fix::_internal::_privateLuvCH::integrity< ::color::category::LuvCH_ldouble> { };
40928 
40929 }
40930 }
40931 }
40932 
40933 namespace color {
40934 namespace get {
40935 
40936 template< typename tag_name >
40937 inline
40938 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::LuvCH<tag_name> >::akin_type >::return_type
red(::color::model<::color::category::LuvCH<tag_name>> const & color_parameter)40939 red(::color::model< ::color::category::LuvCH<tag_name> > const& color_parameter) {
40940 	typedef ::color::category::LuvCH<tag_name> category_type;
40941 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_category_type;
40942 	enum { red_p = ::color::place::_internal::red<akin_category_type>::position_enum };
40943 	return ::color::model< akin_category_type >(color_parameter).template get<red_p>();
40944 }
40945 
40946 }
40947 }
40948 
40949 namespace color {
40950 namespace get {
40951 
40952 template< typename tag_name >
40953 inline
40954 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::LuvCH<tag_name> >::akin_type >::return_type
green(::color::model<::color::category::LuvCH<tag_name>> const & color_parameter)40955 green(::color::model< ::color::category::LuvCH<tag_name> > const& color_parameter) {
40956 	typedef ::color::category::LuvCH<tag_name> category_type;
40957 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_category_type;
40958 	enum { green_p = ::color::place::_internal::green<akin_category_type>::position_enum };
40959 	return ::color::model< akin_category_type >(color_parameter).template get<green_p>();
40960 }
40961 
40962 }
40963 }
40964 
40965 namespace color {
40966 namespace get {
40967 
40968 template< typename tag_name >
40969 inline
40970 typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::LuvCH<tag_name> >::akin_type >::return_type
blue(::color::model<::color::category::LuvCH<tag_name>> const & color_parameter)40971 blue(::color::model< ::color::category::LuvCH<tag_name> > const& color_parameter) {
40972 	typedef ::color::category::LuvCH<tag_name> category_type;
40973 	typedef typename ::color::akin::rgb<category_type>::akin_type akin_category_type;
40974 	enum { blue_p = ::color::place::_internal::blue<akin_category_type>::position_enum };
40975 	return ::color::model< akin_category_type >(color_parameter).template get<blue_p>();
40976 }
40977 
40978 }
40979 }
40980 
40981 namespace color {
40982 namespace get {
40983 
40984 template< typename tag_name >
40985 inline
40986 typename ::color::trait::component< typename ::color::akin::gray< ::color::category::LuvCH<tag_name> >::akin_type >::return_type
gray(::color::model<::color::category::LuvCH<tag_name>> const & color_parameter)40987 gray(::color::model< ::color::category::LuvCH<tag_name> > const& color_parameter) {
40988 	typedef ::color::category::LuvCH< tag_name > category_type;
40989 	typedef typename ::color::akin::gray< category_type >::akin_type akin_category_type;
40990 	typedef ::color::_internal::reformat< akin_category_type, category_type > reformat_type;
40991 	enum {
40992 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
40993 	};
40994 	enum {
40995 		gray_p = ::color::place::_internal::gray<akin_category_type>::position_enum
40996 	};
40997 	return reformat_type::template process<gray_p,lightness_p>(color_parameter.template get<lightness_p>());
40998 }
40999 
41000 }
41001 }
41002 
41003 namespace color {
41004 namespace get {
41005 
41006 template< typename tag_name >
41007 inline
41008 typename ::color::model< ::color::category::LuvCH< tag_name> >::component_const_type
hue(::color::model<::color::category::LuvCH<tag_name>> const & color_parameter)41009 hue(::color::model< ::color::category::LuvCH<tag_name> > const& color_parameter) {
41010 	typedef ::color::category::LuvCH< tag_name> category_type;
41011 	enum {
41012 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
41013 	};
41014 	return color_parameter.template get<hue_p>();
41015 }
41016 
41017 }
41018 }
41019 
41020 namespace color {
41021 namespace get {
41022 
41023 template< typename tag_name >
41024 inline
41025 typename ::color::model< ::color::category::LuvCH< tag_name > >::component_const_type
saturation(::color::model<::color::category::LuvCH<tag_name>> const & c)41026 saturation(::color::model< ::color::category::LuvCH< tag_name > > const& c) {
41027 	typedef ::color::category::LuvCH< tag_name > category_type;
41028 	typedef typename ::color::trait::scalar<category_type> scalar_trait_type;
41029 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
41030 	enum {
41031 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
41032 		,chroma_p = ::color::place::_internal::chroma<category_type>::position_enum
41033 	};
41034 	auto const& L = c.template get< lightness_p>();
41035 	auto const& C = c.template get< chroma_p >();
41036 	if(false == scalar_trait_type::is_small(scalar_type(L))) {
41037 		return 0;
41038 	}
41039 	return C / L;
41040 }
41041 
41042 }
41043 }
41044 
41045 namespace color {
41046 namespace get {
41047 
41048 template< typename tag_name >
41049 inline
41050 typename ::color::model< ::color::category::LuvCH< tag_name> >::component_const_type
lightness(::color::model<::color::category::LuvCH<tag_name>> const & color_parameter)41051 lightness(::color::model< ::color::category::LuvCH<tag_name> > const& color_parameter) {
41052 	typedef ::color::category::LuvCH< tag_name> category_type;
41053 	enum {
41054 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
41055 	};
41056 	return color_parameter.template get<lightness_p>();
41057 }
41058 
41059 }
41060 }
41061 
41062 namespace color {
41063 namespace get {
41064 
41065 template< typename tag_name >
41066 inline
41067 typename ::color::model< ::color::category::LuvCH< tag_name> >::component_const_type
chroma(::color::model<::color::category::LuvCH<tag_name>> const & color_parameter)41068 chroma(::color::model< ::color::category::LuvCH<tag_name> > const& color_parameter) {
41069 	typedef ::color::category::LuvCH< tag_name> category_type;
41070 	enum {
41071 		chroma_p = ::color::place::_internal::chroma<category_type>::position_enum
41072 	};
41073 	return color_parameter.template get<chroma_p>();
41074 }
41075 
41076 }
41077 }
41078 
41079 namespace color {
41080 namespace set {
41081 
41082 template< typename tag_name >
41083 inline
41084 void
red(::color::model<::color::category::LuvCH<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::LuvCH<tag_name>>::akin_type>::model_type component_parameter)41085 red
41086 (
41087 	::color::model< ::color::category::LuvCH< tag_name > > & color_parameter
41088 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::LuvCH< tag_name > >::akin_type >::model_type component_parameter
41089 ) {
41090 	typedef ::color::category::LuvCH< tag_name > category_type;
41091 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
41092 	enum { red_p = ::color::place::_internal::red<akin_type>::position_enum };
41093 	::color::model< akin_type > rgb(color_parameter);
41094 	rgb.template set< red_p > (component_parameter);
41095 	color_parameter = rgb;
41096 }
41097 
41098 }
41099 }
41100 
41101 namespace color {
41102 namespace set {
41103 
41104 template< typename tag_name >
41105 inline
41106 void
green(::color::model<::color::category::LuvCH<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::LuvCH<tag_name>>::akin_type>::model_type component_parameter)41107 green
41108 (
41109 	::color::model< ::color::category::LuvCH< tag_name > > & color_parameter
41110 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::LuvCH< tag_name > >::akin_type >::model_type component_parameter
41111 ) {
41112 	typedef ::color::category::LuvCH< tag_name > category_type;
41113 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
41114 	enum { green_p = ::color::place::_internal::green<akin_type>::position_enum };
41115 	::color::model< akin_type > rgb(color_parameter);
41116 	rgb.template set< green_p > (component_parameter);
41117 	color_parameter = rgb;
41118 }
41119 
41120 }
41121 }
41122 
41123 namespace color {
41124 namespace set {
41125 
41126 template< typename tag_name >
41127 inline
41128 void
blue(::color::model<::color::category::LuvCH<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::rgb<::color::category::LuvCH<tag_name>>::akin_type>::model_type component_parameter)41129 blue
41130 (
41131 	::color::model< ::color::category::LuvCH< tag_name > > & color_parameter
41132 	,typename ::color::trait::component< typename ::color::akin::rgb< ::color::category::LuvCH< tag_name > >::akin_type >::model_type component_parameter
41133 ) {
41134 	typedef ::color::category::LuvCH< tag_name > category_type;
41135 	typedef typename ::color::akin::rgb< category_type >::akin_type akin_type;
41136 	enum { blue_p = ::color::place::_internal::blue<akin_type>::position_enum };
41137 	::color::model< akin_type > rgb(color_parameter);
41138 	rgb.template set<blue_p > (component_parameter);
41139 	color_parameter = rgb;
41140 }
41141 
41142 }
41143 }
41144 
41145 namespace color {
41146 namespace set {
41147 
41148 template< typename tag_name >
41149 inline
41150 void
gray(::color::model<::color::category::LuvCH<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::LuvCH<tag_name>>::akin_type>::model_type component_parameter)41151 gray
41152 (
41153 	::color::model< ::color::category::LuvCH< tag_name > > & color_parameter
41154 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::LuvCH< tag_name > >::akin_type >::model_type component_parameter
41155 ) {
41156 	typedef ::color::category::LuvCH< tag_name > category_type;
41157 	typedef typename ::color::akin::gray< category_type >::akin_type akin_category_type;
41158 	typedef ::color::_internal::reformat< category_type, akin_category_type > reformat_type;
41159 	enum {
41160 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
41161 	};
41162 	enum {
41163 		gray_p = ::color::place::_internal::lightness<akin_category_type>::position_enum
41164 	};
41165 	color_parameter.template set<lightness_p>(reformat_type::template process<lightness_p,gray_p>(component_parameter));
41166 }
41167 
41168 }
41169 }
41170 
41171 namespace color {
41172 namespace set {
41173 template< typename tag_name >
41174 inline
41175 void
lightness(::color::model<::color::category::LuvCH<tag_name>> & color_parameter,typename::color::model<::color::category::LuvCH<tag_name>>::component_input_const_type component_parameter)41176 lightness
41177 (
41178 	::color::model< ::color::category::LuvCH<tag_name> > & color_parameter,
41179 	typename ::color::model< ::color::category::LuvCH<tag_name> >::component_input_const_type component_parameter
41180 ) {
41181 	typedef ::color::category::LuvCH<tag_name> category_type;
41182 	enum {
41183 		lightness_p = ::color::place::_internal::lightness<category_type>::position_enum
41184 	};
41185 	color_parameter.template set<lightness_p>(component_parameter);
41186 }
41187 
41188 }
41189 }
41190 
41191 namespace color {
41192 namespace set {
41193 template< typename tag_name >
41194 inline
41195 void
chroma(::color::model<::color::category::LuvCH<tag_name>> & color_parameter,typename::color::model<::color::category::LuvCH<tag_name>>::component_input_const_type component_parameter)41196 chroma
41197 (
41198 	::color::model< ::color::category::LuvCH<tag_name> > & color_parameter,
41199 	typename ::color::model< ::color::category::LuvCH<tag_name> >::component_input_const_type component_parameter
41200 ) {
41201 	typedef ::color::category::LuvCH<tag_name> category_type;
41202 	enum {
41203 		chroma_p = ::color::place::_internal::chroma<category_type>::position_enum
41204 	};
41205 	color_parameter.template set<chroma_p>(component_parameter);
41206 }
41207 
41208 }
41209 }
41210 
41211 namespace color {
41212 namespace set {
41213 template< typename tag_name >
41214 inline
41215 void
hue(::color::model<::color::category::LuvCH<tag_name>> & color_parameter,typename::color::model<::color::category::LuvCH<tag_name>>::component_input_const_type component_parameter)41216 hue
41217 (
41218 	::color::model< ::color::category::LuvCH<tag_name> > & color_parameter,
41219 	typename ::color::model< ::color::category::LuvCH<tag_name> >::component_input_const_type component_parameter
41220 ) {
41221 	typedef ::color::category::LuvCH<tag_name> category_type;
41222 	enum {
41223 		hue_p = ::color::place::_internal::hue<category_type>::position_enum
41224 	};
41225 	color_parameter.template set<hue_p>(component_parameter);
41226 }
41227 
41228 }
41229 }
41230 
41231 namespace color {
41232 namespace _internal {
41233 
41234 template
41235 <
41236 	typename LuvCH_tag_name
41237 	,typename gray_tag_name
41238 	>
41239 struct convert
41240 	<
41241 	::color::category::LuvCH< LuvCH_tag_name >
41242 	,::color::category::gray< gray_tag_name >
41243 	> {
41244 public:
41245 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41246 	typedef ::color::category::gray< gray_tag_name > category_right_type;
41247 
41248 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41249 
41250 	typedef ::color::category::LuvCH< scalar_type > LuvCHSCALAR_category_type;
41251 
41252 	typedef ::color::trait::bound<category_left_type> bound_left_trait_type;
41253 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41254 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41255 
41256 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
41257 	typedef ::color::_internal::reformat< category_left_type, LuvCHSCALAR_category_type > reformatLuvCH_type;
41258 
41259 	typedef typename container_left_trait_type::input_type container_left_input_type;
41260 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41261 
41262 	enum {
41263 		lightness_p = ::color::place::_internal::lightness<category_left_type>::position_enum
41264 		,chroma_p = ::color::place::_internal::chroma<category_left_type>::position_enum
41265 		,hue_p = ::color::place::_internal::hue<category_left_type>::position_enum
41266 	};
41267 
41268 	enum {
41269 		gray_p = ::color::place::_internal::gray<category_right_type>::position_enum
41270 	};
41271 
processcolor::_internal::convert41272 	static void process
41273 	(
41274 		container_left_input_type left
41275 		,container_right_const_input_type right
41276 	) {
41277 		container_left_trait_type::template set<0>(left, reformat_type::template process< lightness_p, 0 >(container_right_trait_type::template get<0>(right)));
41278 		container_left_trait_type::template set<1>(left, reformatLuvCH_type::template process< chroma_p, 1 >(0));
41279 		container_left_trait_type::template set<2>(left, reformatLuvCH_type::template process< hue_p, 2 >(0));
41280 	}
41281 };
41282 
41283 }
41284 }
41285 
41286 namespace color {
41287 namespace _internal {
41288 
41289 template
41290 <
41291 	typename LuvCH_tag_name
41292 	,typename cmy_tag_name
41293 	>
41294 struct convert
41295 	<
41296 	::color::category::LuvCH< LuvCH_tag_name >
41297 	,::color::category::cmy< cmy_tag_name >
41298 	> {
41299 public:
41300 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41301 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_right_type;
41302 
41303 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41304 
41305 	typedef ::color::model< cmy_category_type > cmy_model_type;
41306 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41307 
41308 	typedef ::color::luv< scalar_type > luv_model_type;
41309 	typedef ::color::xyz< scalar_type > xyz_model_type;
41310 	typedef ::color::rgb< scalar_type > rgb_model_type;
41311 
41312 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41313 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41314 
41315 	typedef typename container_left_trait_type::input_type container_left_input_type;
41316 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41317 
processcolor::_internal::convert41318 	static void process
41319 	(
41320 		container_left_input_type left
41321 		,container_right_const_input_type right
41322 	) {
41323 		left = LuvCH_model_type(luv_model_type(xyz_model_type(rgb_model_type(cmy_model_type(right))))).container();
41324 	}
41325 };
41326 
41327 }
41328 }
41329 
41330 namespace color {
41331 namespace _internal {
41332 
41333 template
41334 <
41335 	typename LuvCH_tag_name
41336 	,typename cmyk_tag_name
41337 	>
41338 struct convert
41339 	<
41340 	::color::category::LuvCH< LuvCH_tag_name >
41341 	,::color::category::cmyk< cmyk_tag_name >
41342 	> {
41343 public:
41344 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41345 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type;
41346 
41347 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41348 
41349 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
41350 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41351 
41352 	typedef ::color::luv< scalar_type > luv_model_type;
41353 	typedef ::color::xyz< scalar_type > xyz_model_type;
41354 	typedef ::color::rgb< scalar_type > rgb_model_type;
41355 
41356 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41357 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41358 
41359 	typedef typename container_left_trait_type::input_type container_left_input_type;
41360 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41361 
processcolor::_internal::convert41362 	static void process
41363 	(
41364 		container_left_input_type left
41365 		,container_right_const_input_type right
41366 	) {
41367 		left = LuvCH_model_type(luv_model_type(xyz_model_type(rgb_model_type(cmyk_model_type(right))))).container();
41368 	}
41369 };
41370 
41371 }
41372 }
41373 
41374 namespace color {
41375 namespace _internal {
41376 
41377 template
41378 <
41379 	typename LuvCH_tag_name
41380 	,typename hsl_tag_name
41381 	>
41382 struct convert
41383 	<
41384 	::color::category::LuvCH< LuvCH_tag_name >
41385 	,::color::category::hsl< hsl_tag_name >
41386 	> {
41387 public:
41388 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41389 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
41390 
41391 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41392 
41393 	typedef ::color::model< hsl_category_type > hsl_model_type;
41394 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41395 
41396 	typedef ::color::luv< scalar_type > luv_model_type;
41397 	typedef ::color::xyz< scalar_type > xyz_model_type;
41398 	typedef ::color::rgb< scalar_type > rgb_model_type;
41399 
41400 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41401 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41402 
41403 	typedef typename container_left_trait_type::input_type container_left_input_type;
41404 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41405 
processcolor::_internal::convert41406 	static void process
41407 	(
41408 		container_left_input_type left
41409 		,container_right_const_input_type right
41410 	) {
41411 		left = LuvCH_model_type(luv_model_type(xyz_model_type(rgb_model_type(hsl_model_type(right))))).container();
41412 	}
41413 };
41414 
41415 }
41416 }
41417 
41418 namespace color {
41419 namespace _internal {
41420 
41421 template
41422 <
41423 	typename LuvCH_tag_name
41424 	,typename hsv_tag_name
41425 	>
41426 struct convert
41427 	<
41428 	::color::category::LuvCH< LuvCH_tag_name >
41429 	,::color::category::hsv< hsv_tag_name >
41430 	> {
41431 public:
41432 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41433 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
41434 
41435 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41436 
41437 	typedef ::color::model< hsv_category_type > hsv_model_type;
41438 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41439 
41440 	typedef ::color::luv< scalar_type > luv_model_type;
41441 	typedef ::color::xyz< scalar_type > xyz_model_type;
41442 	typedef ::color::rgb< scalar_type > rgb_model_type;
41443 
41444 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41445 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41446 
41447 	typedef typename container_left_trait_type::input_type container_left_input_type;
41448 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41449 
processcolor::_internal::convert41450 	static void process
41451 	(
41452 		container_left_input_type left
41453 		,container_right_const_input_type right
41454 	) {
41455 		left = LuvCH_model_type(luv_model_type(xyz_model_type(rgb_model_type(hsv_model_type(right))))).container();
41456 	}
41457 };
41458 
41459 }
41460 }
41461 
41462 namespace color {
41463 namespace _internal {
41464 
41465 template
41466 <
41467 	typename LuvCH_tag_name
41468 	,typename hsi_tag_name
41469 	>
41470 struct convert
41471 	<
41472 	::color::category::LuvCH< LuvCH_tag_name >
41473 	,::color::category::hsi< hsi_tag_name >
41474 	> {
41475 public:
41476 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41477 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
41478 
41479 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41480 
41481 	typedef ::color::model< hsi_category_type > hsi_model_type;
41482 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41483 
41484 	typedef ::color::luv< scalar_type > luv_model_type;
41485 	typedef ::color::xyz< scalar_type > xyz_model_type;
41486 	typedef ::color::rgb< scalar_type > rgb_model_type;
41487 
41488 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41489 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41490 
41491 	typedef typename container_left_trait_type::input_type container_left_input_type;
41492 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41493 
processcolor::_internal::convert41494 	static void process
41495 	(
41496 		container_left_input_type left
41497 		,container_right_const_input_type right
41498 	) {
41499 		left = LuvCH_model_type(luv_model_type(xyz_model_type(rgb_model_type(hsi_model_type(right))))).container();
41500 	}
41501 };
41502 
41503 }
41504 }
41505 namespace color {
41506 namespace _internal {
41507 
41508 template
41509 <
41510 	typename LuvCH_tag_name
41511 	,typename hwb_tag_name
41512 	>
41513 struct convert
41514 	<
41515 	::color::category::LuvCH< LuvCH_tag_name >
41516 	,::color::category::hwb< hwb_tag_name >
41517 	> {
41518 public:
41519 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41520 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
41521 
41522 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41523 
41524 	typedef ::color::model< hwb_category_type > hwb_model_type;
41525 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41526 
41527 	typedef ::color::luv< scalar_type > luv_model_type;
41528 	typedef ::color::xyz< scalar_type > xyz_model_type;
41529 	typedef ::color::rgb< scalar_type > rgb_model_type;
41530 	typedef ::color::hsv< scalar_type > hsv_model_type;
41531 
41532 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41533 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41534 
41535 	typedef typename container_left_trait_type::input_type container_left_input_type;
41536 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41537 
processcolor::_internal::convert41538 	static void process
41539 	(
41540 		container_left_input_type left
41541 		,container_right_const_input_type right
41542 	) {
41543 		left = LuvCH_model_type(luv_model_type(xyz_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right)))))).container();
41544 	}
41545 };
41546 
41547 }
41548 }
41549 
41550 namespace color {
41551 namespace _internal {
41552 
41553 template
41554 <
41555 	typename LuvCH_tag_name
41556 	,typename rgb_tag_name
41557 	>
41558 struct convert
41559 	<
41560 	::color::category::LuvCH< LuvCH_tag_name >
41561 	,::color::category::rgb< rgb_tag_name >
41562 	> {
41563 public:
41564 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41565 	typedef ::color::category::rgb< rgb_tag_name > rgb_category_type, category_right_type;
41566 
41567 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41568 
41569 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41570 	typedef ::color::model< rgb_category_type > rgb_model_type;
41571 
41572 	typedef ::color::xyz< scalar_type > xyz_model_type;
41573 	typedef ::color::luv< scalar_type > luv_model_type;
41574 
41575 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41576 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41577 
41578 	typedef typename container_left_trait_type::input_type container_left_input_type;
41579 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41580 
processcolor::_internal::convert41581 	static void process
41582 	(
41583 		container_left_input_type left
41584 		,container_right_const_input_type right
41585 	) {
41586 		left = LuvCH_model_type(luv_model_type(xyz_model_type(rgb_model_type(right)))).container();
41587 	}
41588 };
41589 
41590 }
41591 }
41592 
41593 namespace color {
41594 namespace _internal {
41595 
41596 template
41597 <
41598 	typename LuvCH_tag_name
41599 	,typename yiq_tag_name
41600 	>
41601 struct convert
41602 	<
41603 	::color::category::LuvCH< LuvCH_tag_name >
41604 	,::color::category::yiq< yiq_tag_name >
41605 	> {
41606 public:
41607 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41608 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
41609 
41610 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41611 
41612 	typedef ::color::model< yiq_category_type > yiq_model_type;
41613 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41614 
41615 	typedef ::color::luv< scalar_type > luv_model_type;
41616 	typedef ::color::xyz< scalar_type > xyz_model_type;
41617 	typedef ::color::rgb< scalar_type > rgb_model_type;
41618 
41619 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41620 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41621 
41622 	typedef typename container_left_trait_type::input_type container_left_input_type;
41623 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41624 
processcolor::_internal::convert41625 	static void process
41626 	(
41627 		container_left_input_type left
41628 		,container_right_const_input_type right
41629 	) {
41630 		left = LuvCH_model_type(luv_model_type(xyz_model_type(rgb_model_type(yiq_model_type(right))))).container();
41631 	}
41632 };
41633 
41634 }
41635 }
41636 
41637 namespace color {
41638 namespace _internal {
41639 
41640 template
41641 <
41642 	typename LuvCH_tag_name
41643 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum reference_number
41644 	>
41645 struct convert
41646 	<
41647 	::color::category::LuvCH< LuvCH_tag_name >
41648 	,::color::category::yuv< yuv_tag_name, reference_number >
41649 	> {
41650 public:
41651 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41652 	typedef ::color::category::yuv< yuv_tag_name, reference_number > yuv_category_type, category_right_type;
41653 
41654 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41655 
41656 	typedef ::color::model< yuv_category_type > yuv_model_type;
41657 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41658 
41659 	typedef ::color::luv< scalar_type > luv_model_type;
41660 	typedef ::color::xyz< scalar_type > xyz_model_type;
41661 	typedef ::color::rgb< scalar_type > rgb_model_type;
41662 
41663 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41664 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41665 
41666 	typedef typename container_left_trait_type::input_type container_left_input_type;
41667 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41668 
processcolor::_internal::convert41669 	static void process
41670 	(
41671 		container_left_input_type left
41672 		,container_right_const_input_type right
41673 	) {
41674 		left = LuvCH_model_type(luv_model_type(xyz_model_type(rgb_model_type(yuv_model_type(right))))).container();
41675 	}
41676 };
41677 
41678 }
41679 }
41680 
41681 namespace color {
41682 namespace _internal {
41683 
41684 template
41685 <
41686 	typename LuvCH_tag_name
41687 	,typename YCgCo_tag_name
41688 	>
41689 struct convert
41690 	<
41691 	::color::category::LuvCH< LuvCH_tag_name >
41692 	,::color::category::YCgCo< YCgCo_tag_name >
41693 	> {
41694 public:
41695 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41696 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
41697 
41698 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41699 
41700 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
41701 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41702 
41703 	typedef ::color::luv< scalar_type > luv_model_type;
41704 	typedef ::color::xyz< scalar_type > xyz_model_type;
41705 	typedef ::color::rgb< scalar_type > rgb_model_type;
41706 
41707 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41708 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41709 
41710 	typedef typename container_left_trait_type::input_type container_left_input_type;
41711 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41712 
processcolor::_internal::convert41713 	static void process
41714 	(
41715 		container_left_input_type left
41716 		,container_right_const_input_type right
41717 	) {
41718 		left = LuvCH_model_type(luv_model_type(xyz_model_type(rgb_model_type(YCgCo_model_type(right))))).container();
41719 	}
41720 };
41721 
41722 }
41723 }
41724 
41725 namespace color {
41726 namespace _internal {
41727 
41728 template
41729 <
41730 	typename LuvCH_tag_name
41731 	,typename YDbDr_tag_name
41732 	>
41733 struct convert
41734 	<
41735 	::color::category::LuvCH< LuvCH_tag_name >
41736 	,::color::category::YDbDr< YDbDr_tag_name >
41737 	> {
41738 public:
41739 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41740 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
41741 
41742 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41743 
41744 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
41745 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41746 
41747 	typedef ::color::luv< scalar_type > luv_model_type;
41748 	typedef ::color::xyz< scalar_type > xyz_model_type;
41749 	typedef ::color::rgb< scalar_type > rgb_model_type;
41750 
41751 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41752 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41753 
41754 	typedef typename container_left_trait_type::input_type container_left_input_type;
41755 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41756 
processcolor::_internal::convert41757 	static void process
41758 	(
41759 		container_left_input_type left
41760 		,container_right_const_input_type right
41761 	) {
41762 		left = LuvCH_model_type(luv_model_type(xyz_model_type(rgb_model_type(YDbDr_model_type(right))))).container();
41763 	}
41764 };
41765 
41766 }
41767 }
41768 
41769 namespace color {
41770 namespace _internal {
41771 
41772 template
41773 <
41774 	typename LuvCH_tag_name
41775 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum reference_number
41776 	>
41777 struct convert
41778 	<
41779 	::color::category::LuvCH< LuvCH_tag_name >
41780 	,::color::category::YPbPr< YPbPr_tag_name, reference_number >
41781 	> {
41782 public:
41783 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41784 	typedef ::color::category::YPbPr< YPbPr_tag_name, reference_number > YPbPr_category_type, category_right_type;
41785 
41786 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41787 
41788 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
41789 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41790 
41791 	typedef ::color::luv< scalar_type > luv_model_type;
41792 	typedef ::color::xyz< scalar_type > xyz_model_type;
41793 	typedef ::color::rgb< scalar_type > rgb_model_type;
41794 
41795 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41796 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41797 
41798 	typedef typename container_left_trait_type::input_type container_left_input_type;
41799 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41800 
processcolor::_internal::convert41801 	static void process
41802 	(
41803 		container_left_input_type left
41804 		,container_right_const_input_type right
41805 	) {
41806 		left = LuvCH_model_type(luv_model_type(xyz_model_type(rgb_model_type(YPbPr_model_type(right))))).container();
41807 	}
41808 };
41809 
41810 }
41811 }
41812 
41813 namespace color {
41814 namespace _internal {
41815 
41816 template
41817 <
41818 	typename LuvCH_tag_name
41819 	,typename xyz_tag_name
41820 	>
41821 struct convert
41822 	<
41823 	::color::category::LuvCH< LuvCH_tag_name >
41824 	,::color::category::xyz< xyz_tag_name >
41825 	> {
41826 public:
41827 
41828 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41829 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
41830 
41831 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41832 
41833 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41834 	typedef ::color::model< xyz_category_type > xyz_model_type;
41835 
41836 	typedef ::color::luv< scalar_type > luv_model_type;
41837 
41838 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41839 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41840 
41841 	typedef typename container_left_trait_type::input_type container_left_input_type;
41842 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41843 
processcolor::_internal::convert41844 	static void process
41845 	(
41846 		container_left_input_type left
41847 		,container_right_const_input_type right
41848 	) {
41849 		left = LuvCH_model_type(luv_model_type(xyz_model_type(right))).container();
41850 	}
41851 
41852 };
41853 
41854 }
41855 }
41856 
41857 namespace color {
41858 namespace _internal {
41859 
41860 template
41861 <
41862 	typename LuvCH_tag_name
41863 	,typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
41864 	>
41865 struct convert
41866 	<
41867 	::color::category::LuvCH< LuvCH_tag_name >
41868 	,::color::category::lab< lab_tag_name, reference_number >
41869 	> {
41870 public:
41871 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41872 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_right_type;
41873 
41874 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41875 
41876 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41877 	typedef ::color::model< lab_category_type > lab_model_type;
41878 
41879 	typedef ::color::luv< scalar_type > luv_model_type;
41880 	typedef ::color::xyz< scalar_type > xyz_model_type;
41881 
41882 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41883 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41884 
41885 	typedef typename container_left_trait_type::input_type container_left_input_type;
41886 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41887 
processcolor::_internal::convert41888 	static void process
41889 	(
41890 		container_left_input_type left
41891 		,container_right_const_input_type right
41892 	) {
41893 		left = LuvCH_model_type(luv_model_type(xyz_model_type(lab_model_type(right)))).container();
41894 	}
41895 };
41896 
41897 }
41898 }
41899 
41900 namespace color {
41901 namespace _internal {
41902 
41903 template
41904 <
41905 	typename LuvCH_tag_name
41906 	,typename xyy_tag_name
41907 	>
41908 struct convert
41909 	<
41910 	::color::category::LuvCH< LuvCH_tag_name >
41911 	,::color::category::xyy< xyy_tag_name >
41912 	> {
41913 public:
41914 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41915 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
41916 
41917 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41918 
41919 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41920 	typedef ::color::model< xyy_category_type > xyy_model_type;
41921 
41922 	typedef ::color::xyz< scalar_type > xyz_model_type;
41923 	typedef ::color::luv< scalar_type > luv_model_type;
41924 
41925 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41926 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41927 
41928 	typedef typename container_left_trait_type::input_type container_left_input_type;
41929 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41930 
processcolor::_internal::convert41931 	static void process
41932 	(
41933 		container_left_input_type left
41934 		,container_right_const_input_type right
41935 	) {
41936 		left = LuvCH_model_type(luv_model_type(xyz_model_type(xyy_model_type(right)))).container();
41937 	}
41938 };
41939 
41940 }
41941 }
41942 
41943 namespace color {
41944 namespace _internal {
41945 
41946 template
41947 <
41948 	typename LuvCH_tag_name
41949 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
41950 	>
41951 struct convert
41952 	<
41953 	::color::category::LuvCH< LuvCH_tag_name >
41954 	,::color::category::lms< lms_tag_name, lms_reference_number >
41955 	> {
41956 public:
41957 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
41958 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
41959 
41960 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
41961 
41962 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
41963 	typedef ::color::model< lms_category_type > lms_model_type;
41964 
41965 	typedef ::color::xyz< scalar_type > xyz_model_type;
41966 	typedef ::color::rgb< scalar_type > rgb_model_type;
41967 	typedef ::color::hsv< scalar_type > hsv_model_type;
41968 
41969 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
41970 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
41971 
41972 	typedef typename container_left_trait_type::input_type container_left_input_type;
41973 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
41974 
processcolor::_internal::convert41975 	static void process
41976 	(
41977 		container_left_input_type left
41978 		,container_right_const_input_type right
41979 	) {
41980 		left = LuvCH_model_type(hsv_model_type(rgb_model_type(xyz_model_type(lms_model_type(right))))).container();
41981 	}
41982 };
41983 
41984 }
41985 }
41986 
41987 namespace color {
41988 namespace _internal {
41989 
41990 template
41991 <
41992 	typename LuvCH_tag_name
41993 	,typename luv_tag_name
41994 	>
41995 struct convert
41996 	<
41997 	::color::category::LuvCH< LuvCH_tag_name >
41998 	,::color::category::luv< luv_tag_name >
41999 	> {
42000 public:
42001 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
42002 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
42003 
42004 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
42005 
42006 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42007 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42008 
42009 	typedef typename container_left_trait_type::input_type container_left_input_type;
42010 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42011 
42012 	typedef typename ::color::LuvCH< scalar_type >::category_type LuvCHscalar_category_type;
42013 	typedef typename ::color::luv< scalar_type >::category_type LUVscalar_category_type;
42014 
42015 	typedef ::color::_internal::reformat< category_left_type, LuvCHscalar_category_type > reformatCH_type;
42016 	typedef ::color::_internal::reformat< LUVscalar_category_type, category_right_type > reformatUV_type;
42017 
42018 	typedef ::color::constant::generic< LUVscalar_category_type > generic_costant_type;
42019 
42020 	enum {
42021 		lightness_p = ::color::place::_internal::lightness<category_left_type>::position_enum
42022 		,chroma_p = ::color::place::_internal::chroma<category_left_type>::position_enum
42023 		,hue_p = ::color::place::_internal::hue<category_left_type>::position_enum
42024 	};
42025 
processcolor::_internal::convert42026 	static void process
42027 	(
42028 		container_left_input_type left
42029 		,container_right_const_input_type right
42030 	) {
42031 		scalar_type l = reformatUV_type::template process< 0, 0 >(container_right_trait_type::template get<0>(right));
42032 		scalar_type u = reformatUV_type::template process< 1, 1 >(container_right_trait_type::template get<1>(right));
42033 		scalar_type v = reformatUV_type::template process< 2, 2 >(container_right_trait_type::template get<2>(right));
42034 		scalar_type c = sqrt(u*u + v*v);
42035 		scalar_type h = atan2(v, u) * generic_costant_type::rad2deg();
42036 		if(h < 0) {
42037 			h += 360;
42038 		}
42039 		container_left_trait_type::template set<0>(left, reformatCH_type::template process< lightness_p, 0 >(l));
42040 		container_left_trait_type::template set<1>(left, reformatCH_type::template process< chroma_p, 1 >(c));
42041 		container_left_trait_type::template set<2>(left, reformatCH_type::template process< hue_p, 2 >(h));
42042 	}
42043 };
42044 
42045 }
42046 }
42047 
42048 namespace color {
42049 namespace _internal {
42050 
42051 template
42052 <
42053 	typename LuvCH_tag_name
42054 	,typename LabCH_tag_name
42055 	>
42056 struct convert
42057 	<
42058 	::color::category::LuvCH< LuvCH_tag_name >
42059 	,::color::category::LabCH< LabCH_tag_name >
42060 	> {
42061 public:
42062 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_left_type;
42063 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
42064 
42065 	typedef typename ::color::trait::scalar< LuvCH_category_type >::instance_type scalar_type;
42066 
42067 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
42068 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
42069 
42070 	typedef ::color::luv< scalar_type > luv_model_type;
42071 	typedef ::color::xyz< scalar_type > xyz_model_type;
42072 	typedef ::color::lab< scalar_type > lab_model_type;
42073 
42074 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42075 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42076 
42077 	typedef typename container_left_trait_type::input_type container_left_input_type;
42078 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42079 
processcolor::_internal::convert42080 	static void process
42081 	(
42082 		container_left_input_type left
42083 		,container_right_const_input_type right
42084 	) {
42085 		left = LuvCH_model_type(luv_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right))))).container();
42086 	}
42087 };
42088 
42089 }
42090 }
42091 namespace color {
42092 namespace _internal {
42093 
42094 template< typename tag_left_name, typename tag_right_name >
42095 struct convert
42096 	<
42097 	::color::category::LuvCH< tag_left_name >
42098 	,::color::category::LuvCH< tag_right_name>
42099 	> {
42100 public:
42101 	typedef ::color::category::LuvCH< tag_left_name > category_left_type;
42102 	typedef ::color::category::LuvCH< tag_right_name> category_right_type;
42103 
42104 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42105 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42106 
42107 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
42108 
42109 	typedef typename container_left_trait_type::input_type container_left_input_type;
42110 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42111 
processcolor::_internal::convert42112 	static void process
42113 	(
42114 		container_left_input_type left
42115 		,container_right_const_input_type right
42116 	) {
42117 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
42118 		container_left_trait_type::template set<1>(left, reformat_type::template process<1,1>(container_right_trait_type::template get<1>(right)));
42119 		container_left_trait_type::template set<2>(left, reformat_type::template process<2,2>(container_right_trait_type::template get<2>(right)));
42120 	}
42121 };
42122 
42123 }
42124 }
42125 
42126 namespace color {
42127 namespace _internal {
42128 
42129 template
42130 <
42131 	typename LabCH_tag_name
42132 	,typename LuvCH_tag_name
42133 	>
42134 struct convert
42135 	<
42136 	::color::category::LabCH< LabCH_tag_name >
42137 	,::color::category::LuvCH< LuvCH_tag_name >
42138 	> {
42139 public:
42140 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_left_type;
42141 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
42142 
42143 	typedef typename ::color::trait::scalar< LabCH_category_type >::instance_type scalar_type;
42144 
42145 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
42146 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
42147 
42148 	typedef ::color::xyz< scalar_type > xyz_model_type;
42149 	typedef ::color::lab< scalar_type > lab_model_type;
42150 	typedef ::color::luv< scalar_type > luv_model_type;
42151 
42152 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42153 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42154 
42155 	typedef typename container_left_trait_type::input_type container_left_input_type;
42156 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42157 
processcolor::_internal::convert42158 	static void process
42159 	(
42160 		container_left_input_type left
42161 		,container_right_const_input_type right
42162 	) {
42163 		left = LabCH_model_type(lab_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right))))).container();
42164 	}
42165 };
42166 
42167 }
42168 }
42169 
42170 namespace color {
42171 namespace _internal {
42172 
42173 template
42174 <
42175 	typename luv_tag_name
42176 	,typename LabCH_tag_name
42177 	>
42178 struct convert
42179 	<
42180 	::color::category::luv< luv_tag_name >
42181 	,::color::category::LabCH< LabCH_tag_name >
42182 	> {
42183 public:
42184 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
42185 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
42186 
42187 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
42188 
42189 	typedef ::color::model< luv_category_type > luv_model_type;
42190 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
42191 
42192 	typedef ::color::xyz< scalar_type > xyz_model_type;
42193 	typedef ::color::lab< scalar_type > lab_model_type;
42194 
42195 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42196 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42197 
42198 	typedef typename container_left_trait_type::input_type container_left_input_type;
42199 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42200 
processcolor::_internal::convert42201 	static void process
42202 	(
42203 		container_left_input_type left
42204 		,container_right_const_input_type right
42205 	) {
42206 		left = luv_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right)))).container();
42207 	}
42208 };
42209 
42210 }
42211 }
42212 
42213 namespace color {
42214 namespace _internal {
42215 
42216 template
42217 <
42218 	typename luv_tag_name
42219 	,typename LuvCH_tag_name
42220 	>
42221 struct convert
42222 	<
42223 	::color::category::luv< luv_tag_name >
42224 	,::color::category::LuvCH< LuvCH_tag_name >
42225 	> {
42226 public:
42227 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_left_type;
42228 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
42229 
42230 	typedef typename ::color::trait::scalar< luv_category_type >::instance_type scalar_type;
42231 
42232 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42233 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42234 
42235 	typedef typename container_left_trait_type::input_type container_left_input_type;
42236 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42237 
42238 	typedef typename ::color::luv< scalar_type >::category_type LUVscalar_category_type;
42239 	typedef typename ::color::LuvCH< scalar_type >::category_type LuvCHscalar_category_type;
42240 
42241 	typedef ::color::_internal::reformat< category_left_type, LUVscalar_category_type > reformatUV_type;
42242 	typedef ::color::_internal::reformat< LuvCHscalar_category_type, category_right_type > reformatCH_type;
42243 
42244 	typedef ::color::constant::generic< LUVscalar_category_type > generic_costant_type;
42245 
processcolor::_internal::convert42246 	static void process
42247 	(
42248 		container_left_input_type left
42249 		,container_right_const_input_type right
42250 	) {
42251 		scalar_type l = reformatCH_type::template process< 0, 0 >(container_right_trait_type::template get<0>(right));
42252 		scalar_type c = reformatCH_type::template process< 1, 1 >(container_right_trait_type::template get<1>(right));
42253 		scalar_type h = reformatCH_type::template process< 2, 2 >(container_right_trait_type::template get<2>(right));
42254 		scalar_type u = c * cos(h * generic_costant_type::deg2rad());
42255 		scalar_type v = c * sin(h * generic_costant_type::deg2rad());
42256 		container_left_trait_type::template set<0>(left, reformatUV_type::template process< 0, 0 >(l));
42257 		container_left_trait_type::template set<1>(left, reformatUV_type::template process< 1, 1 >(u));
42258 		container_left_trait_type::template set<2>(left, reformatUV_type::template process< 2, 2 >(v));
42259 	}
42260 };
42261 
42262 }
42263 }
42264 
42265 namespace color {
42266 namespace _internal {
42267 
42268 template
42269 <
42270 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
42271 	,typename luv_tag_name
42272 	>
42273 struct convert
42274 	<
42275 	::color::category::lms< lms_tag_name, lms_reference_number >
42276 	,::color::category::luv< luv_tag_name >
42277 	> {
42278 public:
42279 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
42280 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
42281 
42282 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
42283 
42284 	typedef ::color::model< lms_category_type > lms_model_type;
42285 	typedef ::color::model< luv_category_type > luv_model_type;
42286 
42287 	typedef ::color::xyz< scalar_type > xyz_model_type;
42288 
42289 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42290 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42291 
42292 	typedef typename container_left_trait_type::input_type container_left_input_type;
42293 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42294 
processcolor::_internal::convert42295 	static void process
42296 	(
42297 		container_left_input_type left
42298 		,container_right_const_input_type right
42299 	) {
42300 		left = lms_model_type(xyz_model_type(luv_model_type(right))).container();
42301 	}
42302 };
42303 
42304 }
42305 }
42306 
42307 namespace color {
42308 namespace _internal {
42309 
42310 template
42311 <
42312 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
42313 	,typename LabCH_tag_name
42314 	>
42315 struct convert
42316 	<
42317 	::color::category::lms< lms_tag_name, lms_reference_number >
42318 	,::color::category::LabCH< LabCH_tag_name >
42319 	> {
42320 public:
42321 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
42322 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
42323 
42324 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
42325 
42326 	typedef ::color::model< lms_category_type > lms_model_type;
42327 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
42328 
42329 	typedef ::color::xyz< scalar_type > xyz_model_type;
42330 	typedef ::color::lab< scalar_type > lab_model_type;
42331 
42332 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42333 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42334 
42335 	typedef typename container_left_trait_type::input_type container_left_input_type;
42336 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42337 
processcolor::_internal::convert42338 	static void process
42339 	(
42340 		container_left_input_type left
42341 		,container_right_const_input_type right
42342 	) {
42343 		left = lms_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right)))).container();
42344 	}
42345 };
42346 
42347 }
42348 }
42349 
42350 namespace color {
42351 namespace _internal {
42352 
42353 template
42354 <
42355 	typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
42356 	,typename LuvCH_tag_name
42357 	>
42358 struct convert
42359 	<
42360 	::color::category::lms< lms_tag_name, lms_reference_number >
42361 	,::color::category::LuvCH< LuvCH_tag_name >
42362 	> {
42363 public:
42364 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_left_type;
42365 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
42366 
42367 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
42368 
42369 	typedef ::color::model< lms_category_type > lms_model_type;
42370 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
42371 
42372 	typedef ::color::xyz< scalar_type > xyz_model_type;
42373 	typedef ::color::luv< scalar_type > luv_model_type;
42374 
42375 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42376 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42377 
42378 	typedef typename container_left_trait_type::input_type container_left_input_type;
42379 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42380 
processcolor::_internal::convert42381 	static void process
42382 	(
42383 		container_left_input_type left
42384 		,container_right_const_input_type right
42385 	) {
42386 		left = lms_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right)))).container();
42387 	}
42388 };
42389 
42390 }
42391 }
42392 
42393 namespace color {
42394 namespace _internal {
42395 
42396 template
42397 <
42398 	typename xyy_tag_name
42399 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
42400 	>
42401 struct convert
42402 	<
42403 	::color::category::xyy< xyy_tag_name >
42404 	,::color::category::lms< lms_tag_name, lms_reference_number >
42405 	> {
42406 public:
42407 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
42408 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
42409 
42410 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
42411 
42412 	typedef ::color::model< xyy_category_type > xyy_model_type;
42413 	typedef ::color::model< lms_category_type > lms_model_type;
42414 
42415 	typedef ::color::xyz< scalar_type > xyz_model_type;
42416 
42417 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42418 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42419 
42420 	typedef typename container_left_trait_type::input_type container_left_input_type;
42421 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42422 
processcolor::_internal::convert42423 	static void process
42424 	(
42425 		container_left_input_type left
42426 		,container_right_const_input_type right
42427 	) {
42428 		left = xyy_model_type(xyz_model_type(lms_model_type(right))).container();
42429 	}
42430 };
42431 
42432 }
42433 }
42434 
42435 namespace color {
42436 namespace _internal {
42437 
42438 template
42439 <
42440 	typename xyy_tag_name
42441 	,typename luv_tag_name
42442 	>
42443 struct convert
42444 	<
42445 	::color::category::xyy< xyy_tag_name >
42446 	,::color::category::luv< luv_tag_name >
42447 	> {
42448 public:
42449 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
42450 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
42451 
42452 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
42453 
42454 	typedef ::color::model< xyy_category_type > xyy_model_type;
42455 	typedef ::color::model< luv_category_type > luv_model_type;
42456 
42457 	typedef ::color::xyz< scalar_type > xyz_model_type;
42458 
42459 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42460 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42461 
42462 	typedef typename container_left_trait_type::input_type container_left_input_type;
42463 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42464 
processcolor::_internal::convert42465 	static void process
42466 	(
42467 		container_left_input_type left
42468 		,container_right_const_input_type right
42469 	) {
42470 		left = xyy_model_type(xyz_model_type(luv_model_type(right))).container();
42471 	}
42472 };
42473 
42474 }
42475 }
42476 
42477 namespace color {
42478 namespace _internal {
42479 
42480 template
42481 <
42482 	typename xyy_tag_name
42483 	,typename LabCH_tag_name
42484 	>
42485 struct convert
42486 	<
42487 	::color::category::xyy< xyy_tag_name >
42488 	,::color::category::LabCH< LabCH_tag_name >
42489 	> {
42490 public:
42491 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
42492 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
42493 
42494 	typedef typename ::color::trait::scalar< xyy_category_type >::instance_type scalar_type;
42495 
42496 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
42497 	typedef ::color::model< xyy_category_type > xyy_model_type;
42498 
42499 	typedef ::color::lab< scalar_type > lab_model_type;
42500 	typedef ::color::xyz< scalar_type > xyz_model_type;
42501 
42502 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42503 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42504 
42505 	typedef typename container_left_trait_type::input_type container_left_input_type;
42506 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42507 
processcolor::_internal::convert42508 	static void process
42509 	(
42510 		container_left_input_type left
42511 		,container_right_const_input_type right
42512 	) {
42513 		left = xyy_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right)))).container();
42514 	}
42515 };
42516 
42517 }
42518 }
42519 
42520 namespace color {
42521 namespace _internal {
42522 
42523 template
42524 <
42525 	typename xyy_tag_name
42526 	,typename LuvCH_tag_name
42527 	>
42528 struct convert
42529 	<
42530 	::color::category::xyy< xyy_tag_name >
42531 	,::color::category::LuvCH< LuvCH_tag_name >
42532 	> {
42533 public:
42534 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_left_type;
42535 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
42536 
42537 	typedef typename ::color::trait::scalar< xyy_category_type >::instance_type scalar_type;
42538 
42539 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
42540 	typedef ::color::model< xyy_category_type > xyy_model_type;
42541 
42542 	typedef ::color::luv< scalar_type > luv_model_type;
42543 	typedef ::color::xyz< scalar_type > xyz_model_type;
42544 
42545 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42546 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42547 
42548 	typedef typename container_left_trait_type::input_type container_left_input_type;
42549 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42550 
processcolor::_internal::convert42551 	static void process
42552 	(
42553 		container_left_input_type left
42554 		,container_right_const_input_type right
42555 	) {
42556 		left = xyy_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right)))).container();
42557 	}
42558 };
42559 
42560 }
42561 }
42562 
42563 namespace color {
42564 namespace _internal {
42565 
42566 template
42567 <
42568 	typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
42569 	,typename xyy_tag_name
42570 	>
42571 struct convert
42572 	<
42573 	::color::category::lab< lab_tag_name, reference_number >
42574 	,::color::category::xyy< xyy_tag_name >
42575 	> {
42576 public:
42577 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_left_type;
42578 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
42579 
42580 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
42581 
42582 	typedef ::color::model< lab_category_type > lab_model_type;
42583 	typedef ::color::model< xyy_category_type > xyy_model_type;
42584 
42585 	typedef ::color::xyz< scalar_type > xyz_model_type;
42586 
42587 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42588 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42589 
42590 	typedef typename container_left_trait_type::input_type container_left_input_type;
42591 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42592 
processcolor::_internal::convert42593 	static void process
42594 	(
42595 		container_left_input_type left
42596 		,container_right_const_input_type right
42597 	) {
42598 		left = lab_model_type(xyz_model_type(xyy_model_type(right))).container();
42599 	}
42600 };
42601 
42602 }
42603 }
42604 
42605 namespace color {
42606 namespace _internal {
42607 
42608 template
42609 <
42610 	typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
42611 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
42612 	>
42613 struct convert
42614 	<
42615 	::color::category::lab< lab_tag_name, lab_reference_number >
42616 	,::color::category::lms< lms_tag_name, lms_reference_number >
42617 	> {
42618 public:
42619 	typedef ::color::category::lab< lab_tag_name, lab_reference_number > lab_category_type, category_left_type;
42620 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
42621 
42622 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
42623 
42624 	typedef ::color::model< lab_category_type > lab_model_type;
42625 	typedef ::color::model< lms_category_type > lms_model_type;
42626 
42627 	typedef ::color::xyz< scalar_type > xyz_model_type;
42628 
42629 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42630 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42631 
42632 	typedef typename container_left_trait_type::input_type container_left_input_type;
42633 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42634 
processcolor::_internal::convert42635 	static void process
42636 	(
42637 		container_left_input_type left
42638 		,container_right_const_input_type right
42639 	) {
42640 		left = lab_model_type(xyz_model_type(lms_model_type(right))).container();
42641 	}
42642 };
42643 
42644 }
42645 }
42646 
42647 namespace color {
42648 namespace _internal {
42649 
42650 template
42651 <
42652 	typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
42653 	,typename luv_tag_name
42654 	>
42655 struct convert
42656 	<
42657 	::color::category::lab< lab_tag_name, reference_number >
42658 	,::color::category::luv< luv_tag_name >
42659 	> {
42660 public:
42661 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_left_type;
42662 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
42663 
42664 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
42665 
42666 	typedef ::color::model< lab_category_type > lab_model_type;
42667 	typedef ::color::model< luv_category_type > luv_model_type;
42668 
42669 	typedef ::color::xyz< scalar_type > xyz_model_type;
42670 
42671 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42672 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42673 
42674 	typedef typename container_left_trait_type::input_type container_left_input_type;
42675 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42676 
processcolor::_internal::convert42677 	static void process
42678 	(
42679 		container_left_input_type left
42680 		,container_right_const_input_type right
42681 	) {
42682 		left = lab_model_type(xyz_model_type(luv_model_type(right))).container();
42683 	}
42684 };
42685 
42686 }
42687 }
42688 
42689 namespace color {
42690 namespace _internal {
42691 
42692 template
42693 <
42694 	typename lab_tag_name
42695 	,typename LabCH_tag_name
42696 	>
42697 struct convert
42698 	<
42699 	::color::category::lab< lab_tag_name, ::color::constant::lab::CIE_entity >
42700 	,::color::category::LabCH< LabCH_tag_name >
42701 	> {
42702 public:
42703 	typedef ::color::category::lab< lab_tag_name, ::color::constant::lab::CIE_entity > lab_category_type, category_left_type;
42704 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
42705 
42706 	typedef typename ::color::trait::scalar< lab_category_type >::instance_type scalar_type;
42707 
42708 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42709 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42710 
42711 	typedef typename container_left_trait_type::input_type container_left_input_type;
42712 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42713 
42714 	typedef typename ::color::lab< scalar_type >::category_type LABscalar_category_type;
42715 	typedef typename ::color::LabCH< scalar_type >::category_type LabCHscalar_category_type;
42716 
42717 	typedef ::color::_internal::reformat< category_left_type, LABscalar_category_type > reformatAB_type;
42718 	typedef ::color::_internal::reformat< LabCHscalar_category_type, category_right_type > reformatCH_type;
42719 
42720 	typedef ::color::constant::generic< LABscalar_category_type > generic_costant_type;
42721 
42722 	enum {
42723 		lightness_left_p = ::color::place::_internal::lightness<category_left_type>::position_enum
42724 	};
42725 
42726 	enum {
42727 		lightness_right_p = ::color::place::_internal::lightness<category_right_type>::position_enum
42728 		,chroma_right_p = ::color::place::_internal::chroma<category_right_type>::position_enum
42729 		,hue_right_p = ::color::place::_internal::hue<category_right_type>::position_enum
42730 	};
42731 
processcolor::_internal::convert42732 	static void process
42733 	(
42734 		container_left_input_type left
42735 		,container_right_const_input_type right
42736 	) {
42737 		scalar_type l = reformatCH_type::template process< 0, lightness_right_p >(container_right_trait_type::template get<lightness_right_p >(right));
42738 		scalar_type c = reformatCH_type::template process< 1, chroma_right_p >(container_right_trait_type::template get<chroma_right_p >(right));
42739 		scalar_type h = reformatCH_type::template process< 2, hue_right_p >(container_right_trait_type::template get<hue_right_p >(right));
42740 		scalar_type a = c * cos(h * generic_costant_type::deg2rad());
42741 		scalar_type b = c * sin(h * generic_costant_type::deg2rad());
42742 		container_left_trait_type::template set<lightness_left_p>(left, reformatAB_type::template process< lightness_left_p, 0 >(l));
42743 		container_left_trait_type::template set<1>(left, reformatAB_type::template process< 1, 1 >(a));
42744 		container_left_trait_type::template set<2>(left, reformatAB_type::template process< 2, 2 >(b));
42745 	}
42746 };
42747 
42748 template
42749 <
42750 	typename lab_tag_name
42751 	,typename LabCH_tag_name
42752 	>
42753 struct convert
42754 	<
42755 	::color::category::lab< lab_tag_name, ::color::constant::lab::Hunter_entity >
42756 	,::color::category::LabCH< LabCH_tag_name >
42757 	> {
42758 public:
42759 	typedef ::color::category::lab< lab_tag_name, ::color::constant::lab::Hunter_entity > lab_category_type, category_left_type;
42760 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
42761 
42762 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
42763 
42764 	typedef ::color::model< lab_category_type > lab_model_type;
42765 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
42766 
42767 	typedef ::color::xyz< scalar_type > xyz_model_type;
42768 
42769 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42770 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42771 
42772 	typedef typename container_left_trait_type::input_type container_left_input_type;
42773 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42774 
processcolor::_internal::convert42775 	static void process
42776 	(
42777 		container_left_input_type left
42778 		,container_right_const_input_type right
42779 	) {
42780 		left = lab_model_type(xyz_model_type(LabCH_model_type(right))).container();
42781 	}
42782 };
42783 
42784 }
42785 }
42786 
42787 namespace color {
42788 namespace _internal {
42789 
42790 template
42791 <
42792 	typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
42793 	,typename LuvCH_tag_name
42794 	>
42795 struct convert
42796 	<
42797 	::color::category::lab< lab_tag_name, reference_number >
42798 	,::color::category::LuvCH< LuvCH_tag_name >
42799 	> {
42800 public:
42801 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_left_type;
42802 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
42803 
42804 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
42805 
42806 	typedef ::color::model< lab_category_type > lab_model_type;
42807 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
42808 
42809 	typedef ::color::xyz< scalar_type > xyz_model_type;
42810 	typedef ::color::luv< scalar_type > luv_model_type;
42811 
42812 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
42813 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
42814 
42815 	typedef typename container_left_trait_type::input_type container_left_input_type;
42816 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
42817 
processcolor::_internal::convert42818 	static void process
42819 	(
42820 		container_left_input_type left
42821 		,container_right_const_input_type right
42822 	) {
42823 		left = lab_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right)))).container();
42824 	}
42825 };
42826 
42827 }
42828 }
42829 
42830 namespace color {
42831 namespace operation {
42832 namespace _internal {
42833 
42834 template< typename category_name >
42835 struct delta {
42836 public:
42837 	typedef category_name category_type;
42838 
42839 	typedef ::color::trait::index<category_type> index_trait_type;
42840 	typedef ::color::trait::component< category_type > component_trait_type;
42841 	typedef ::color::trait::container< category_type > container_trait_type;
42842 	typedef ::color::trait::scalar<category_type> scalar_trait_type;
42843 
42844 	typedef typename index_trait_type::instance_type index_type;
42845 	typedef typename component_trait_type::instance_type component_type;
42846 	typedef typename scalar_trait_type::instance_type scalar_type;
42847 
42848 	typedef ::color::model<category_type> model_type;
42849 
42850 	typedef model_type & model_output_type;
42851 	typedef model_type const& model_const_input_type;
42852 
42853 	typedef model_type result_type;
42854 	typedef model_type left_type, first_argument_type;
42855 	typedef model_type right_type, second_argument_type;
42856 
42857 	typedef ::color::operation::_internal::delta<category_type> this_type;
42858 public:
operator ()color::operation::_internal::delta42859 	model_type& operator()(model_type & result, model_type const& right)const {
42860 		return this_type::accumulate(result, right);
42861 	}
42862 
operator ()color::operation::_internal::delta42863 	model_type& operator()(model_type & result, model_type const& left, model_type const& right)const {
42864 		return this_type::process(result, left, right);
42865 	}
42866 
42867 public:
accumulatecolor::operation::_internal::delta42868 	static model_type& accumulate(model_output_type result, model_const_input_type right) {
42869 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
42870 			if(result.get(index) < right.get(index)) {
42871 				result.set(index, component_type(right.get(index) - result.get(index)));
42872 			} else {
42873 				result.set(index, component_type(result.get(index) - right.get(index)));
42874 			}
42875 		}
42876 		return result;
42877 	}
42878 
processcolor::operation::_internal::delta42879 	static model_type process(model_const_input_type left, model_const_input_type right) {
42880 		model_type result;
42881 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
42882 			if(left.get(index) < right.get(index)) {
42883 				result.set(index, component_type(right.get(index) - left.get(index)));
42884 			} else {
42885 				result.set(index, component_type(left.get(index) - right.get(index)));
42886 			}
42887 		}
42888 		return result;
42889 	}
42890 
processcolor::operation::_internal::delta42891 	static model_type& process(model_output_type result, model_const_input_type left, model_const_input_type right) {
42892 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
42893 			if(left.get(index) < right.get(index)) {
42894 				result.set(index, component_type(right.get(index) - left.get(index)));
42895 			} else {
42896 				result.set(index, component_type(left.get(index) - right.get(index)));
42897 			}
42898 		}
42899 		return result;
42900 	}
42901 };
42902 
42903 }
42904 
42905 template< typename category_name >
42906 ::color::model<category_name> &
delta(::color::model<category_name> & result,::color::model<category_name> const & right)42907 delta
42908 (
42909 	::color::model<category_name> & result
42910 	,::color::model<category_name> const& right
42911 ) {
42912 	return ::color::operation::_internal::delta<category_name>::accumulate(result, right);
42913 }
42914 
42915 template< typename category_name >
42916 ::color::model<category_name> &
delta(::color::model<category_name> & result,::color::model<category_name> const & left,::color::model<category_name> const & right)42917 delta
42918 (
42919 	::color::model<category_name> & result
42920 	,::color::model<category_name> const& left
42921 	,::color::model<category_name> const& right
42922 ) {
42923 	return ::color::operation::_internal::delta<category_name>::process(result, left, right);
42924 }
42925 
42926 }
42927 }
42928 
42929 namespace color {
42930 namespace constant {
42931 namespace distance {
42932 
42933 enum reference_enum {
42934 	error_entity
42935 	,euclid_entity
42936 
42937 	,CIE76_entity
42938 	,CIE94__base_entity
42939 	,CIE94_graphics_entity
42940 	,CIE94_textile_entity
42941 	,CIEDE2000_entity
42942 	,CMC1984_entity
42943 	,delta_gray_entity
42944 	,hsl_special_entity
42945 
42946 	,rgb_special_entity
42947 };
42948 
42949 }
42950 }
42951 
42952 namespace operation {
42953 namespace _internal {
42954 
42955 template
42956 <
42957 	typename category_left_name
42958 	,typename category_right_name
42959 	,enum ::color::constant::distance::reference_enum reference_number = ::color::constant::distance::error_entity
42960 	>
42961 struct distance {
42962 public:
42963 	typedef category_left_name category_left_type;
42964 	typedef category_right_name category_right_type;
42965 
42966 	typedef ::color::model< category_left_type > model_left_type;
42967 	typedef ::color::model< category_right_type > model_right_type;
42968 
42969 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
42970 
42971 	typedef ::color::operation::_internal::distance< category_left_type, category_right_type, ::color::constant::distance::error_entity > this_type;
42972 
42973 public:
operator ()color::operation::_internal::distance42974 	scalar_type operator()(model_left_type const& left, model_right_type const& right)const {
42975 		return this_type::process(left, right);
42976 	}
42977 
42978 public:
processcolor::operation::_internal::distance42979 	static scalar_type process(model_left_type const& left, model_right_type const& right) {
42980 		return -1;
42981 	}
42982 };
42983 
42984 template< typename category_name >
42985 struct distance< category_name, category_name, ::color::constant::distance::euclid_entity > {
42986 public:
42987 	typedef category_name category_type;
42988 	typedef ::color::model<category_type> model_type;
42989 	typedef typename ::color::trait::container< category_type > container_trait_type;
42990 	typedef typename ::color::trait::scalar< category_type >::instance_type scalar_type;
42991 	typedef typename ::color::trait::index< category_type >::instance_type index_type;
42992 
42993 	typedef ::color::operation::_internal::distance< category_name, category_name, ::color::constant::distance::euclid_entity> this_type;
42994 
squarecolor::operation::_internal::distance42995 	static scalar_type square(scalar_type const& s) {
42996 		return s * s;
42997 	}
42998 
processcolor::operation::_internal::distance42999 	static scalar_type process(model_type const& left, model_type const& right) {
43000 		scalar_type lenght = 0;
43001 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
43002 			if(left.get(index) < right.get(index)) {
43003 				lenght += this_type::square(scalar_type(right.get(index) - left.get(index)));
43004 			} else {
43005 				lenght += this_type::square(scalar_type(left.get(index) - right.get(index)));
43006 			}
43007 		}
43008 		return sqrt(lenght);
43009 	}
43010 };
43011 
43012 template< typename category_name >
43013 struct distance< category_name, category_name, ::color::constant::distance::delta_gray_entity > {
43014 public:
43015 	typedef category_name category_type;
43016 	typedef ::color::model<category_type> model_type;
43017 	typedef typename ::color::trait::scalar< category_type >::instance_type scalar_type;
43018 	typedef ::color::gray<scalar_type> gray_type;
43019 
processcolor::operation::_internal::distance43020 	static scalar_type process(model_type const& left, model_type const& right) {
43021 		model_type difference;
43022 		return gray_type(::color::operation::delta(difference, left, right)).template get<0>();
43023 	}
43024 };
43025 template< typename category_left_name, typename category_right_name >
43026 struct distance< category_left_name, category_right_name, ::color::constant::distance::CIE76_entity > {
43027 public:
43028 	typedef category_left_name category_left_type;
43029 	typedef category_right_name category_right_type;
43030 	typedef ::color::model< category_left_type > model_left_type;
43031 	typedef ::color::model< category_right_type > model_right_type;
43032 
43033 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
43034 
43035 	typedef ::color::lab<scalar_type> lab_type;
43036 	typedef typename lab_type::category_type lab_category_type;
43037 	typedef ::color::operation::_internal::distance<lab_category_type, lab_category_type,::color::constant::distance::euclid_entity> lab_distance_type;
43038 
processcolor::operation::_internal::distance43039 	static scalar_type process(model_left_type const& left, model_right_type const& right) {
43040 		lab_type lab_left(left);
43041 		lab_type lab_right(right);
43042 		return lab_distance_type::process(lab_left, lab_right);
43043 	}
43044 };
43045 
43046 template< typename category_left_name, typename category_right_name >
43047 struct distance< category_left_name, category_right_name, ::color::constant::distance::CIE94__base_entity > {
43048 public:
43049 	typedef category_left_name category_left_type;
43050 	typedef category_right_name category_right_type;
43051 	typedef ::color::model< category_left_type > model_left_type;
43052 	typedef ::color::model< category_right_type > model_right_type;
43053 
43054 	typedef typename ::color::trait::scalar< category_left_name >::instance_type scalar_type;
43055 	typedef ::color::lab<scalar_type> lab_type;
43056 
43057 	typedef ::color::operation::_internal::distance< category_left_name, category_right_name, ::color::constant::distance::CIE94__base_entity > this_type;
43058 
squarecolor::operation::_internal::distance43059 	static scalar_type square(scalar_type const& s) {
43060 		return s * s;
43061 	}
43062 
processcolor::operation::_internal::distance43063 	static scalar_type process(model_left_type const& left, model_right_type const& right, scalar_type const& K_L, scalar_type const& K_1, scalar_type const& K_2) {
43064 		static const scalar_type K_C = 1;
43065 		static const scalar_type K_H = 1;
43066 		lab_type lab_left(left);
43067 		lab_type lab_right(right);
43068 		scalar_type const& L_1 = lab_left.template get<0>();
43069 		scalar_type const& a_1 = lab_left.template get<1>();
43070 		scalar_type const& b_1 = lab_left.template get<2>();
43071 		scalar_type const& L_2 = lab_right.template get<0>();
43072 		scalar_type const& a_2 = lab_right.template get<1>();
43073 		scalar_type const& b_2 = lab_right.template get<2>();
43074 		scalar_type delta_L = L_1 - L_2;
43075 		scalar_type C_1 = sqrt(this_type::square(a_1) + this_type::square(b_1));
43076 		scalar_type C_2 = sqrt(this_type::square(a_2) + this_type::square(b_2));
43077 		scalar_type delta_C_ab = C_1 - C_2;
43078 		scalar_type delta_a = a_1 - a_2;
43079 		scalar_type delta_b = b_1 - b_2;
43080 		scalar_type delta_H_ab = sqrt(fabs(this_type::square(delta_a) + this_type::square(delta_b) - this_type::square(delta_C_ab)));
43081 		scalar_type S_L = 1;
43082 		scalar_type S_C = 1 + K_1 * C_1;
43083 		scalar_type S_H = 1 + K_2 * C_1;
43084 		scalar_type delta_E_1 = delta_L /(K_L * S_L);
43085 		scalar_type delta_E_2 = delta_C_ab/(K_C * S_C);
43086 		scalar_type delta_E_3 = delta_H_ab/(K_H * S_H);
43087 		scalar_type delta_E_main = sqrt(this_type::square(delta_E_1) + this_type::square(delta_E_2) + this_type::square(delta_E_3));
43088 		return delta_E_main;
43089 	}
43090 };
43091 
43092 template< typename category_left_name, typename category_right_name >
43093 struct distance< category_left_name, category_right_name, ::color::constant::distance::CIE94_graphics_entity > {
43094 public:
43095 	typedef category_left_name category_left_type;
43096 	typedef category_right_name category_right_type;
43097 	typedef ::color::model< category_left_type > model_left_type;
43098 	typedef ::color::model< category_right_type > model_right_type;
43099 
43100 	typedef distance< category_left_type, category_right_type, ::color::constant::distance::CIE94__base_entity > base_type;
43101 	typedef typename base_type::scalar_type scalar_type;
43102 
processcolor::operation::_internal::distance43103 	static scalar_type process(model_left_type const& left, model_right_type const& right) {
43104 		return base_type::process(left, right, 1, 0.045, 0.015);
43105 	}
43106 };
43107 
43108 template< typename category_left_name, typename category_right_name >
43109 struct distance< category_left_name, category_right_name, ::color::constant::distance::CIE94_textile_entity > {
43110 public:
43111 	typedef category_left_name category_left_type;
43112 	typedef category_right_name category_right_type;
43113 	typedef ::color::model< category_left_type > model_left_type;
43114 	typedef ::color::model< category_right_type > model_right_type;
43115 
43116 	typedef distance< category_left_type, category_right_type, ::color::constant::distance::CIE94__base_entity > base_type;
43117 	typedef typename base_type::scalar_type scalar_type;
43118 
processcolor::operation::_internal::distance43119 	static scalar_type process(model_left_type const& left, model_right_type const& right) {
43120 		return base_type::process(left, right, 2, 0.048, 0.014);
43121 	}
43122 };
43123 
43124 template< typename category_left_name, typename category_right_name >
43125 struct distance< category_left_name, category_right_name, ::color::constant::distance::CIEDE2000_entity > {
43126 public:
43127 	typedef category_left_name category_left_type;
43128 	typedef category_right_name category_right_type;
43129 	typedef ::color::model< category_left_type > model_left_type;
43130 	typedef ::color::model< category_right_type > model_right_type;
43131 
43132 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
43133 	typedef ::color::constant::generic< category_left_type > constant_type;
43134 
43135 	typedef ::color::lab<scalar_type> lab_type;
43136 
43137 	typedef ::color::operation::_internal::distance< category_left_name, category_right_name, ::color::constant::distance::CIEDE2000_entity > this_type;
43138 
squarecolor::operation::_internal::distance43139 	static scalar_type square(scalar_type const& s) {
43140 		return s * s;
43141 	}
43142 
processcolor::operation::_internal::distance43143 	static scalar_type process(model_left_type const& left, model_right_type const& right) {
43144 		lab_type lab_left(left);
43145 		lab_type lab_right(right);
43146 		scalar_type const& L_1 = lab_left.template get<0>();
43147 		scalar_type const& a_1 = lab_left.template get<1>();
43148 		scalar_type const& b_1 = lab_left.template get<2>();
43149 		scalar_type const& L_2 = lab_right.template get<0>();
43150 		scalar_type const& a_2 = lab_right.template get<1>();
43151 		scalar_type const& b_2 = lab_right.template get<2>();
43152 		scalar_type L_p_a = (L_1 + L_2) /2;
43153 		scalar_type C_1 = sqrt(this_type::square(a_1) + this_type::square(b_1));
43154 		scalar_type C_2 = sqrt(this_type::square(a_2) + this_type::square(b_2));
43155 		scalar_type C_a = (C_1 + C_2) /2;
43156 		scalar_type G = (1- sqrt(pow(C_a,7)/(pow(C_a,7) + pow(25,7)))) /2;
43157 		scalar_type a_1_p = a_1 * (1+G);
43158 		scalar_type a_2_p = a_2 * (1+G);
43159 		scalar_type C_1_p = sqrt(this_type::square(a_1_p) + this_type::square(b_1));
43160 		scalar_type C_2_p = sqrt(this_type::square(a_2_p) + this_type::square(b_2));
43161 		scalar_type C_p_a = (C_1_p + C_2_p)/2;
43162 		scalar_type h_1_p = atan2(b_1, a_1_p);
43163 		if(h_1_p < 0) {
43164 			h_1_p += 2*constant_type::pi();
43165 		}
43166 		h_1_p *= constant_type::rad2deg();
43167 		scalar_type h_2_p = atan2(b_2, a_2_p);
43168 		if(h_2_p < 0) {
43169 			h_2_p += 2*constant_type::pi();
43170 		}
43171 		h_2_p *= constant_type::rad2deg();
43172 		scalar_type H_a_p = (h_1_p + h_2_p)/2;
43173 		if(180 < fabs(h_1_p - h_2_p)) {
43174 			H_a_p += 180;
43175 		}
43176 		scalar_type T = + 1
43177 						- 0.17 * cos((H_a_p - 30)*constant_type::deg2rad())
43178 						+ 0.24 * cos((2*H_a_p - 0)*constant_type::deg2rad())
43179 						+ 0.32 * cos((3*H_a_p + 6)*constant_type::deg2rad())
43180 						- 0.20 * cos((4*H_a_p - 63)*constant_type::deg2rad());
43181 		scalar_type delta_h_p;
43182 		if(180 < fabs(h_1_p - h_2_p)) {
43183 			if(h_2_p < h_1_p) {
43184 				delta_h_p = h_2_p - h_1_p + 360;
43185 			} else {
43186 				delta_h_p = h_2_p - h_1_p - 360;
43187 			}
43188 		} else {
43189 			delta_h_p = h_2_p - h_1_p;
43190 		}
43191 		scalar_type delta_L_p = L_2 - L_1;
43192 		scalar_type delta_C_p = C_2_p - C_1_p;
43193 		scalar_type delta_H_p = 2*sqrt(C_1_p* C_2_p) * sin((delta_h_p / 2) * constant_type::deg2rad());
43194 		scalar_type S_L = 1 + (0.015* this_type::square(L_p_a - 50))/sqrt(20 + this_type::square(L_p_a - 50));
43195 		scalar_type S_C = 1 + 0.045 * C_p_a;
43196 		scalar_type S_H = 1 + 0.015 * C_p_a * T;
43197 		scalar_type delta_theta = 30 * exp(- this_type::square((H_a_p - 275)/25));
43198 		scalar_type R_C = 2*sqrt(pow(C_p_a,7)/(pow(C_p_a,7) + pow(25,7)));
43199 		scalar_type R_T = - R_C * sin((2 * delta_theta) * constant_type::rad2deg());
43200 		scalar_type K_L = 1;
43201 		scalar_type K_C = 1;
43202 		scalar_type K_H = 1;
43203 		scalar_type delta_E_1 = delta_L_p/(K_L * S_L);
43204 		scalar_type delta_E_2 = delta_C_p/(K_C * S_C);
43205 		scalar_type delta_E_3 = delta_H_p/(K_H * S_H);
43206 		scalar_type delta_E_4 = R_T * delta_E_2 * delta_E_3;
43207 		scalar_type delta_E_main = sqrt(this_type::square(delta_E_1) + this_type::square(delta_E_2) + this_type::square(delta_E_3) + delta_E_4);
43208 		return delta_E_main;
43209 	}
43210 };
43211 
43212 template< typename category_left_name, typename category_right_name >
43213 struct distance< category_left_name, category_right_name, ::color::constant::distance::CMC1984_entity > {
43214 public:
43215 	typedef category_left_name category_left_type;
43216 	typedef category_right_name category_right_type;
43217 	typedef ::color::model< category_left_type > model_left_type;
43218 	typedef ::color::model< category_right_type > model_right_type;
43219 
43220 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
43221 
43222 	typedef ::color::lab<scalar_type> lab_type;
43223 	typedef ::color::constant::generic< category_left_type > constant_type;
43224 
processcolor::operation::_internal::distance43225 	static scalar_type process
43226 	(
43227 		model_left_type const& left
43228 		,model_right_type const& right
43229 		,scalar_type const& l = scalar_type(2)
43230 		,scalar_type const& c = scalar_type(1)
43231 	) {
43232 		lab_type lab_left(left);
43233 		lab_type lab_right(right);
43234 		scalar_type const& L_1 = lab_left.template get<0>();
43235 		scalar_type const& a_1 = lab_left.template get<1>();
43236 		scalar_type const& b_1 = lab_left.template get<2>();
43237 		scalar_type const& L_2 = lab_right.template get<0>();
43238 		scalar_type const& a_2 = lab_right.template get<1>();
43239 		scalar_type const& b_2 = lab_right.template get<2>();
43240 		scalar_type delta_H;
43241 		{
43242 			scalar_type C_1 = sqrt(a_1* a_1 + b_1* b_1);
43243 			scalar_type C_2 = sqrt(a_2 * a_2 + b_2 * b_2);
43244 			scalar_type delta_C = C_1 - C_2;
43245 			scalar_type delta_a = a_1 - a_2;
43246 			scalar_type delta_b = b_1 - b_2;
43247 			delta_H = delta_a*delta_a + delta_b*delta_b - delta_C*delta_C;
43248 			delta_H = sqrt(fabs(delta_H));
43249 		}
43250 		scalar_type S_H;
43251 		{
43252 			scalar_type F = sqrt(pow(a_1, 4) / (pow(a_1, 4) + 1900));
43253 			scalar_type T;
43254 			if((164 <= b_1) && (b_1 < 345)) {
43255 				T = 0.56 + fabs(0.2* cos((b_1 + 168) * constant_type::deg2rad()));
43256 			} else {
43257 				T = 0.36 + fabs(0.4* cos((b_1 + 35) * constant_type::deg2rad()));
43258 			}
43259 			S_H = F*T+1-F;
43260 		}
43261 		scalar_type S_C = (0.0638*a_1)/(1+0.0131*a_1) + 0.638;
43262 		scalar_type S_L;
43263 		if(L_1 < 16) {
43264 			S_L = 0.511;
43265 		} else {
43266 			S_L = (0.040975*L_1)/(1+0.01765*L_1);
43267 		}
43268 		scalar_type delta_E_1 = (L_1 - L_2)/(l * S_L);
43269 		scalar_type delta_E_2 = (a_1 - a_2)/(c * S_C);
43270 		scalar_type delta_E_3 = (delta_H)/(S_H);
43271 		scalar_type delta_E_main = sqrt(delta_E_1*delta_E_1 + delta_E_2*delta_E_2 + delta_E_3*delta_E_3);
43272 		return delta_E_main;
43273 	}
43274 };
43275 
43276 template< typename category_name >
43277 struct distance< category_name, category_name, ::color::constant::distance::hsl_special_entity > {
43278 public:
43279 	typedef category_name category_type;
43280 	typedef ::color::model<category_type> model_type;
43281 	typedef typename ::color::trait::scalar< category_type >::instance_type scalar_type;
43282 	typedef ::color::hsl<scalar_type> hsl_type;
43283 
processcolor::operation::_internal::distance43284 	static scalar_type process(model_type const& left, model_type const& right) {
43285 		hsl_type left_hsl(left);
43286 		hsl_type right_hsl(right);
43287 		scalar_type angle = left_hsl[0] - right_hsl[0];
43288 		if(angle < 0) {
43289 			angle = - angle;
43290 		}
43291 		if(180 < angle) {
43292 			angle = 360 - angle;
43293 		}
43294 		angle /= 360;
43295 		scalar_type lenght = angle * scalar_type(4)/scalar_type(3);
43296 		lenght *= fabs(left_hsl[1] - right_hsl[1])/100;
43297 		lenght *= fabs(left_hsl[2] - right_hsl[2])/100;
43298 		return lenght;
43299 	}
43300 };
43301 
43302 template< typename category_name >
43303 struct distance< category_name, category_name, ::color::constant::distance::rgb_special_entity > {
43304 public:
43305 	typedef category_name category_type;
43306 	typedef ::color::model<category_type> model_type;
43307 	typedef typename ::color::trait::scalar< category_type >::instance_type scalar_type;
43308 	typedef ::color::rgb<scalar_type> rgb_type;
43309 
processcolor::operation::_internal::distance43310 	static scalar_type process(model_type const& left, model_type const& right) {
43311 		rgb_type left_rgb(left);
43312 		rgb_type right_rgb(right);
43313 		rgb_type difference;
43314 		::color::operation::delta(difference, left_rgb, right_rgb);
43315 		scalar_type d = 1;
43316 		d *= fabs(std::max<scalar_type>(left_rgb[0] - std::max<scalar_type>(right_rgb[1], right_rgb[2]), left_rgb[0] - std::min<scalar_type>(right_rgb[1], right_rgb[2])));
43317 		d *= fabs(std::max<scalar_type>(left_rgb[1] - std::max<scalar_type>(right_rgb[0], right_rgb[2]), left_rgb[1] - std::min<scalar_type>(right_rgb[0], right_rgb[2])));
43318 		d *= fabs(std::max<scalar_type>(left_rgb[2] - std::max<scalar_type>(right_rgb[0], right_rgb[1]), left_rgb[2] - std::min<scalar_type>(right_rgb[0], right_rgb[1])));
43319 		return d;
43320 	}
43321 };
43322 
43323 }
43324 
43325 template
43326 <
43327 	enum ::color::constant::distance::reference_enum reference_number = ::color::constant::distance::euclid_entity
43328 ,typename category_name
43329 >
43330 typename ::color::trait::scalar< category_name >::instance_type
distance(::color::model<category_name> const & left,::color::model<category_name> const & right)43331 distance
43332 (
43333 	::color::model< category_name > const& left
43334 	,::color::model< category_name > const& right
43335 ) {
43336 	return ::color::operation::_internal::distance<category_name, category_name, reference_number>::process(left, right);
43337 }
43338 
43339 template
43340 <
43341 	enum ::color::constant::distance::reference_enum reference_number
43342 ,typename category_left_name
43343 ,typename category_right_name
43344 >
43345 typename ::color::operation::_internal::distance< category_left_name, category_right_name, reference_number >::scalar_type
distance(::color::model<category_left_name> const & left,::color::model<category_right_name> const & right)43346 distance
43347 (
43348 	::color::model< category_left_name > const& left
43349 	,::color::model< category_right_name > const& right
43350 ) {
43351 	return ::color::operation::_internal::distance< category_left_name, category_right_name, reference_number >::process(left, right);
43352 }
43353 
43354 template
43355 <
43356 	enum ::color::constant::distance::reference_enum reference_number
43357 ,typename category_left_name
43358 ,typename category_right_name
43359 >
43360 typename ::color::operation::_internal::distance< category_left_name, category_right_name, reference_number >::scalar_type
distance(::color::model<category_left_name> const & left,::color::model<category_right_name> const & right,typename::color::trait::scalar<category_left_name>::instance_type const & l,typename::color::trait::scalar<category_left_name>::instance_type const & c)43361 distance
43362 (
43363 	::color::model<category_left_name> const& left
43364 	,::color::model<category_right_name> const& right
43365 	, typename ::color::trait::scalar< category_left_name >::instance_type const& l
43366 	, typename ::color::trait::scalar< category_left_name >::instance_type const& c
43367 ) {
43368 	return ::color::operation::_internal::distance< category_left_name, category_right_name, reference_number >::process(left, right, l, c);
43369 }
43370 
43371 template
43372 <
43373 	enum ::color::constant::distance::reference_enum reference_number
43374 ,typename category_left_name
43375 ,typename category_right_name
43376 >
43377 typename ::color::operation::_internal::distance< category_left_name, category_right_name, reference_number >::scalar_type
distance(::color::model<category_left_name> const & left,::color::model<category_right_name> const & right,typename::color::trait::scalar<category_left_name>::instance_type const & K_L,typename::color::trait::scalar<category_left_name>::instance_type const & K_1,typename::color::trait::scalar<category_left_name>::instance_type const & K_2)43378 distance
43379 (
43380 	::color::model<category_left_name> const& left
43381 	,::color::model<category_right_name> const& right
43382 	, typename ::color::trait::scalar< category_left_name >::instance_type const& K_L
43383 	, typename ::color::trait::scalar< category_left_name >::instance_type const& K_1
43384 	, typename ::color::trait::scalar< category_left_name >::instance_type const& K_2
43385 ) {
43386 	return ::color::operation::_internal::distance< category_left_name, category_right_name, reference_number >::process(left, right, K_L, K_1, K_2);
43387 }
43388 
43389 }
43390 }
43391 
43392 namespace color {
43393 namespace operation {
43394 namespace _internal {
43395 
43396 namespace lab {
43397 
43398 template< typename scalar_left_name, typename scalar_right_name >
43399 struct distance {
43400 public:
43401 	typedef scalar_left_name scalar_left_type;
43402 	typedef scalar_right_name scalar_right_type;
43403 
43404 	typedef scalar_left_name scalar_type;
43405 
43406 	typedef typename ::color::lab< scalar_left_type, ::color::constant::lab::CIE_entity >::category_type category_left_type;
43407 	typedef typename ::color::lab< scalar_right_type, ::color::constant::lab::CIE_entity >::category_type category_right_type;
43408 
43409 	typedef ::color::model< category_left_type > model_left_type;
43410 	typedef ::color::model< category_right_type > model_right_type;
43411 
processcolor::operation::_internal::lab::distance43412 	static scalar_type process(model_left_type const& left, model_right_type const& right) {
43413 		typedef ::color::operation::_internal::distance< category_left_type, category_right_type,::color::constant::distance::euclid_entity> distance_type;
43414 		return distance_type::process(left, right);
43415 	}
43416 };
43417 
43418 template< typename scalar_name >
43419 struct distance< scalar_name, scalar_name > {
43420 public:
43421 	typedef scalar_name scalar_type;
43422 
43423 	typedef typename ::color::lab< scalar_type, ::color::constant::lab::CIE_entity >::category_type category_type;
43424 
43425 	typedef ::color::model< category_type > model_type;
43426 
processcolor::operation::_internal::lab::distance43427 	static scalar_type process(model_type const& left, model_type const& right) {
43428 		typedef ::color::operation::_internal::distance< category_type, category_type,::color::constant::distance::euclid_entity> distance_type;
43429 		return distance_type::process(left, right);
43430 	}
43431 };
43432 
43433 }
43434 template<> struct distance < typename ::color::lab< float, ::color::constant::lab::CIE_entity >::category_type,typename ::color::lab< float, ::color::constant::lab::CIE_entity >::category_type,::color::constant::distance::CIE76_entity > : public ::color::operation::_internal::lab::distance< float, float > {
43435 	typedef ::color::operation::_internal::lab::distance< float, float > base_type;
43436 	using base_type::process;
43437 };
43438 template<> struct distance < typename ::color::lab< float, ::color::constant::lab::CIE_entity >::category_type,typename ::color::lab< double, ::color::constant::lab::CIE_entity >::category_type,::color::constant::distance::CIE76_entity > : public ::color::operation::_internal::lab::distance< float, double > {
43439 	typedef ::color::operation::_internal::lab::distance< float, double > base_type;
43440 	using base_type::process;
43441 };
43442 template<> struct distance < typename ::color::lab< float, ::color::constant::lab::CIE_entity >::category_type,typename ::color::lab< long double, ::color::constant::lab::CIE_entity >::category_type,::color::constant::distance::CIE76_entity > : public ::color::operation::_internal::lab::distance< float, long double > {
43443 	typedef ::color::operation::_internal::lab::distance< float, long double > base_type;
43444 	using base_type::process;
43445 };
43446 
43447 template<> struct distance < typename ::color::lab< double, ::color::constant::lab::CIE_entity >::category_type,typename ::color::lab< float, ::color::constant::lab::CIE_entity >::category_type,::color::constant::distance::CIE76_entity > : public ::color::operation::_internal::lab::distance< double, float > {
43448 	typedef ::color::operation::_internal::lab::distance< double, float > base_type;
43449 	using base_type::process;
43450 };
43451 template<> struct distance < typename ::color::lab< double, ::color::constant::lab::CIE_entity >::category_type,typename ::color::lab< double, ::color::constant::lab::CIE_entity >::category_type,::color::constant::distance::CIE76_entity > : public ::color::operation::_internal::lab::distance< double, double > {
43452 	typedef ::color::operation::_internal::lab::distance< double, double > base_type;
43453 	using base_type::process;
43454 };
43455 template<> struct distance < typename ::color::lab< double, ::color::constant::lab::CIE_entity >::category_type,typename ::color::lab< long double, ::color::constant::lab::CIE_entity >::category_type,::color::constant::distance::CIE76_entity > : public ::color::operation::_internal::lab::distance< double, long double > {
43456 	typedef ::color::operation::_internal::lab::distance< double, long double > base_type;
43457 	using base_type::process;
43458 };
43459 
43460 template<> struct distance < typename ::color::lab< long double, ::color::constant::lab::CIE_entity >::category_type,typename ::color::lab< float, ::color::constant::lab::CIE_entity >::category_type,::color::constant::distance::CIE76_entity > : public ::color::operation::_internal::lab::distance< long double, float > {
43461 	typedef ::color::operation::_internal::lab::distance< long double, float > base_type;
43462 	using base_type::process;
43463 };
43464 template<> struct distance < typename ::color::lab< long double, ::color::constant::lab::CIE_entity >::category_type,typename ::color::lab< double, ::color::constant::lab::CIE_entity >::category_type,::color::constant::distance::CIE76_entity > : public ::color::operation::_internal::lab::distance< long double, double > {
43465 	typedef ::color::operation::_internal::lab::distance< long double, double > base_type;
43466 	using base_type::process;
43467 };
43468 template<> struct distance < typename ::color::lab< long double, ::color::constant::lab::CIE_entity >::category_type,typename ::color::lab< long double, ::color::constant::lab::CIE_entity >::category_type,::color::constant::distance::CIE76_entity > : public ::color::operation::_internal::lab::distance< long double, long double > {
43469 	typedef ::color::operation::_internal::lab::distance< long double, long double > base_type;
43470 	using base_type::process;
43471 };
43472 
43473 }
43474 }
43475 }
43476 
43477 namespace color {
43478 namespace _internal {
43479 
43480 template
43481 <
43482 	typename xyz_tag_name
43483 	,typename lab_tag_name
43484 	>
43485 struct convert
43486 	<
43487 	::color::category::xyz< xyz_tag_name >
43488 	,::color::category::lab< lab_tag_name, ::color::constant::lab::CIE_entity >
43489 	> {
43490 public:
43491 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
43492 	typedef ::color::category::lab< lab_tag_name, ::color::constant::lab::CIE_entity > lab_category_type, category_right_type;
43493 
43494 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
43495 
43496 	typedef ::color::category::xyz< scalar_type > xyzSCALAR_category_type;
43497 	typedef ::color::category::lab< scalar_type, ::color::constant::lab::CIE_entity > labSCALAR_category_type;
43498 
43499 	typedef ::color::model< xyz_category_type > xyz_model_type;
43500 	typedef ::color::model< lab_category_type > lab_model_type;
43501 
43502 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
43503 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
43504 
43505 	typedef typename container_left_trait_type::input_type container_left_input_type;
43506 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
43507 
43508 	typedef ::color::_internal::reformat< labSCALAR_category_type, lab_category_type > reformatLAB_type;
43509 	typedef ::color::_internal::reformat< xyz_category_type, xyzSCALAR_category_type > reformatXYZ_type;
43510 
43511 	typedef ::color::constant::xyz::illuminant::point< scalar_type, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > white_point_type;
43512 
processcolor::_internal::convert43513 	static void process
43514 	(
43515 		container_left_input_type left
43516 		,container_right_const_input_type right
43517 	) {
43518 		static const scalar_type epsilon = scalar_type(216)/scalar_type(24389);
43519 		static const scalar_type k = scalar_type(24389)/scalar_type(27);
43520 		scalar_type l = reformatLAB_type::template process< 0, 0>(container_right_trait_type::template get<0>(right));
43521 		scalar_type a = reformatLAB_type::template process< 1, 1>(container_right_trait_type::template get<1>(right));
43522 		scalar_type b = reformatLAB_type::template process< 2, 2>(container_right_trait_type::template get<2>(right));
43523 		scalar_type fy = (l +16)/116;
43524 		scalar_type fz = fy - b/200;
43525 		scalar_type fx = a/500 + fy;
43526 		scalar_type fx3 = fx * fx * fx;
43527 		scalar_type fy3 = fy * fy * fy;
43528 		scalar_type fz3 = fz * fz * fz;
43529 		scalar_type x = fx3;
43530 		scalar_type y = fy3;
43531 		scalar_type z = fz3;
43532 		if(z < epsilon) {
43533 			z = (116*fz-16)/k;
43534 		}
43535 		if(l < epsilon * k) {
43536 			y = l/k;
43537 		}
43538 		if(x < epsilon) {
43539 			x = (116*fx-16)/k;
43540 		}
43541 		x *= scalar_type(100) * white_point_type::X();
43542 		y *= scalar_type(100) * white_point_type::Y();
43543 		z *= scalar_type(100) * white_point_type::Z();
43544 		container_left_trait_type::template set<0>(left, reformatXYZ_type::template process< 0, 0 >(x));
43545 		container_left_trait_type::template set<1>(left, reformatXYZ_type::template process< 1, 1 >(y));
43546 		container_left_trait_type::template set<2>(left, reformatXYZ_type::template process< 2, 2 >(z));
43547 	}
43548 };
43549 
43550 template
43551 <
43552 	typename xyz_tag_name
43553 	,typename lab_tag_name
43554 	>
43555 struct convert
43556 	<
43557 	::color::category::xyz< xyz_tag_name >
43558 	,::color::category::lab< lab_tag_name, ::color::constant::lab::Hunter_entity >
43559 	> {
43560 public:
43561 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
43562 	typedef ::color::category::lab< lab_tag_name, ::color::constant::lab::Hunter_entity > lab_category_type, category_right_type;
43563 
43564 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
43565 
43566 	typedef ::color::category::xyz< scalar_type > xyzSCALAR_category_type;
43567 	typedef ::color::category::lab< scalar_type, ::color::constant::lab::Hunter_entity > labSCALAR_category_type;
43568 
43569 	typedef ::color::model< xyz_category_type > xyz_model_type;
43570 	typedef ::color::model< lab_category_type > lab_model_type;
43571 
43572 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
43573 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
43574 
43575 	typedef typename container_left_trait_type::input_type container_left_input_type;
43576 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
43577 
43578 	typedef ::color::_internal::reformat< labSCALAR_category_type, lab_category_type > reformatLAB_type;
43579 	typedef ::color::_internal::reformat< xyz_category_type, xyzSCALAR_category_type > reformatXYZ_type;
43580 
43581 	typedef ::color::constant::xyz::illuminant::point< scalar_type, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > white_point_type;
43582 
squrecolor::_internal::convert43583 	static scalar_type squre(scalar_type const & v) {
43584 		return v*v;
43585 	}
43586 
processcolor::_internal::convert43587 	static void process
43588 	(
43589 		container_left_input_type left
43590 		,container_right_const_input_type right
43591 	) {
43592 		static const scalar_type epsilon = scalar_type(216)/scalar_type(24389);
43593 		static const scalar_type k = scalar_type(24389)/scalar_type(27);
43594 		static scalar_type X = scalar_type(100) * white_point_type::X();
43595 		static scalar_type Y = scalar_type(100) * white_point_type::Y();
43596 		static scalar_type Z = scalar_type(100) * white_point_type::Z();
43597 		static scalar_type Ka = scalar_type(175.0 / 198.04) * (Y + X);
43598 		static scalar_type Kb = scalar_type(70.0 / 218.11) * (Y + Z);
43599 		scalar_type l = reformatLAB_type::template process< 0, 0>(container_right_trait_type::template get<0>(right));
43600 		scalar_type a = reformatLAB_type::template process< 1, 1>(container_right_trait_type::template get<1>(right));
43601 		scalar_type b = reformatLAB_type::template process< 2, 2>(container_right_trait_type::template get<2>(right));
43602 		scalar_type y = (squre(l / Y)) * scalar_type(100);
43603 		scalar_type x = ((a / Ka) * sqrt(y / Y) + (y / Y)) * X;
43604 		scalar_type z = - ((b / Kb) * sqrt(y / Y) - (y / Y)) * Z;
43605 		container_left_trait_type::template set<0>(left, reformatXYZ_type::template process< 0, 0 >(x));
43606 		container_left_trait_type::template set<1>(left, reformatXYZ_type::template process< 1, 1 >(y));
43607 		container_left_trait_type::template set<2>(left, reformatXYZ_type::template process< 2, 2 >(z));
43608 	}
43609 };
43610 
43611 }
43612 }
43613 
43614 namespace color {
43615 namespace _internal {
43616 
43617 template< typename xyz_tag_name, typename xyy_tag_name >
43618 struct convert
43619 	<
43620 	::color::category::xyz< xyz_tag_name >
43621 	,::color::category::xyy< xyy_tag_name >
43622 	> {
43623 public:
43624 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
43625 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
43626 
43627 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
43628 
43629 	typedef ::color::category::xyz< scalar_type > xyzSCALAR_category_type;
43630 	typedef ::color::category::xyy< scalar_type > xyySCALAR_category_type;
43631 
43632 	typedef ::color::model< xyz_category_type > xyz_model_type;
43633 	typedef ::color::model< xyy_category_type > xyy_model_type;
43634 
43635 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
43636 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
43637 
43638 	typedef typename container_left_trait_type::input_type container_left_input_type;
43639 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
43640 
43641 	typedef ::color::_internal::reformat< xyySCALAR_category_type, xyy_category_type > reformatXYY_type;
43642 	typedef ::color::_internal::reformat< xyz_category_type, xyzSCALAR_category_type > reformatXYZ_type;
43643 
43644 	typedef ::color::constant::xyz::illuminant::point< scalar_type, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > white_point_type;
43645 
processcolor::_internal::convert43646 	static void process
43647 	(
43648 		container_left_input_type left
43649 		,container_right_const_input_type right
43650 	) {
43651 		scalar_type small_x = reformatXYY_type::template process< 0, 0>(container_right_trait_type::template get<0>(right));
43652 		scalar_type small_y = reformatXYY_type::template process< 1, 1>(container_right_trait_type::template get<1>(right));
43653 		scalar_type big_y = reformatXYY_type::template process< 2, 2>(container_right_trait_type::template get<2>(right));
43654 		scalar_type x = 0;
43655 		scalar_type y = big_y;
43656 		scalar_type z = 0;
43657 		if(0 != small_y) {
43658 			x = small_x * big_y / small_y;
43659 			z = (1 - small_x - small_y) * big_y / small_y;
43660 		}
43661 		container_left_trait_type::template set<0>(left, reformatXYZ_type::template process< 0, 0 >(x));
43662 		container_left_trait_type::template set<1>(left, reformatXYZ_type::template process< 1, 1 >(y));
43663 		container_left_trait_type::template set<2>(left, reformatXYZ_type::template process< 2, 2 >(z));
43664 	}
43665 };
43666 
43667 }
43668 }
43669 
43670 namespace color {
43671 namespace _internal {
43672 
43673 template
43674 <
43675 	typename xyz_tag_name
43676 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
43677 	>
43678 struct convert
43679 	<
43680 	::color::category::xyz< xyz_tag_name >
43681 	,::color::category::lms< lms_tag_name, lms_reference_number >
43682 	> {
43683 public:
43684 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
43685 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
43686 
43687 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
43688 
43689 	typedef ::color::model< xyz_category_type > xyz_model_type;
43690 	typedef ::color::model< lms_category_type > lms_model_type;
43691 
43692 	typedef ::color::category::xyz< scalar_type > xyzSCALAR_category_type;
43693 	typedef ::color::category::lms< scalar_type, lms_reference_number > lmsSCALAR_category_type;
43694 
43695 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
43696 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
43697 
43698 	typedef typename container_left_trait_type::input_type container_left_input_type;
43699 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
43700 
43701 	typedef ::color::_internal::reformat< lmsSCALAR_category_type, lms_category_type > reformatLMS_type;
43702 	typedef ::color::_internal::reformat< xyz_category_type, xyzSCALAR_category_type > reformatXYZ_type;
43703 
43704 	typedef ::color::constant::lms::matrix< scalar_type, lms_reference_number > matrix_type;
43705 
43706 	typedef ::color::constant::xyz::illuminant::point< scalar_type, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > white_point_type;
43707 
processcolor::_internal::convert43708 	static void process
43709 	(
43710 		container_left_input_type left
43711 		,container_right_const_input_type right
43712 	) {
43713 		scalar_type l = reformatLMS_type::template process<0, 0>(container_right_trait_type::template get<0>(right));
43714 		scalar_type m = reformatLMS_type::template process<1, 1>(container_right_trait_type::template get<1>(right));
43715 		scalar_type s = reformatLMS_type::template process<2, 2>(container_right_trait_type::template get<2>(right));
43716 		scalar_type x = matrix_type::i11() * l + matrix_type::i12() * m + matrix_type::i13() * s;
43717 		scalar_type y = matrix_type::i21() * l + matrix_type::i22() * m + matrix_type::i23() * s;
43718 		scalar_type z = matrix_type::i31() * l + matrix_type::i32() * m + matrix_type::i33() * s;
43719 		container_left_trait_type::template set<0>(left, reformatXYZ_type::template process< 0, 0 >(x));
43720 		container_left_trait_type::template set<1>(left, reformatXYZ_type::template process< 1, 1 >(y));
43721 		container_left_trait_type::template set<2>(left, reformatXYZ_type::template process< 2, 2 >(z));
43722 	}
43723 
43724 };
43725 
43726 }
43727 }
43728 
43729 namespace color {
43730 namespace _internal {
43731 
43732 template< typename xyz_tag_name, typename luv_tag_name >
43733 struct convert
43734 	<
43735 	::color::category::xyz< xyz_tag_name >
43736 	,::color::category::luv< luv_tag_name >
43737 	> {
43738 public:
43739 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
43740 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
43741 
43742 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
43743 
43744 	typedef ::color::category::xyz< scalar_type > xyzSCALAR_category_type;
43745 	typedef ::color::category::luv< scalar_type > luvSCALAR_category_type;
43746 
43747 	typedef ::color::model< xyz_category_type > xyz_model_type;
43748 	typedef ::color::model< luv_category_type > luv_model_type;
43749 
43750 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
43751 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
43752 
43753 	typedef typename container_left_trait_type::input_type container_left_input_type;
43754 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
43755 
43756 	typedef ::color::_internal::reformat< luvSCALAR_category_type, luv_category_type > reformatLUV_type;
43757 	typedef ::color::_internal::reformat< xyz_category_type, xyzSCALAR_category_type > reformatXYZ_type;
43758 
43759 	typedef ::color::constant::xyz::illuminant::point< scalar_type, ::color::constant::xyz::illuminant::D65_entity, ::color::constant::xyz::illuminant::two_entity > white_point_type;
43760 
processcolor::_internal::convert43761 	static void process
43762 	(
43763 		container_left_input_type left
43764 		,container_right_const_input_type right
43765 	) {
43766 		static const scalar_type epsilon = scalar_type(216)/scalar_type(24389);
43767 		static const scalar_type k = scalar_type(24389)/scalar_type(27);
43768 		static scalar_type u0 = scalar_type(4)* white_point_type::X()/(white_point_type::X() + scalar_type(15)*white_point_type::Y() + scalar_type(3)*white_point_type::Z());
43769 		static scalar_type v0 = scalar_type(9)* white_point_type::Y()/(white_point_type::X() + scalar_type(15)*white_point_type::Y() + scalar_type(3)*white_point_type::Z());
43770 		scalar_type l = reformatLUV_type::template process< 0, 0>(container_right_trait_type::template get<0>(right));
43771 		scalar_type u = reformatLUV_type::template process< 1, 1>(container_right_trait_type::template get<1>(right));
43772 		scalar_type v = reformatLUV_type::template process< 2, 2>(container_right_trait_type::template get<2>(right));
43773 		scalar_type y;
43774 		if(k * epsilon < l) {
43775 			y = (l+scalar_type(16))/scalar_type(116);
43776 			y *= y*y;
43777 		} else {
43778 			y = l/k;
43779 		}
43780 		y *= white_point_type::Y()* scalar_type(100);
43781 		scalar_type a = (scalar_type(52)*l/(u+13*l*u0) - scalar_type(1))/scalar_type(3);
43782 		scalar_type b = -scalar_type(5)*y;
43783 		scalar_type c = -scalar_type(1)/scalar_type(3);
43784 		scalar_type d = y*(scalar_type(39)*l/(v+scalar_type(13)*l*v0) - scalar_type(5));
43785 		scalar_type x = (d-b)/(a-c);
43786 		scalar_type z = a*x+b;
43787 		container_left_trait_type::template set<0>(left, reformatXYZ_type::template process< 0, 0 >(x));
43788 		container_left_trait_type::template set<1>(left, reformatXYZ_type::template process< 1, 1 >(y));
43789 		container_left_trait_type::template set<2>(left, reformatXYZ_type::template process< 2, 2 >(z));
43790 	}
43791 };
43792 
43793 }
43794 }
43795 
43796 namespace color {
43797 namespace _internal {
43798 
43799 template
43800 <
43801 	typename xyz_tag_name
43802 	,typename LabCH_tag_name
43803 	>
43804 struct convert
43805 	<
43806 	::color::category::xyz< xyz_tag_name >
43807 	,::color::category::LabCH< LabCH_tag_name >
43808 	> {
43809 public:
43810 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
43811 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
43812 
43813 	typedef typename ::color::trait::scalar< xyz_category_type >::instance_type scalar_type;
43814 
43815 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
43816 	typedef ::color::model< xyz_category_type > xyz_model_type;
43817 
43818 	typedef ::color::lab< scalar_type > lab_model_type;
43819 
43820 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
43821 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
43822 
43823 	typedef typename container_left_trait_type::input_type container_left_input_type;
43824 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
43825 
processcolor::_internal::convert43826 	static void process
43827 	(
43828 		container_left_input_type left
43829 		,container_right_const_input_type right
43830 	) {
43831 		left = xyz_model_type(lab_model_type(LabCH_model_type(right))).container();
43832 	}
43833 };
43834 
43835 }
43836 }
43837 
43838 namespace color {
43839 namespace _internal {
43840 
43841 template
43842 <
43843 	typename xyz_tag_name
43844 	,typename LuvCH_tag_name
43845 	>
43846 struct convert
43847 	<
43848 	::color::category::xyz< xyz_tag_name >
43849 	,::color::category::LuvCH< LuvCH_tag_name >
43850 	> {
43851 public:
43852 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_left_type;
43853 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
43854 
43855 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
43856 
43857 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
43858 	typedef ::color::model< xyz_category_type > xyz_model_type;
43859 
43860 	typedef ::color::luv< scalar_type > luv_model_type;
43861 
43862 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
43863 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
43864 
43865 	typedef typename container_left_trait_type::input_type container_left_input_type;
43866 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
43867 
processcolor::_internal::convert43868 	static void process
43869 	(
43870 		container_left_input_type left
43871 		,container_right_const_input_type right
43872 	) {
43873 		left = xyz_model_type(luv_model_type(LuvCH_model_type(right))).container();
43874 	}
43875 };
43876 
43877 }
43878 }
43879 
43880 namespace color {
43881 namespace _internal {
43882 
43883 template
43884 <
43885 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
43886 	,typename xyz_tag_name
43887 	>
43888 struct convert
43889 	<
43890 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
43891 	,::color::category::xyz< xyz_tag_name >
43892 	> {
43893 public:
43894 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_left_type;
43895 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
43896 
43897 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
43898 
43899 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
43900 	typedef ::color::model< xyz_category_type > xyz_model_type;
43901 
43902 	typedef ::color::rgb< scalar_type > rgb_model_type;
43903 
43904 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
43905 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
43906 
43907 	typedef typename container_left_trait_type::input_type container_left_input_type;
43908 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
43909 
processcolor::_internal::convert43910 	static void process
43911 	(
43912 		container_left_input_type left
43913 		,container_right_const_input_type right
43914 	) {
43915 		left = YPbPr_model_type(rgb_model_type(xyz_model_type(right))).container();
43916 	}
43917 };
43918 
43919 }
43920 }
43921 
43922 namespace color {
43923 namespace _internal {
43924 
43925 template
43926 <
43927 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
43928 	,typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
43929 	>
43930 struct convert
43931 	<
43932 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
43933 	,::color::category::lab< lab_tag_name, lab_reference_number >
43934 	> {
43935 public:
43936 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_left_type;
43937 	typedef ::color::category::lab< lab_tag_name, lab_reference_number > lab_category_type, category_right_type;
43938 
43939 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
43940 
43941 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
43942 	typedef ::color::model< lab_category_type > lab_model_type;
43943 
43944 	typedef ::color::rgb< scalar_type > rgb_model_type;
43945 	typedef ::color::xyz< scalar_type > xyz_model_type;
43946 
43947 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
43948 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
43949 
43950 	typedef typename container_left_trait_type::input_type container_left_input_type;
43951 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
43952 
processcolor::_internal::convert43953 	static void process
43954 	(
43955 		container_left_input_type left
43956 		,container_right_const_input_type right
43957 	) {
43958 		left = YPbPr_model_type(rgb_model_type(xyz_model_type(lab_model_type(right)))).container();
43959 	}
43960 };
43961 
43962 }
43963 }
43964 
43965 namespace color {
43966 namespace _internal {
43967 
43968 template
43969 <
43970 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
43971 	,typename xyy_tag_name
43972 	>
43973 struct convert
43974 	<
43975 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
43976 	,::color::category::xyy< xyy_tag_name >
43977 	> {
43978 public:
43979 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_left_type;
43980 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
43981 
43982 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
43983 
43984 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
43985 	typedef ::color::model< xyy_category_type > xyy_model_type;
43986 
43987 	typedef ::color::rgb< scalar_type > rgb_model_type;
43988 	typedef ::color::xyz< scalar_type > xyz_model_type;
43989 
43990 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
43991 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
43992 
43993 	typedef typename container_left_trait_type::input_type container_left_input_type;
43994 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
43995 
processcolor::_internal::convert43996 	static void process
43997 	(
43998 		container_left_input_type left
43999 		,container_right_const_input_type right
44000 	) {
44001 		left = YPbPr_model_type(rgb_model_type(xyz_model_type(xyy_model_type(right)))).container();
44002 	}
44003 };
44004 
44005 }
44006 }
44007 
44008 namespace color {
44009 namespace _internal {
44010 
44011 template
44012 <
44013 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
44014 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
44015 	>
44016 struct convert
44017 	<
44018 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
44019 	,::color::category::lms< lms_tag_name, lms_reference_number >
44020 	> {
44021 public:
44022 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_left_type;
44023 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
44024 
44025 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
44026 
44027 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
44028 	typedef ::color::model< lms_category_type > lms_model_type;
44029 
44030 	typedef ::color::rgb< scalar_type > rgb_model_type;
44031 	typedef ::color::xyz< scalar_type > xyz_model_type;
44032 
44033 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44034 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44035 
44036 	typedef typename container_left_trait_type::input_type container_left_input_type;
44037 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44038 
processcolor::_internal::convert44039 	static void process
44040 	(
44041 		container_left_input_type left
44042 		,container_right_const_input_type right
44043 	) {
44044 		left = YPbPr_model_type(rgb_model_type(xyz_model_type(lms_model_type(right)))).container();
44045 	}
44046 };
44047 
44048 }
44049 }
44050 
44051 namespace color {
44052 namespace _internal {
44053 
44054 template
44055 <
44056 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
44057 	,typename luv_tag_name
44058 	>
44059 struct convert
44060 	<
44061 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
44062 	,::color::category::luv< luv_tag_name >
44063 	> {
44064 public:
44065 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_left_type;
44066 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
44067 
44068 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
44069 
44070 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
44071 	typedef ::color::model< luv_category_type > luv_model_type;
44072 
44073 	typedef ::color::rgb< scalar_type > rgb_model_type;
44074 	typedef ::color::xyz< scalar_type > xyz_model_type;
44075 
44076 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44077 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44078 
44079 	typedef typename container_left_trait_type::input_type container_left_input_type;
44080 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44081 
processcolor::_internal::convert44082 	static void process
44083 	(
44084 		container_left_input_type left
44085 		,container_right_const_input_type right
44086 	) {
44087 		left = YPbPr_model_type(rgb_model_type(xyz_model_type(luv_model_type(right)))).container();
44088 	}
44089 };
44090 
44091 }
44092 }
44093 
44094 namespace color {
44095 namespace _internal {
44096 
44097 template
44098 <
44099 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
44100 	,typename LabCH_tag_name
44101 	>
44102 struct convert
44103 	<
44104 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
44105 	,::color::category::LabCH< LabCH_tag_name >
44106 	> {
44107 public:
44108 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_left_type;
44109 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
44110 
44111 	typedef typename ::color::trait::scalar< YPbPr_category_type >::instance_type scalar_type;
44112 
44113 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
44114 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
44115 
44116 	typedef ::color::lab< scalar_type > lab_model_type;
44117 	typedef ::color::xyz< scalar_type > xyz_model_type;
44118 	typedef ::color::rgb< scalar_type > rgb_model_type;
44119 
44120 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44121 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44122 
44123 	typedef typename container_left_trait_type::input_type container_left_input_type;
44124 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44125 
processcolor::_internal::convert44126 	static void process
44127 	(
44128 		container_left_input_type left
44129 		,container_right_const_input_type right
44130 	) {
44131 		left = YPbPr_model_type(rgb_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right))))).container();
44132 	}
44133 };
44134 
44135 }
44136 }
44137 
44138 namespace color {
44139 namespace _internal {
44140 
44141 template
44142 <
44143 	typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
44144 	,typename LuvCH_tag_name
44145 	>
44146 struct convert
44147 	<
44148 	::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
44149 	,::color::category::LuvCH< LuvCH_tag_name >
44150 	> {
44151 public:
44152 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_left_type;
44153 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
44154 
44155 	typedef typename ::color::trait::scalar< YPbPr_category_type >::instance_type scalar_type;
44156 
44157 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
44158 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
44159 
44160 	typedef ::color::luv< scalar_type > luv_model_type;
44161 	typedef ::color::xyz< scalar_type > xyz_model_type;
44162 	typedef ::color::rgb< scalar_type > rgb_model_type;
44163 
44164 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44165 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44166 
44167 	typedef typename container_left_trait_type::input_type container_left_input_type;
44168 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44169 
processcolor::_internal::convert44170 	static void process
44171 	(
44172 		container_left_input_type left
44173 		,container_right_const_input_type right
44174 	) {
44175 		left = YPbPr_model_type(rgb_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right))))).container();
44176 	}
44177 };
44178 
44179 }
44180 }
44181 
44182 namespace color {
44183 namespace _internal {
44184 
44185 template
44186 <
44187 	typename YDbDr_tag_name
44188 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
44189 	>
44190 struct convert
44191 	<
44192 	::color::category::YDbDr< YDbDr_tag_name >
44193 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
44194 	> {
44195 public:
44196 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
44197 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_right_type;
44198 
44199 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
44200 
44201 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
44202 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
44203 
44204 	typedef ::color::rgb< scalar_type > rgb_model_type;
44205 
44206 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44207 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44208 
44209 	typedef typename container_left_trait_type::input_type container_left_input_type;
44210 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44211 
processcolor::_internal::convert44212 	static void process
44213 	(
44214 		container_left_input_type left
44215 		,container_right_const_input_type right
44216 	) {
44217 		left = YDbDr_model_type(rgb_model_type(YPbPr_model_type(right))).container();
44218 	}
44219 };
44220 
44221 }
44222 }
44223 
44224 namespace color {
44225 namespace _internal {
44226 
44227 template< typename YDbDr_tag_name, typename xyz_tag_name >
44228 struct convert
44229 	<
44230 	::color::category::YDbDr< YDbDr_tag_name >
44231 	,::color::category::xyz< xyz_tag_name >
44232 	> {
44233 public:
44234 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
44235 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
44236 
44237 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
44238 
44239 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
44240 	typedef ::color::model< xyz_category_type > xyz_model_type;
44241 
44242 	typedef ::color::rgb< scalar_type > rgb_model_type;
44243 
44244 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44245 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44246 
44247 	typedef typename container_left_trait_type::input_type container_left_input_type;
44248 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44249 
processcolor::_internal::convert44250 	static void process
44251 	(
44252 		container_left_input_type left
44253 		,container_right_const_input_type right
44254 	) {
44255 		left = YDbDr_model_type(rgb_model_type(xyz_model_type(right))).container();
44256 	}
44257 };
44258 
44259 }
44260 }
44261 
44262 namespace color {
44263 namespace _internal {
44264 
44265 template
44266 <
44267 	typename YDbDr_tag_name
44268 	,typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
44269 	>
44270 struct convert
44271 	<
44272 	::color::category::YDbDr< YDbDr_tag_name >
44273 	,::color::category::lab< lab_tag_name, reference_number >
44274 	> {
44275 public:
44276 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
44277 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_right_type;
44278 
44279 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
44280 
44281 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
44282 	typedef ::color::model< lab_category_type > lab_model_type;
44283 
44284 	typedef ::color::rgb< scalar_type > rgb_model_type;
44285 	typedef ::color::xyz< scalar_type > xyz_model_type;
44286 
44287 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44288 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44289 
44290 	typedef typename container_left_trait_type::input_type container_left_input_type;
44291 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44292 
processcolor::_internal::convert44293 	static void process
44294 	(
44295 		container_left_input_type left
44296 		,container_right_const_input_type right
44297 	) {
44298 		left = YDbDr_model_type(rgb_model_type(xyz_model_type(lab_model_type(right)))).container();
44299 	}
44300 };
44301 
44302 }
44303 }
44304 
44305 namespace color {
44306 namespace _internal {
44307 
44308 template
44309 <
44310 	typename YDbDr_tag_name
44311 	,typename xyy_tag_name
44312 	>
44313 struct convert
44314 	<
44315 	::color::category::YDbDr< YDbDr_tag_name >
44316 	,::color::category::xyy< xyy_tag_name >
44317 	> {
44318 public:
44319 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
44320 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
44321 
44322 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
44323 
44324 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
44325 	typedef ::color::model< xyy_category_type > xyy_model_type;
44326 
44327 	typedef ::color::rgb< scalar_type > rgb_model_type;
44328 	typedef ::color::xyz< scalar_type > xyz_model_type;
44329 
44330 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44331 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44332 
44333 	typedef typename container_left_trait_type::input_type container_left_input_type;
44334 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44335 
processcolor::_internal::convert44336 	static void process
44337 	(
44338 		container_left_input_type left
44339 		,container_right_const_input_type right
44340 	) {
44341 		left = YDbDr_model_type(rgb_model_type(xyz_model_type(xyy_model_type(right)))).container();
44342 	}
44343 };
44344 
44345 }
44346 }
44347 
44348 namespace color {
44349 namespace _internal {
44350 
44351 template
44352 <
44353 	typename YDbDr_tag_name
44354 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
44355 	>
44356 struct convert
44357 	<
44358 	::color::category::YDbDr< YDbDr_tag_name >
44359 	,::color::category::lms< lms_tag_name, lms_reference_number >
44360 	> {
44361 public:
44362 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
44363 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
44364 
44365 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
44366 
44367 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
44368 	typedef ::color::model< lms_category_type > lms_model_type;
44369 
44370 	typedef ::color::rgb< scalar_type > rgb_model_type;
44371 	typedef ::color::xyz< scalar_type > xyz_model_type;
44372 
44373 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44374 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44375 
44376 	typedef typename container_left_trait_type::input_type container_left_input_type;
44377 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44378 
processcolor::_internal::convert44379 	static void process
44380 	(
44381 		container_left_input_type left
44382 		,container_right_const_input_type right
44383 	) {
44384 		left = YDbDr_model_type(rgb_model_type(xyz_model_type(lms_model_type(right)))).container();
44385 	}
44386 };
44387 
44388 }
44389 }
44390 
44391 namespace color {
44392 namespace _internal {
44393 
44394 template
44395 <
44396 	typename YDbDr_tag_name
44397 	,typename luv_tag_name
44398 	>
44399 struct convert
44400 	<
44401 	::color::category::YDbDr< YDbDr_tag_name >
44402 	,::color::category::luv< luv_tag_name >
44403 	> {
44404 public:
44405 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
44406 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
44407 
44408 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
44409 
44410 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
44411 	typedef ::color::model< luv_category_type > luv_model_type;
44412 
44413 	typedef ::color::rgb< scalar_type > rgb_model_type;
44414 	typedef ::color::xyz< scalar_type > xyz_model_type;
44415 
44416 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44417 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44418 
44419 	typedef typename container_left_trait_type::input_type container_left_input_type;
44420 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44421 
processcolor::_internal::convert44422 	static void process
44423 	(
44424 		container_left_input_type left
44425 		,container_right_const_input_type right
44426 	) {
44427 		left = YDbDr_model_type(rgb_model_type(xyz_model_type(luv_model_type(right)))).container();
44428 	}
44429 };
44430 
44431 }
44432 }
44433 
44434 namespace color {
44435 namespace _internal {
44436 
44437 template
44438 <
44439 	typename YDbDr_tag_name
44440 	,typename LabCH_tag_name
44441 	>
44442 struct convert
44443 	<
44444 	::color::category::YDbDr< YDbDr_tag_name >
44445 	,::color::category::LabCH< LabCH_tag_name >
44446 	> {
44447 public:
44448 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
44449 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
44450 
44451 	typedef typename ::color::trait::scalar< YDbDr_category_type >::instance_type scalar_type;
44452 
44453 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
44454 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
44455 
44456 	typedef ::color::lab< scalar_type > lab_model_type;
44457 	typedef ::color::xyz< scalar_type > xyz_model_type;
44458 	typedef ::color::rgb< scalar_type > rgb_model_type;
44459 
44460 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44461 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44462 
44463 	typedef typename container_left_trait_type::input_type container_left_input_type;
44464 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44465 
processcolor::_internal::convert44466 	static void process
44467 	(
44468 		container_left_input_type left
44469 		,container_right_const_input_type right
44470 	) {
44471 		left = YDbDr_model_type(rgb_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right))))).container();
44472 	}
44473 };
44474 
44475 }
44476 }
44477 
44478 namespace color {
44479 namespace _internal {
44480 
44481 template
44482 <
44483 	typename YDbDr_tag_name
44484 	,typename LuvCH_tag_name
44485 	>
44486 struct convert
44487 	<
44488 	::color::category::YDbDr< YDbDr_tag_name >
44489 	,::color::category::LuvCH< LuvCH_tag_name >
44490 	> {
44491 public:
44492 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_left_type;
44493 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
44494 
44495 	typedef typename ::color::trait::scalar< YDbDr_category_type >::instance_type scalar_type;
44496 
44497 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
44498 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
44499 
44500 	typedef ::color::luv< scalar_type > luv_model_type;
44501 	typedef ::color::xyz< scalar_type > xyz_model_type;
44502 	typedef ::color::rgb< scalar_type > rgb_model_type;
44503 
44504 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44505 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44506 
44507 	typedef typename container_left_trait_type::input_type container_left_input_type;
44508 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44509 
processcolor::_internal::convert44510 	static void process
44511 	(
44512 		container_left_input_type left
44513 		,container_right_const_input_type right
44514 	) {
44515 		left = YDbDr_model_type(rgb_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right))))).container();
44516 	}
44517 };
44518 
44519 }
44520 }
44521 namespace color {
44522 namespace _internal {
44523 
44524 template
44525 <
44526 	typename YCgCo_tag_name
44527 	,typename YDbDr_tag_name
44528 	>
44529 struct convert
44530 	<
44531 	::color::category::YCgCo< YCgCo_tag_name >
44532 	,::color::category::YDbDr< YDbDr_tag_name >
44533 	> {
44534 public:
44535 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
44536 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
44537 
44538 	typedef typename ::color::trait::scalar< YCgCo_category_type >::instance_type scalar_type;
44539 
44540 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
44541 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
44542 
44543 	typedef ::color::rgb< scalar_type > rgb_model_type;
44544 
44545 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44546 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44547 
44548 	typedef typename container_left_trait_type::input_type container_left_input_type;
44549 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44550 
processcolor::_internal::convert44551 	static void process
44552 	(
44553 		container_left_input_type left
44554 		,container_right_const_input_type right
44555 	) {
44556 		left = YCgCo_model_type(rgb_model_type(YDbDr_model_type(right))).container();
44557 	}
44558 };
44559 
44560 }
44561 }
44562 namespace color {
44563 namespace _internal {
44564 
44565 template
44566 <
44567 	typename YCgCo_tag_name
44568 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
44569 	>
44570 struct convert
44571 	<
44572 	::color::category::YCgCo< YCgCo_tag_name >
44573 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
44574 	> {
44575 public:
44576 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
44577 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_right_type;
44578 
44579 	typedef typename ::color::trait::scalar< YCgCo_category_type >::instance_type scalar_type;
44580 
44581 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
44582 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
44583 
44584 	typedef ::color::rgb< scalar_type > rgb_model_type;
44585 
44586 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44587 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44588 
44589 	typedef typename container_left_trait_type::input_type container_left_input_type;
44590 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44591 
processcolor::_internal::convert44592 	static void process
44593 	(
44594 		container_left_input_type left
44595 		,container_right_const_input_type right
44596 	) {
44597 		left = YCgCo_model_type(rgb_model_type(YPbPr_model_type(right))).container();
44598 	}
44599 };
44600 
44601 }
44602 }
44603 
44604 namespace color {
44605 namespace _internal {
44606 
44607 template
44608 <
44609 	typename YCgCo_tag_name
44610 	,typename xyz_tag_name
44611 	>
44612 struct convert
44613 	<
44614 	::color::category::YCgCo< YCgCo_tag_name >
44615 	,::color::category::xyz< xyz_tag_name >
44616 	> {
44617 public:
44618 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
44619 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
44620 
44621 	typedef typename ::color::trait::scalar< YCgCo_category_type >::instance_type scalar_type;
44622 
44623 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
44624 	typedef ::color::model< xyz_category_type > xyz_model_type;
44625 
44626 	typedef ::color::rgb< scalar_type > rgb_model_type;
44627 
44628 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44629 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44630 
44631 	typedef typename container_left_trait_type::input_type container_left_input_type;
44632 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44633 
processcolor::_internal::convert44634 	static void process
44635 	(
44636 		container_left_input_type left
44637 		,container_right_const_input_type right
44638 	) {
44639 		left = YCgCo_model_type(rgb_model_type(xyz_model_type(right))).container();
44640 	}
44641 };
44642 
44643 }
44644 }
44645 
44646 namespace color {
44647 namespace _internal {
44648 
44649 template
44650 <
44651 	typename YCgCo_tag_name
44652 	,typename lab_tag_name, ::color::constant::lab::reference_enum reference_number
44653 	>
44654 struct convert
44655 	<
44656 	::color::category::YCgCo< YCgCo_tag_name >
44657 	,::color::category::lab< lab_tag_name, reference_number >
44658 	> {
44659 public:
44660 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
44661 	typedef ::color::category::lab< lab_tag_name, reference_number > lab_category_type, category_right_type;
44662 
44663 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
44664 
44665 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
44666 	typedef ::color::model< lab_category_type > lab_model_type;
44667 
44668 	typedef ::color::rgb< scalar_type > rgb_model_type;
44669 	typedef ::color::xyz< scalar_type > xyz_model_type;
44670 
44671 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44672 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44673 
44674 	typedef typename container_left_trait_type::input_type container_left_input_type;
44675 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44676 
processcolor::_internal::convert44677 	static void process
44678 	(
44679 		container_left_input_type left
44680 		,container_right_const_input_type right
44681 	) {
44682 		left = YCgCo_model_type(rgb_model_type(xyz_model_type(lab_model_type(right)))).container();
44683 	}
44684 };
44685 
44686 }
44687 }
44688 
44689 namespace color {
44690 namespace _internal {
44691 
44692 template
44693 <
44694 	typename YCgCo_tag_name
44695 	,typename xyy_tag_name
44696 	>
44697 struct convert
44698 	<
44699 	::color::category::YCgCo< YCgCo_tag_name >
44700 	,::color::category::xyy< xyy_tag_name >
44701 	> {
44702 public:
44703 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
44704 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
44705 
44706 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
44707 
44708 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
44709 	typedef ::color::model< xyy_category_type > xyy_model_type;
44710 
44711 	typedef ::color::rgb< scalar_type > rgb_model_type;
44712 	typedef ::color::xyz< scalar_type > xyz_model_type;
44713 
44714 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44715 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44716 
44717 	typedef typename container_left_trait_type::input_type container_left_input_type;
44718 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44719 
processcolor::_internal::convert44720 	static void process
44721 	(
44722 		container_left_input_type left
44723 		,container_right_const_input_type right
44724 	) {
44725 		left = YCgCo_model_type(rgb_model_type(xyz_model_type(xyy_model_type(right)))).container();
44726 	}
44727 };
44728 
44729 }
44730 }
44731 
44732 namespace color {
44733 namespace _internal {
44734 
44735 template
44736 <
44737 	typename YCgCo_tag_name
44738 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
44739 	>
44740 struct convert
44741 	<
44742 	::color::category::YCgCo< YCgCo_tag_name >
44743 	,::color::category::lms< lms_tag_name, lms_reference_number >
44744 	> {
44745 public:
44746 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
44747 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
44748 
44749 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
44750 
44751 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
44752 	typedef ::color::model< lms_category_type > lms_model_type;
44753 
44754 	typedef ::color::rgb< scalar_type > rgb_model_type;
44755 	typedef ::color::xyz< scalar_type > xyz_model_type;
44756 
44757 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44758 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44759 
44760 	typedef typename container_left_trait_type::input_type container_left_input_type;
44761 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44762 
processcolor::_internal::convert44763 	static void process
44764 	(
44765 		container_left_input_type left
44766 		,container_right_const_input_type right
44767 	) {
44768 		left = YCgCo_model_type(rgb_model_type(xyz_model_type(lms_model_type(right)))).container();
44769 	}
44770 };
44771 
44772 }
44773 }
44774 
44775 namespace color {
44776 namespace _internal {
44777 
44778 template
44779 <
44780 	typename YCgCo_tag_name
44781 	,typename luv_tag_name
44782 	>
44783 struct convert
44784 	<
44785 	::color::category::YCgCo< YCgCo_tag_name >
44786 	,::color::category::luv< luv_tag_name >
44787 	> {
44788 public:
44789 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
44790 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
44791 
44792 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
44793 
44794 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
44795 	typedef ::color::model< luv_category_type > luv_model_type;
44796 
44797 	typedef ::color::rgb< scalar_type > rgb_model_type;
44798 	typedef ::color::xyz< scalar_type > xyz_model_type;
44799 
44800 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44801 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44802 
44803 	typedef typename container_left_trait_type::input_type container_left_input_type;
44804 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44805 
processcolor::_internal::convert44806 	static void process
44807 	(
44808 		container_left_input_type left
44809 		,container_right_const_input_type right
44810 	) {
44811 		left = YCgCo_model_type(rgb_model_type(xyz_model_type(luv_model_type(right)))).container();
44812 	}
44813 };
44814 
44815 }
44816 }
44817 
44818 namespace color {
44819 namespace _internal {
44820 
44821 template
44822 <
44823 	typename YCgCo_tag_name
44824 	,typename LabCH_tag_name
44825 	>
44826 struct convert
44827 	<
44828 	::color::category::YCgCo< YCgCo_tag_name >
44829 	,::color::category::LabCH< LabCH_tag_name >
44830 	> {
44831 public:
44832 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
44833 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
44834 
44835 	typedef typename ::color::trait::scalar< YCgCo_category_type >::instance_type scalar_type;
44836 
44837 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
44838 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
44839 
44840 	typedef ::color::lab< scalar_type > lab_model_type;
44841 	typedef ::color::xyz< scalar_type > xyz_model_type;
44842 	typedef ::color::rgb< scalar_type > rgb_model_type;
44843 
44844 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44845 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44846 
44847 	typedef typename container_left_trait_type::input_type container_left_input_type;
44848 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44849 
processcolor::_internal::convert44850 	static void process
44851 	(
44852 		container_left_input_type left
44853 		,container_right_const_input_type right
44854 	) {
44855 		left = YCgCo_model_type(rgb_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right))))).container();
44856 	}
44857 };
44858 
44859 }
44860 }
44861 
44862 namespace color {
44863 namespace _internal {
44864 
44865 template
44866 <
44867 	typename YCgCo_tag_name
44868 	,typename LuvCH_tag_name
44869 	>
44870 struct convert
44871 	<
44872 	::color::category::YCgCo< YCgCo_tag_name >
44873 	,::color::category::LuvCH< LuvCH_tag_name >
44874 	> {
44875 public:
44876 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type;
44877 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
44878 
44879 	typedef typename ::color::trait::scalar< YCgCo_category_type >::instance_type scalar_type;
44880 
44881 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
44882 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
44883 
44884 	typedef ::color::luv< scalar_type > luv_model_type;
44885 	typedef ::color::xyz< scalar_type > xyz_model_type;
44886 	typedef ::color::rgb< scalar_type > rgb_model_type;
44887 
44888 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44889 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44890 
44891 	typedef typename container_left_trait_type::input_type container_left_input_type;
44892 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44893 
processcolor::_internal::convert44894 	static void process
44895 	(
44896 		container_left_input_type left
44897 		,container_right_const_input_type right
44898 	) {
44899 		left = YCgCo_model_type(rgb_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right))))).container();
44900 	}
44901 };
44902 
44903 }
44904 }
44905 
44906 namespace color {
44907 namespace _internal {
44908 
44909 template
44910 <
44911 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
44912 	,typename YCgCo_tag_name
44913 	>
44914 struct convert
44915 	<
44916 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
44917 	,::color::category::YCgCo< YCgCo_tag_name >
44918 	> {
44919 public:
44920 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
44921 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
44922 
44923 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
44924 
44925 	typedef ::color::model< yuv_category_type > yuv_model_type;
44926 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
44927 
44928 	typedef ::color::rgb< scalar_type > rgb_model_type;
44929 
44930 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44931 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44932 
44933 	typedef typename container_left_trait_type::input_type container_left_input_type;
44934 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44935 
processcolor::_internal::convert44936 	static void process
44937 	(
44938 		container_left_input_type left
44939 		,container_right_const_input_type right
44940 	) {
44941 		left = yuv_model_type(rgb_model_type(YCgCo_model_type(right))).container();
44942 	}
44943 };
44944 
44945 }
44946 }
44947 
44948 namespace color {
44949 namespace _internal {
44950 
44951 template
44952 <
44953 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
44954 	,typename YDbDr_tag_name
44955 	>
44956 struct convert
44957 	<
44958 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
44959 	,::color::category::YDbDr< YDbDr_tag_name >
44960 	> {
44961 public:
44962 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
44963 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
44964 
44965 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
44966 
44967 	typedef ::color::model< yuv_category_type > yuv_model_type;
44968 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
44969 
44970 	typedef ::color::rgb< scalar_type > rgb_model_type;
44971 
44972 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
44973 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
44974 
44975 	typedef typename container_left_trait_type::input_type container_left_input_type;
44976 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
44977 
processcolor::_internal::convert44978 	static void process
44979 	(
44980 		container_left_input_type left
44981 		,container_right_const_input_type right
44982 	) {
44983 		left = yuv_model_type(rgb_model_type(YDbDr_model_type(right))).container();
44984 	}
44985 };
44986 
44987 }
44988 }
44989 
44990 namespace color {
44991 namespace _internal {
44992 
44993 template
44994 <
44995 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
44996 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
44997 	>
44998 struct convert
44999 	<
45000 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
45001 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
45002 	> {
45003 public:
45004 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
45005 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_right_type;
45006 
45007 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
45008 
45009 	typedef ::color::model< category_left_type > yuv_model_type, left_model_type;
45010 	typedef ::color::model< category_right_type > YPbPr_model_type, right_model_type;
45011 
45012 	typedef ::color::rgb< scalar_type > rgb_model_type;
45013 
45014 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45015 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45016 
45017 	typedef typename container_left_trait_type::input_type container_left_input_type;
45018 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45019 
processcolor::_internal::convert45020 	static void process
45021 	(
45022 		container_left_input_type left
45023 		,container_right_const_input_type right
45024 	) {
45025 		left = yuv_model_type(rgb_model_type(YPbPr_model_type(right))).container();
45026 	}
45027 };
45028 
45029 }
45030 }
45031 
45032 namespace color {
45033 namespace _internal {
45034 
45035 template
45036 <
45037 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
45038 	,typename xyz_tag_name
45039 	>
45040 struct convert
45041 	<
45042 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
45043 	,::color::category::xyz< xyz_tag_name >
45044 	> {
45045 public:
45046 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
45047 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
45048 
45049 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45050 
45051 	typedef ::color::model< yuv_category_type > yuv_model_type;
45052 	typedef ::color::model< xyz_category_type > xyz_model_type;
45053 
45054 	typedef ::color::rgb< scalar_type > rgb_model_type;
45055 
45056 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45057 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45058 
45059 	typedef typename container_left_trait_type::input_type container_left_input_type;
45060 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45061 
processcolor::_internal::convert45062 	static void process
45063 	(
45064 		container_left_input_type left
45065 		,container_right_const_input_type right
45066 	) {
45067 		left = yuv_model_type(rgb_model_type(xyz_model_type(right))).container();
45068 	}
45069 };
45070 
45071 }
45072 }
45073 
45074 namespace color {
45075 namespace _internal {
45076 
45077 template
45078 <
45079 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
45080 	,typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
45081 	>
45082 struct convert
45083 	<
45084 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
45085 	,::color::category::lab< lab_tag_name, lab_reference_number >
45086 	> {
45087 public:
45088 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
45089 	typedef ::color::category::lab< lab_tag_name, lab_reference_number > lab_category_type, category_right_type;
45090 
45091 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45092 
45093 	typedef ::color::model< yuv_category_type > yuv_model_type;
45094 	typedef ::color::model< lab_category_type > lab_model_type;
45095 
45096 	typedef ::color::rgb< scalar_type > rgb_model_type;
45097 	typedef ::color::xyz< scalar_type > xyz_model_type;
45098 
45099 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45100 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45101 
45102 	typedef typename container_left_trait_type::input_type container_left_input_type;
45103 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45104 
processcolor::_internal::convert45105 	static void process
45106 	(
45107 		container_left_input_type left
45108 		,container_right_const_input_type right
45109 	) {
45110 		left = yuv_model_type(rgb_model_type(xyz_model_type(lab_model_type(right)))).container();
45111 	}
45112 };
45113 
45114 }
45115 }
45116 
45117 namespace color {
45118 namespace _internal {
45119 
45120 template
45121 <
45122 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
45123 	,typename xyy_tag_name
45124 	>
45125 struct convert
45126 	<
45127 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
45128 	,::color::category::xyy< xyy_tag_name >
45129 	> {
45130 public:
45131 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
45132 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
45133 
45134 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45135 
45136 	typedef ::color::model< yuv_category_type > yuv_model_type;
45137 	typedef ::color::model< xyy_category_type > xyy_model_type;
45138 
45139 	typedef ::color::rgb< scalar_type > rgb_model_type;
45140 	typedef ::color::xyz< scalar_type > xyz_model_type;
45141 
45142 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45143 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45144 
45145 	typedef typename container_left_trait_type::input_type container_left_input_type;
45146 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45147 
processcolor::_internal::convert45148 	static void process
45149 	(
45150 		container_left_input_type left
45151 		,container_right_const_input_type right
45152 	) {
45153 		left = yuv_model_type(rgb_model_type(xyz_model_type(xyy_model_type(right)))).container();
45154 	}
45155 };
45156 
45157 }
45158 }
45159 
45160 namespace color {
45161 namespace _internal {
45162 
45163 template
45164 <
45165 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
45166 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
45167 	>
45168 struct convert
45169 	<
45170 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
45171 	,::color::category::lms< lms_tag_name, lms_reference_number >
45172 	> {
45173 public:
45174 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
45175 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
45176 
45177 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45178 
45179 	typedef ::color::model< yuv_category_type > yuv_model_type;
45180 	typedef ::color::model< lms_category_type > lms_model_type;
45181 
45182 	typedef ::color::rgb< scalar_type > rgb_model_type;
45183 	typedef ::color::xyz< scalar_type > xyz_model_type;
45184 
45185 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45186 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45187 
45188 	typedef typename container_left_trait_type::input_type container_left_input_type;
45189 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45190 
processcolor::_internal::convert45191 	static void process
45192 	(
45193 		container_left_input_type left
45194 		,container_right_const_input_type right
45195 	) {
45196 		left = yuv_model_type(rgb_model_type(xyz_model_type(lms_model_type(right)))).container();
45197 	}
45198 };
45199 
45200 }
45201 }
45202 
45203 namespace color {
45204 namespace _internal {
45205 
45206 template
45207 <
45208 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
45209 	,typename luv_tag_name
45210 	>
45211 struct convert
45212 	<
45213 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
45214 	,::color::category::luv< luv_tag_name >
45215 	> {
45216 public:
45217 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
45218 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
45219 
45220 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45221 
45222 	typedef ::color::model< yuv_category_type > yuv_model_type;
45223 	typedef ::color::model< luv_category_type > luv_model_type;
45224 
45225 	typedef ::color::rgb< scalar_type > rgb_model_type;
45226 	typedef ::color::xyz< scalar_type > xyz_model_type;
45227 
45228 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45229 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45230 
45231 	typedef typename container_left_trait_type::input_type container_left_input_type;
45232 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45233 
processcolor::_internal::convert45234 	static void process
45235 	(
45236 		container_left_input_type left
45237 		,container_right_const_input_type right
45238 	) {
45239 		left = yuv_model_type(rgb_model_type(xyz_model_type(luv_model_type(right)))).container();
45240 	}
45241 };
45242 
45243 }
45244 }
45245 
45246 namespace color {
45247 namespace _internal {
45248 
45249 template
45250 <
45251 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
45252 	,typename LabCH_tag_name
45253 	>
45254 struct convert
45255 	<
45256 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
45257 	,::color::category::LabCH< LabCH_tag_name >
45258 	> {
45259 public:
45260 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
45261 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
45262 
45263 	typedef typename ::color::trait::scalar< yuv_category_type >::instance_type scalar_type;
45264 
45265 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
45266 	typedef ::color::model< yuv_category_type > yuv_model_type;
45267 
45268 	typedef ::color::lab< scalar_type > lab_model_type;
45269 	typedef ::color::xyz< scalar_type > xyz_model_type;
45270 	typedef ::color::rgb< scalar_type > rgb_model_type;
45271 
45272 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45273 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45274 
45275 	typedef typename container_left_trait_type::input_type container_left_input_type;
45276 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45277 
processcolor::_internal::convert45278 	static void process
45279 	(
45280 		container_left_input_type left
45281 		,container_right_const_input_type right
45282 	) {
45283 		left = yuv_model_type(rgb_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right))))).container();
45284 	}
45285 };
45286 
45287 }
45288 }
45289 
45290 namespace color {
45291 namespace _internal {
45292 
45293 template
45294 <
45295 	typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
45296 	,typename LuvCH_tag_name
45297 	>
45298 struct convert
45299 	<
45300 	::color::category::yuv< yuv_tag_name, yuv_reference_number >
45301 	,::color::category::LuvCH< LuvCH_tag_name >
45302 	> {
45303 public:
45304 	typedef ::color::category::yuv< yuv_tag_name, yuv_reference_number > yuv_category_type, category_left_type;
45305 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
45306 
45307 	typedef typename ::color::trait::scalar< yuv_category_type >::instance_type scalar_type;
45308 
45309 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
45310 	typedef ::color::model< yuv_category_type > yuv_model_type;
45311 
45312 	typedef ::color::luv< scalar_type > luv_model_type;
45313 	typedef ::color::xyz< scalar_type > xyz_model_type;
45314 	typedef ::color::rgb< scalar_type > rgb_model_type;
45315 
45316 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45317 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45318 
45319 	typedef typename container_left_trait_type::input_type container_left_input_type;
45320 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45321 
processcolor::_internal::convert45322 	static void process
45323 	(
45324 		container_left_input_type left
45325 		,container_right_const_input_type right
45326 	) {
45327 		left = yuv_model_type(rgb_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right))))).container();
45328 	}
45329 };
45330 
45331 }
45332 }
45333 
45334 namespace color {
45335 namespace _internal {
45336 
45337 template
45338 <
45339 	typename yiq_tag_name
45340 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum reference_number
45341 	>
45342 struct convert
45343 	<
45344 	::color::category::yiq< yiq_tag_name >
45345 	,::color::category::yuv< yuv_tag_name, reference_number >
45346 	> {
45347 public:
45348 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
45349 	typedef ::color::category::yuv< yuv_tag_name, reference_number > yuv_category_type, category_right_type;
45350 
45351 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45352 
45353 	typedef ::color::model< yiq_category_type > yiq_model_type;
45354 	typedef ::color::model< yuv_category_type > yuv_model_type;
45355 
45356 	typedef ::color::rgb< scalar_type > rgb_model_type;
45357 
45358 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45359 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45360 
45361 	typedef typename container_left_trait_type::input_type container_left_input_type;
45362 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45363 
processcolor::_internal::convert45364 	static void process
45365 	(
45366 		container_left_input_type left
45367 		,container_right_const_input_type right
45368 	) {
45369 		left = yiq_model_type(rgb_model_type(yuv_model_type(right))).container();
45370 	}
45371 };
45372 
45373 template
45374 <
45375 	typename yiq_tag_name
45376 	,typename yuv_tag_name
45377 	>
45378 struct convert
45379 	<
45380 	::color::category::yiq< yiq_tag_name >
45381 	,::color::category::yuv< yuv_tag_name, ::color::constant::yuv::BT_601_entity >
45382 	> {
45383 public:
45384 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
45385 	typedef ::color::category::yuv< yuv_tag_name, ::color::constant::yuv::BT_601_entity > yuv_category_type, category_right_type;
45386 
45387 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45388 
45389 	typedef ::color::yiq< scalar_type > yiq_scalar_type;
45390 	typedef ::color::yuv< scalar_type, ::color::constant::yuv::BT_601_entity> yuv_scalar_type;
45391 
45392 	typedef typename yiq_scalar_type::category_type yiq_scalar_category_type;
45393 	typedef typename yuv_scalar_type::category_type yuv_scalar_category_type;
45394 
45395 	typedef ::color::model< yiq_category_type > yiq_model_type;
45396 	typedef ::color::model< yuv_category_type > yuv_model_type;
45397 
45398 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45399 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45400 
45401 	typedef ::color::trait::component<category_left_type> component_left_trait_type;
45402 	typedef ::color::trait::component<category_right_type> component_right_trait_type;
45403 
45404 	typedef typename container_left_trait_type::input_type container_left_input_type;
45405 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45406 
45407 	typedef ::color::_internal::reformat< category_left_type, yiq_scalar_category_type > reformat_yiq_type;
45408 	typedef ::color::_internal::reformat< yuv_scalar_category_type, category_right_type > reformat_yuv_type;
45409 
45410 	typedef ::color::constant::generic< category_left_type > constant_type;
45411 
45412 	enum {
45413 		luma_p = ::color::place::_internal::luma<category_left_type>::position_enum
45414 		, inphase_p = ::color::place::_internal::inphase<category_left_type>::position_enum
45415 		,quadrature_p = ::color::place::_internal::quadrature<category_left_type>::position_enum
45416 	};
45417 
processcolor::_internal::convert45418 	static void process
45419 	(
45420 		container_left_input_type left
45421 		,container_right_const_input_type right
45422 	) {
45423 		static scalar_type sin_33 = sin(33 * constant_type::deg2rad());
45424 		static scalar_type cos_33 = cos(33 * constant_type::deg2rad());
45425 		scalar_type y = reformat_yuv_type::template process<0,0>(container_right_trait_type::template get<0>(right));
45426 		scalar_type u = reformat_yuv_type::template process<1,1>(container_right_trait_type::template get<1>(right));
45427 		scalar_type v = reformat_yuv_type::template process<2,2>(container_right_trait_type::template get<2>(right));
45428 		y = y;
45429 		scalar_type i = - u * sin_33 + v * cos_33;
45430 		scalar_type q = u * cos_33 + v * sin_33;
45431 		container_left_trait_type::template set< luma_p>(left, reformat_yiq_type::template process< luma_p,0>(y));
45432 		container_left_trait_type::template set< inphase_p>(left, reformat_yiq_type::template process< inphase_p,1>(i));
45433 		container_left_trait_type::template set< quadrature_p>(left, reformat_yiq_type::template process<quadrature_p,2>(q));
45434 	}
45435 };
45436 
45437 }
45438 }
45439 
45440 namespace color {
45441 namespace _internal {
45442 
45443 template< typename yiq_tag_name, typename YCgCo_tag_name >
45444 struct convert
45445 	<
45446 	::color::category::yiq< yiq_tag_name >
45447 	,::color::category::YCgCo< YCgCo_tag_name >
45448 	> {
45449 public:
45450 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
45451 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
45452 
45453 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45454 
45455 	typedef ::color::model< yiq_category_type > yiq_model_type;
45456 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
45457 
45458 	typedef ::color::rgb< scalar_type > rgb_model_type;
45459 
45460 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45461 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45462 
45463 	typedef typename container_left_trait_type::input_type container_left_input_type;
45464 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45465 
processcolor::_internal::convert45466 	static void process
45467 	(
45468 		container_left_input_type left
45469 		,container_right_const_input_type right
45470 	) {
45471 		left = yiq_model_type(rgb_model_type(YCgCo_model_type(right))).container();
45472 	}
45473 };
45474 
45475 }
45476 }
45477 
45478 namespace color {
45479 namespace _internal {
45480 
45481 template< typename yiq_tag_name, typename YDbDr_tag_name >
45482 struct convert
45483 	<
45484 	::color::category::yiq< yiq_tag_name >
45485 	,::color::category::YDbDr< YDbDr_tag_name >
45486 	> {
45487 public:
45488 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
45489 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
45490 
45491 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45492 
45493 	typedef ::color::model< yiq_category_type > yiq_model_type;
45494 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
45495 
45496 	typedef ::color::rgb< scalar_type > rgb_model_type;
45497 
45498 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45499 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45500 
45501 	typedef typename container_left_trait_type::input_type container_left_input_type;
45502 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45503 
processcolor::_internal::convert45504 	static void process
45505 	(
45506 		container_left_input_type left
45507 		,container_right_const_input_type right
45508 	) {
45509 		left = yiq_model_type(rgb_model_type(YDbDr_model_type(right))).container();
45510 	}
45511 };
45512 
45513 }
45514 }
45515 
45516 namespace color {
45517 namespace _internal {
45518 
45519 template
45520 <
45521 	typename yiq_tag_name
45522 	,typename YPbPr_tag_name
45523 	,::color::constant::YPbPr::reference_enum YPbPr_reference_number
45524 	>
45525 struct convert
45526 	<
45527 	::color::category::yiq< yiq_tag_name >
45528 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
45529 	> {
45530 public:
45531 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
45532 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_right_type;
45533 
45534 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45535 
45536 	typedef ::color::model< yiq_category_type > yiq_model_type;
45537 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
45538 
45539 	typedef ::color::rgb< scalar_type > rgb_model_type;
45540 
45541 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45542 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45543 
45544 	typedef typename container_left_trait_type::input_type container_left_input_type;
45545 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45546 
processcolor::_internal::convert45547 	static void process
45548 	(
45549 		container_left_input_type left
45550 		,container_right_const_input_type right
45551 	) {
45552 		left = yiq_model_type(rgb_model_type(YPbPr_model_type(right))).container();
45553 	}
45554 };
45555 
45556 }
45557 }
45558 
45559 namespace color {
45560 namespace _internal {
45561 
45562 template< typename yiq_tag_name, typename xyz_tag_name >
45563 struct convert
45564 	<
45565 	::color::category::yiq< yiq_tag_name >
45566 	,::color::category::xyz< xyz_tag_name >
45567 	> {
45568 public:
45569 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
45570 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
45571 
45572 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45573 
45574 	typedef ::color::model< yiq_category_type > yiq_model_type;
45575 	typedef ::color::model< xyz_category_type > xyz_model_type;
45576 
45577 	typedef ::color::rgb< scalar_type > rgb_model_type;
45578 
45579 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45580 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45581 
45582 	typedef typename container_left_trait_type::input_type container_left_input_type;
45583 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45584 
processcolor::_internal::convert45585 	static void process
45586 	(
45587 		container_left_input_type left
45588 		,container_right_const_input_type right
45589 	) {
45590 		left = yiq_model_type(rgb_model_type(xyz_model_type(right))).container();
45591 	}
45592 };
45593 
45594 }
45595 }
45596 
45597 namespace color {
45598 namespace _internal {
45599 
45600 template
45601 <
45602 	typename yiq_tag_name
45603 	,typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
45604 	>
45605 struct convert
45606 	<
45607 	::color::category::yiq< yiq_tag_name >
45608 	,::color::category::lab< lab_tag_name, lab_reference_number >
45609 	> {
45610 public:
45611 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
45612 	typedef ::color::category::lab< lab_tag_name, lab_reference_number > lab_category_type, category_right_type;
45613 
45614 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45615 
45616 	typedef ::color::model< yiq_category_type > yiq_model_type;
45617 	typedef ::color::model< lab_category_type > lab_model_type;
45618 
45619 	typedef ::color::rgb< scalar_type > rgb_model_type;
45620 	typedef ::color::xyz< scalar_type > xyz_model_type;
45621 
45622 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45623 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45624 
45625 	typedef typename container_left_trait_type::input_type container_left_input_type;
45626 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45627 
processcolor::_internal::convert45628 	static void process
45629 	(
45630 		container_left_input_type left
45631 		,container_right_const_input_type right
45632 	) {
45633 		left = yiq_model_type(rgb_model_type(xyz_model_type(lab_model_type(right)))).container();
45634 	}
45635 };
45636 
45637 }
45638 }
45639 
45640 namespace color {
45641 namespace _internal {
45642 
45643 template
45644 <
45645 	typename yiq_tag_name
45646 	,typename xyy_tag_name
45647 	>
45648 struct convert
45649 	<
45650 	::color::category::yiq< yiq_tag_name >
45651 	,::color::category::xyy< xyy_tag_name >
45652 	> {
45653 public:
45654 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
45655 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
45656 
45657 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45658 
45659 	typedef ::color::model< yiq_category_type > yiq_model_type;
45660 	typedef ::color::model< xyy_category_type > xyy_model_type;
45661 
45662 	typedef ::color::rgb< scalar_type > rgb_model_type;
45663 	typedef ::color::xyz< scalar_type > xyz_model_type;
45664 
45665 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45666 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45667 
45668 	typedef typename container_left_trait_type::input_type container_left_input_type;
45669 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45670 
processcolor::_internal::convert45671 	static void process
45672 	(
45673 		container_left_input_type left
45674 		,container_right_const_input_type right
45675 	) {
45676 		left = yiq_model_type(rgb_model_type(xyz_model_type(xyy_model_type(right)))).container();
45677 	}
45678 };
45679 
45680 }
45681 }
45682 
45683 namespace color {
45684 namespace _internal {
45685 
45686 template
45687 <
45688 	typename yiq_tag_name
45689 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
45690 	>
45691 struct convert
45692 	<
45693 	::color::category::yiq< yiq_tag_name >
45694 	,::color::category::lms< lms_tag_name, lms_reference_number >
45695 	> {
45696 public:
45697 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
45698 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
45699 
45700 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45701 
45702 	typedef ::color::model< yiq_category_type > yiq_model_type;
45703 	typedef ::color::model< lms_category_type > lms_model_type;
45704 
45705 	typedef ::color::rgb< scalar_type > rgb_model_type;
45706 	typedef ::color::xyz< scalar_type > xyz_model_type;
45707 
45708 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45709 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45710 
45711 	typedef typename container_left_trait_type::input_type container_left_input_type;
45712 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45713 
processcolor::_internal::convert45714 	static void process
45715 	(
45716 		container_left_input_type left
45717 		,container_right_const_input_type right
45718 	) {
45719 		left = yiq_model_type(rgb_model_type(xyz_model_type(lms_model_type(right)))).container();
45720 	}
45721 };
45722 
45723 }
45724 }
45725 
45726 namespace color {
45727 namespace _internal {
45728 
45729 template
45730 <
45731 	typename yiq_tag_name
45732 	,typename luv_tag_name
45733 	>
45734 struct convert
45735 	<
45736 	::color::category::yiq< yiq_tag_name >
45737 	,::color::category::luv< luv_tag_name >
45738 	> {
45739 public:
45740 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
45741 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
45742 
45743 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
45744 
45745 	typedef ::color::model< yiq_category_type > yiq_model_type;
45746 	typedef ::color::model< luv_category_type > luv_model_type;
45747 
45748 	typedef ::color::rgb< scalar_type > rgb_model_type;
45749 	typedef ::color::xyz< scalar_type > xyz_model_type;
45750 
45751 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45752 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45753 
45754 	typedef typename container_left_trait_type::input_type container_left_input_type;
45755 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45756 
processcolor::_internal::convert45757 	static void process
45758 	(
45759 		container_left_input_type left
45760 		,container_right_const_input_type right
45761 	) {
45762 		left = yiq_model_type(rgb_model_type(xyz_model_type(luv_model_type(right)))).container();
45763 	}
45764 };
45765 
45766 }
45767 }
45768 
45769 namespace color {
45770 namespace _internal {
45771 
45772 template
45773 <
45774 	typename yiq_tag_name
45775 	,typename LabCH_tag_name
45776 	>
45777 struct convert
45778 	<
45779 	::color::category::yiq< yiq_tag_name >
45780 	,::color::category::LabCH< LabCH_tag_name >
45781 	> {
45782 public:
45783 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
45784 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
45785 
45786 	typedef typename ::color::trait::scalar< yiq_category_type >::instance_type scalar_type;
45787 
45788 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
45789 	typedef ::color::model< yiq_category_type > yiq_model_type;
45790 
45791 	typedef ::color::lab< scalar_type > lab_model_type;
45792 	typedef ::color::xyz< scalar_type > xyz_model_type;
45793 	typedef ::color::rgb< scalar_type > rgb_model_type;
45794 
45795 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45796 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45797 
45798 	typedef typename container_left_trait_type::input_type container_left_input_type;
45799 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45800 
processcolor::_internal::convert45801 	static void process
45802 	(
45803 		container_left_input_type left
45804 		,container_right_const_input_type right
45805 	) {
45806 		left = yiq_model_type(rgb_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right))))).container();
45807 	}
45808 };
45809 
45810 }
45811 }
45812 
45813 namespace color {
45814 namespace _internal {
45815 
45816 template
45817 <
45818 	typename yiq_tag_name
45819 	,typename LuvCH_tag_name
45820 	>
45821 struct convert
45822 	<
45823 	::color::category::yiq< yiq_tag_name >
45824 	,::color::category::LuvCH< LuvCH_tag_name >
45825 	> {
45826 public:
45827 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_left_type;
45828 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
45829 
45830 	typedef typename ::color::trait::scalar< yiq_category_type >::instance_type scalar_type;
45831 
45832 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
45833 	typedef ::color::model< yiq_category_type > yiq_model_type;
45834 
45835 	typedef ::color::luv< scalar_type > luv_model_type;
45836 	typedef ::color::xyz< scalar_type > xyz_model_type;
45837 	typedef ::color::rgb< scalar_type > rgb_model_type;
45838 
45839 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45840 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45841 
45842 	typedef typename container_left_trait_type::input_type container_left_input_type;
45843 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45844 
processcolor::_internal::convert45845 	static void process
45846 	(
45847 		container_left_input_type left
45848 		,container_right_const_input_type right
45849 	) {
45850 		left = yiq_model_type(rgb_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right))))).container();
45851 	}
45852 };
45853 
45854 }
45855 }
45856 
45857 namespace color {
45858 namespace _internal {
45859 
45860 template
45861 <
45862 	typename hwb_tag_name
45863 	,typename yiq_tag_name
45864 	>
45865 struct convert
45866 	<
45867 	::color::category::hwb< hwb_tag_name >
45868 	,::color::category::yiq< yiq_tag_name >
45869 	> {
45870 public:
45871 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
45872 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
45873 
45874 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
45875 
45876 	typedef ::color::model< yiq_category_type > yiq_model_type;
45877 	typedef ::color::model< hwb_category_type > hwb_model_type;
45878 
45879 	typedef ::color::rgb< scalar_type > rgb_model_type;
45880 	typedef ::color::hsv< scalar_type > hsv_model_type;
45881 
45882 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45883 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45884 
45885 	typedef typename container_left_trait_type::input_type container_left_input_type;
45886 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45887 
processcolor::_internal::convert45888 	static void process
45889 	(
45890 		container_left_input_type left
45891 		,container_right_const_input_type right
45892 	) {
45893 		left = hwb_model_type(hsv_model_type(rgb_model_type(yiq_model_type(right)))).container();
45894 	}
45895 };
45896 
45897 }
45898 }
45899 
45900 namespace color {
45901 namespace _internal {
45902 
45903 template
45904 <
45905 	typename hwb_tag_name
45906 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum reference_number
45907 	>
45908 struct convert
45909 	<
45910 	::color::category::hwb< hwb_tag_name >
45911 	,::color::category::yuv< yuv_tag_name, reference_number >
45912 	> {
45913 public:
45914 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
45915 	typedef ::color::category::yuv< yuv_tag_name, reference_number > yuv_category_type, category_right_type;
45916 
45917 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
45918 
45919 	typedef ::color::model< yuv_category_type > yuv_model_type;
45920 	typedef ::color::model< hwb_category_type > hwb_model_type;
45921 
45922 	typedef ::color::rgb< scalar_type > rgb_model_type;
45923 	typedef ::color::hsv< scalar_type > hsv_model_type;
45924 
45925 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45926 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45927 
45928 	typedef typename container_left_trait_type::input_type container_left_input_type;
45929 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45930 
processcolor::_internal::convert45931 	static void process
45932 	(
45933 		container_left_input_type left
45934 		,container_right_const_input_type right
45935 	) {
45936 		left = hwb_model_type(hsv_model_type(rgb_model_type(yuv_model_type(right)))).container();
45937 	}
45938 };
45939 
45940 }
45941 }
45942 
45943 namespace color {
45944 namespace _internal {
45945 
45946 template
45947 <
45948 	typename hwb_tag_name
45949 	,typename YCgCo_tag_name
45950 	>
45951 struct convert
45952 	<
45953 	::color::category::hwb< hwb_tag_name >
45954 	,::color::category::YCgCo< YCgCo_tag_name >
45955 	> {
45956 public:
45957 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
45958 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
45959 
45960 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
45961 
45962 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
45963 	typedef ::color::model< hwb_category_type > hwb_model_type;
45964 
45965 	typedef ::color::rgb< scalar_type > rgb_model_type;
45966 	typedef ::color::hsv< scalar_type > hsv_model_type;
45967 
45968 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
45969 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
45970 
45971 	typedef typename container_left_trait_type::input_type container_left_input_type;
45972 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
45973 
processcolor::_internal::convert45974 	static void process
45975 	(
45976 		container_left_input_type left
45977 		,container_right_const_input_type right
45978 	) {
45979 		left = hwb_model_type(hsv_model_type(rgb_model_type(YCgCo_model_type(right)))).container();
45980 	}
45981 };
45982 
45983 }
45984 }
45985 
45986 namespace color {
45987 namespace _internal {
45988 
45989 template
45990 <
45991 	typename hwb_tag_name
45992 	,typename YDbDr_tag_name
45993 	>
45994 struct convert
45995 	<
45996 	::color::category::hwb< hwb_tag_name >
45997 	,::color::category::YDbDr< YDbDr_tag_name >
45998 	> {
45999 public:
46000 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
46001 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
46002 
46003 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
46004 
46005 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
46006 	typedef ::color::model< hwb_category_type > hwb_model_type;
46007 
46008 	typedef ::color::rgb< scalar_type > rgb_model_type;
46009 	typedef ::color::hsv< scalar_type > hsv_model_type;
46010 
46011 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46012 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46013 
46014 	typedef typename container_left_trait_type::input_type container_left_input_type;
46015 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46016 
processcolor::_internal::convert46017 	static void process
46018 	(
46019 		container_left_input_type left
46020 		,container_right_const_input_type right
46021 	) {
46022 		left = hwb_model_type(hsv_model_type(rgb_model_type(YDbDr_model_type(right)))).container();
46023 	}
46024 };
46025 
46026 }
46027 }
46028 
46029 namespace color {
46030 namespace _internal {
46031 
46032 template
46033 <
46034 	typename hwb_tag_name
46035 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
46036 	>
46037 struct convert
46038 	<
46039 	::color::category::hwb< hwb_tag_name >
46040 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
46041 	> {
46042 public:
46043 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
46044 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_right_type;
46045 
46046 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
46047 
46048 	typedef ::color::model< hwb_category_type > hwb_model_type;
46049 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
46050 
46051 	typedef ::color::rgb< scalar_type > rgb_model_type;
46052 	typedef ::color::hsv< scalar_type > hsv_model_type;
46053 
46054 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46055 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46056 
46057 	typedef typename container_left_trait_type::input_type container_left_input_type;
46058 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46059 
processcolor::_internal::convert46060 	static void process
46061 	(
46062 		container_left_input_type left
46063 		,container_right_const_input_type right
46064 	) {
46065 		left = hwb_model_type(hsv_model_type(rgb_model_type(YPbPr_model_type(right)))).container();
46066 	}
46067 };
46068 
46069 }
46070 }
46071 
46072 namespace color {
46073 namespace _internal {
46074 
46075 template
46076 <
46077 	typename hwb_tag_name
46078 	,typename xyz_tag_name
46079 	>
46080 struct convert
46081 	<
46082 	::color::category::hwb< hwb_tag_name >
46083 	,::color::category::xyz< xyz_tag_name >
46084 	> {
46085 public:
46086 
46087 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
46088 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
46089 
46090 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
46091 
46092 	typedef ::color::model< hwb_category_type > hwb_model_type;
46093 	typedef ::color::model< xyz_category_type > xyz_model_type;
46094 
46095 	typedef ::color::rgb< scalar_type > rgb_model_type;
46096 	typedef ::color::hsv< scalar_type > hsv_model_type;
46097 
46098 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46099 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46100 
46101 	typedef typename container_left_trait_type::input_type container_left_input_type;
46102 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46103 
processcolor::_internal::convert46104 	static void process
46105 	(
46106 		container_left_input_type left
46107 		,container_right_const_input_type right
46108 	) {
46109 		left = hwb_model_type(hsv_model_type(rgb_model_type(xyz_model_type(right)))).container();
46110 	}
46111 
46112 };
46113 
46114 }
46115 }
46116 
46117 namespace color {
46118 namespace _internal {
46119 
46120 template
46121 <
46122 	typename hwb_tag_name
46123 	,typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
46124 	>
46125 struct convert
46126 	<
46127 	::color::category::hwb< hwb_tag_name >
46128 	,::color::category::lab< lab_tag_name, lab_reference_number >
46129 	> {
46130 public:
46131 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
46132 	typedef ::color::category::lab< lab_tag_name, lab_reference_number > lab_category_type, category_right_type;
46133 
46134 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
46135 
46136 	typedef ::color::model< hwb_category_type > hwb_model_type;
46137 	typedef ::color::model< lab_category_type > lab_model_type;
46138 
46139 	typedef ::color::hsv< scalar_type > hsv_model_type;
46140 	typedef ::color::rgb< scalar_type > rgb_model_type;
46141 	typedef ::color::xyz< scalar_type > xyz_model_type;
46142 
46143 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46144 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46145 
46146 	typedef typename container_left_trait_type::input_type container_left_input_type;
46147 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46148 
processcolor::_internal::convert46149 	static void process
46150 	(
46151 		container_left_input_type left
46152 		,container_right_const_input_type right
46153 	) {
46154 		left = hwb_model_type(hsv_model_type(rgb_model_type(xyz_model_type(lab_model_type(right))))).container();
46155 	}
46156 };
46157 
46158 }
46159 }
46160 
46161 namespace color {
46162 namespace _internal {
46163 
46164 template
46165 <
46166 	typename hwb_tag_name
46167 	,typename xyy_tag_name
46168 	>
46169 struct convert
46170 	<
46171 	::color::category::hwb< hwb_tag_name >
46172 	,::color::category::xyy< xyy_tag_name >
46173 	> {
46174 public:
46175 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
46176 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
46177 
46178 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
46179 
46180 	typedef ::color::model< hwb_category_type > hwb_model_type;
46181 	typedef ::color::model< xyy_category_type > xyy_model_type;
46182 
46183 	typedef ::color::xyz< scalar_type > xyz_model_type;
46184 	typedef ::color::rgb< scalar_type > rgb_model_type;
46185 	typedef ::color::hsv< scalar_type > hsv_model_type;
46186 
46187 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46188 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46189 
46190 	typedef typename container_left_trait_type::input_type container_left_input_type;
46191 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46192 
processcolor::_internal::convert46193 	static void process
46194 	(
46195 		container_left_input_type left
46196 		,container_right_const_input_type right
46197 	) {
46198 		left = hwb_model_type(hsv_model_type(rgb_model_type(xyz_model_type(xyy_model_type(right))))).container();
46199 	}
46200 };
46201 
46202 }
46203 }
46204 
46205 namespace color {
46206 namespace _internal {
46207 
46208 template
46209 <
46210 	typename hwb_tag_name
46211 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
46212 	>
46213 struct convert
46214 	<
46215 	::color::category::hwb< hwb_tag_name >
46216 	,::color::category::lms< lms_tag_name, lms_reference_number >
46217 	> {
46218 public:
46219 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
46220 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
46221 
46222 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
46223 
46224 	typedef ::color::model< hwb_category_type > hwb_model_type;
46225 	typedef ::color::model< lms_category_type > lms_model_type;
46226 
46227 	typedef ::color::xyz< scalar_type > xyz_model_type;
46228 	typedef ::color::rgb< scalar_type > rgb_model_type;
46229 	typedef ::color::hsv< scalar_type > hsv_model_type;
46230 
46231 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46232 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46233 
46234 	typedef typename container_left_trait_type::input_type container_left_input_type;
46235 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46236 
processcolor::_internal::convert46237 	static void process
46238 	(
46239 		container_left_input_type left
46240 		,container_right_const_input_type right
46241 	) {
46242 		left = hwb_model_type(hsv_model_type(rgb_model_type(xyz_model_type(lms_model_type(right))))).container();
46243 	}
46244 };
46245 
46246 }
46247 }
46248 
46249 namespace color {
46250 namespace _internal {
46251 
46252 template
46253 <
46254 	typename hwb_tag_name
46255 	,typename luv_tag_name
46256 	>
46257 struct convert
46258 	<
46259 	::color::category::hwb< hwb_tag_name >
46260 	,::color::category::luv< luv_tag_name >
46261 	> {
46262 public:
46263 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
46264 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
46265 
46266 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
46267 
46268 	typedef ::color::model< hwb_category_type > hwb_model_type;
46269 	typedef ::color::model< luv_category_type > luv_model_type;
46270 
46271 	typedef ::color::xyz< scalar_type > xyz_model_type;
46272 	typedef ::color::rgb< scalar_type > rgb_model_type;
46273 	typedef ::color::hsv< scalar_type > hsv_model_type;
46274 
46275 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46276 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46277 
46278 	typedef typename container_left_trait_type::input_type container_left_input_type;
46279 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46280 
processcolor::_internal::convert46281 	static void process
46282 	(
46283 		container_left_input_type left
46284 		,container_right_const_input_type right
46285 	) {
46286 		left = hwb_model_type(hsv_model_type(rgb_model_type(xyz_model_type(luv_model_type(right))))).container();
46287 	}
46288 };
46289 
46290 }
46291 }
46292 
46293 namespace color {
46294 namespace _internal {
46295 
46296 template
46297 <
46298 	typename hwb_tag_name
46299 	,typename LabCH_tag_name
46300 	>
46301 struct convert
46302 	<
46303 	::color::category::hwb< hwb_tag_name >
46304 	,::color::category::LabCH< LabCH_tag_name >
46305 	> {
46306 public:
46307 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
46308 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
46309 
46310 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
46311 
46312 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
46313 	typedef ::color::model< hwb_category_type > hwb_model_type;
46314 
46315 	typedef ::color::lab< scalar_type > lab_model_type;
46316 	typedef ::color::xyz< scalar_type > xyz_model_type;
46317 	typedef ::color::rgb< scalar_type > rgb_model_type;
46318 	typedef ::color::hsv< scalar_type > hsv_model_type;
46319 
46320 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46321 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46322 
46323 	typedef typename container_left_trait_type::input_type container_left_input_type;
46324 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46325 
processcolor::_internal::convert46326 	static void process
46327 	(
46328 		container_left_input_type left
46329 		,container_right_const_input_type right
46330 	) {
46331 		left = hwb_model_type(hsv_model_type(rgb_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right)))))).container();
46332 	}
46333 };
46334 
46335 }
46336 }
46337 
46338 namespace color {
46339 namespace _internal {
46340 
46341 template
46342 <
46343 	typename hwb_tag_name
46344 	,typename LuvCH_tag_name
46345 	>
46346 struct convert
46347 	<
46348 	::color::category::hwb< hwb_tag_name >
46349 	,::color::category::LuvCH< LuvCH_tag_name >
46350 	> {
46351 public:
46352 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_left_type;
46353 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
46354 
46355 	typedef typename ::color::trait::scalar< hwb_category_type >::instance_type scalar_type;
46356 
46357 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
46358 	typedef ::color::model< hwb_category_type > hwb_model_type;
46359 
46360 	typedef ::color::luv< scalar_type > luv_model_type;
46361 	typedef ::color::xyz< scalar_type > xyz_model_type;
46362 	typedef ::color::rgb< scalar_type > rgb_model_type;
46363 	typedef ::color::hsv< scalar_type > hsv_model_type;
46364 
46365 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46366 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46367 
46368 	typedef typename container_left_trait_type::input_type container_left_input_type;
46369 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46370 
processcolor::_internal::convert46371 	static void process
46372 	(
46373 		container_left_input_type left
46374 		,container_right_const_input_type right
46375 	) {
46376 		left = hwb_model_type(hsv_model_type(rgb_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right)))))).container();
46377 	}
46378 };
46379 
46380 }
46381 }
46382 
46383 namespace color {
46384 namespace _internal {
46385 
46386 template
46387 <
46388 	typename hsi_tag_name
46389 	,typename hwb_tag_name
46390 	>
46391 struct convert
46392 	<
46393 	::color::category::hsi< hsi_tag_name >
46394 	,::color::category::hwb< hwb_tag_name >
46395 	> {
46396 public:
46397 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
46398 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
46399 
46400 	typedef typename ::color::trait::scalar< hsi_category_type >::instance_type scalar_type;
46401 
46402 	typedef ::color::model< hsi_category_type > hsi_model_type;
46403 	typedef ::color::model< hwb_category_type > hwb_model_type;
46404 
46405 	typedef ::color::rgb< scalar_type > rgb_model_type;
46406 	typedef ::color::hsv< scalar_type > hsv_model_type;
46407 
46408 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46409 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46410 
46411 	typedef typename container_left_trait_type::input_type container_left_input_type;
46412 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46413 
processcolor::_internal::convert46414 	static void process
46415 	(
46416 		container_left_input_type left
46417 		,container_right_const_input_type right
46418 	) {
46419 		left = hsi_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right)))).container();
46420 	}
46421 };
46422 
46423 }
46424 }
46425 
46426 namespace color {
46427 namespace _internal {
46428 
46429 template< typename hsi_tag_name, typename rgb_tag_name >
46430 struct convert
46431 	<
46432 	::color::category::hsi< hsi_tag_name >
46433 	,::color::category::rgb< rgb_tag_name >
46434 	> {
46435 public:
46436 	typedef ::color::category::hsi< hsi_tag_name > category_left_type;
46437 	typedef ::color::category::rgb< rgb_tag_name > category_right_type;
46438 
46439 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
46440 
46441 	typedef ::color::trait::scalar<category_left_type> scalar_trait_type;
46442 
46443 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46444 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46445 
46446 	typedef typename container_left_trait_type::input_type container_left_input_type;
46447 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46448 
46449 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
46450 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
46451 
46452 	typedef ::color::constant::generic< category_left_type > constant_type;
46453 
46454 	enum {
46455 		hue_p = ::color::place::_internal::hue<category_left_type>::position_enum
46456 		,saturation_p = ::color::place::_internal::saturation<category_left_type>::position_enum
46457 		, intensity_p = ::color::place::_internal::intensity<category_left_type>::position_enum
46458 	};
46459 
46460 	enum {
46461 		red_p = ::color::place::_internal::red<category_right_type>::position_enum
46462 		,green_p = ::color::place::_internal::green<category_right_type>::position_enum
46463 		, blue_p = ::color::place::_internal::blue<category_right_type>::position_enum
46464 	};
46465 
processcolor::_internal::convert46466 	static void process
46467 	(
46468 		container_left_input_type left
46469 		,container_right_const_input_type right
46470 	) {
46471 		scalar_type r = normalize_type::template process<red_p >(container_right_trait_type::template get<red_p >(right));
46472 		scalar_type g = normalize_type::template process<green_p>(container_right_trait_type::template get<green_p>(right));
46473 		scalar_type b = normalize_type::template process<blue_p >(container_right_trait_type::template get<blue_p >(right));
46474 		scalar_type lo = std::min<scalar_type>({r,g,b});
46475 		scalar_type h = 0;
46476 		scalar_type i = (r + g + b) / scalar_type(3);
46477 		scalar_type s = scalar_type(1);
46478 		if(false == scalar_trait_type::is_small(i)) {
46479 			s = scalar_type(1) - lo / i;
46480 		}
46481 		scalar_type c1 = r - g* scalar_type(0.5) - b * scalar_type(0.5);
46482 		scalar_type c2 = (g - b) * constant_type::sqrt_3() * scalar_type(0.5);
46483 		scalar_type thetaX = atan2(c2, c1);
46484 		if(thetaX < 0) {
46485 			thetaX += constant_type::two_pi();
46486 		}
46487 		h = thetaX;
46488 		h /= constant_type::two_pi();
46489 		{
46490 		}
46491 		container_left_trait_type::template set< hue_p>(left, diverse_type::template process< hue_p>(h));
46492 		container_left_trait_type::template set<saturation_p>(left, diverse_type::template process<saturation_p>(s));
46493 		container_left_trait_type::template set< intensity_p>(left, diverse_type::template process< intensity_p>(i));
46494 	}
46495 };
46496 
46497 }
46498 }
46499 
46500 namespace color {
46501 namespace _internal {
46502 
46503 template< typename hsi_tag_name, typename yiq_tag_name >
46504 struct convert
46505 	<
46506 	::color::category::hsi< hsi_tag_name >
46507 	,::color::category::yiq< yiq_tag_name >
46508 	> {
46509 public:
46510 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
46511 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
46512 
46513 	typedef typename ::color::akin::rgb< yiq_category_type >::akin_type rgb_category_type;
46514 
46515 	typedef ::color::model< hsi_category_type > hsi_model_type;
46516 	typedef ::color::model< yiq_category_type > yiq_model_type;
46517 
46518 	typedef ::color::model< rgb_category_type > rgb_model_type;
46519 
46520 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46521 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46522 
46523 	typedef typename container_left_trait_type::input_type container_left_input_type;
46524 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46525 
processcolor::_internal::convert46526 	static void process
46527 	(
46528 		container_left_input_type left
46529 		,container_right_const_input_type right
46530 	) {
46531 		left = hsi_model_type(rgb_model_type(yiq_model_type(right))).container();
46532 	}
46533 };
46534 
46535 }
46536 }
46537 
46538 namespace color {
46539 namespace _internal {
46540 
46541 template
46542 <
46543 	typename hsi_tag_name
46544 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum reference_number
46545 	>
46546 struct convert
46547 	<
46548 	::color::category::hsi< hsi_tag_name >
46549 	,::color::category::yuv< yuv_tag_name, reference_number >
46550 	> {
46551 public:
46552 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
46553 	typedef ::color::category::yuv< yuv_tag_name, reference_number > yuv_category_type, category_right_type;
46554 
46555 	typedef typename ::color::akin::rgb< yuv_category_type >::akin_type rgb_category_type;
46556 
46557 	typedef ::color::model< hsi_category_type > hsi_model_type;
46558 	typedef ::color::model< yuv_category_type > yuv_model_type;
46559 
46560 	typedef ::color::model< rgb_category_type > rgb_model_type;
46561 
46562 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46563 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46564 
46565 	typedef typename container_left_trait_type::input_type container_left_input_type;
46566 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46567 
processcolor::_internal::convert46568 	static void process
46569 	(
46570 		container_left_input_type left
46571 		,container_right_const_input_type right
46572 	) {
46573 		left = hsi_model_type(rgb_model_type(yuv_model_type(right))).container();
46574 	}
46575 };
46576 
46577 }
46578 }
46579 
46580 namespace color {
46581 namespace _internal {
46582 
46583 template< typename hsi_tag_name, typename YCgCo_tag_name >
46584 struct convert
46585 	<
46586 	::color::category::hsi< hsi_tag_name >
46587 	,::color::category::YCgCo< YCgCo_tag_name >
46588 	> {
46589 public:
46590 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
46591 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
46592 
46593 	typedef typename ::color::akin::rgb< YCgCo_category_type >::akin_type rgb_category_type;
46594 
46595 	typedef ::color::model< hsi_category_type > hsi_model_type;
46596 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
46597 
46598 	typedef ::color::model< rgb_category_type > rgb_model_type;
46599 
46600 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46601 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46602 
46603 	typedef typename container_left_trait_type::input_type container_left_input_type;
46604 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46605 
processcolor::_internal::convert46606 	static void process
46607 	(
46608 		container_left_input_type left
46609 		,container_right_const_input_type right
46610 	) {
46611 		left = hsi_model_type(rgb_model_type(YCgCo_model_type(right))).container();
46612 	}
46613 };
46614 
46615 }
46616 }
46617 
46618 namespace color {
46619 namespace _internal {
46620 
46621 template< typename hsi_tag_name, typename YDbDr_tag_name >
46622 struct convert
46623 	<
46624 	::color::category::hsi< hsi_tag_name >
46625 	,::color::category::YDbDr< YDbDr_tag_name >
46626 	> {
46627 public:
46628 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
46629 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
46630 
46631 	typedef typename ::color::akin::rgb< YDbDr_category_type >::akin_type rgb_category_type;
46632 
46633 	typedef ::color::model< hsi_category_type > hsi_model_type;
46634 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
46635 
46636 	typedef ::color::model< rgb_category_type > rgb_model_type;
46637 
46638 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46639 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46640 
46641 	typedef typename container_left_trait_type::input_type container_left_input_type;
46642 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46643 
processcolor::_internal::convert46644 	static void process
46645 	(
46646 		container_left_input_type left
46647 		,container_right_const_input_type right
46648 	) {
46649 		left = hsi_model_type(rgb_model_type(YDbDr_model_type(right))).container();
46650 	}
46651 };
46652 
46653 }
46654 }
46655 
46656 namespace color {
46657 namespace _internal {
46658 
46659 template
46660 <
46661 	typename hsi_tag_name
46662 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
46663 	>
46664 struct convert
46665 	<
46666 	::color::category::hsi< hsi_tag_name >
46667 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
46668 	> {
46669 public:
46670 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
46671 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_right_type;
46672 
46673 	typedef typename ::color::akin::rgb< YPbPr_category_type >::akin_type rgb_category_type;
46674 
46675 	typedef ::color::model< hsi_category_type > hsi_model_type;
46676 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
46677 
46678 	typedef ::color::model< rgb_category_type > rgb_model_type;
46679 
46680 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46681 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46682 
46683 	typedef typename container_left_trait_type::input_type container_left_input_type;
46684 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46685 
processcolor::_internal::convert46686 	static void process
46687 	(
46688 		container_left_input_type left
46689 		,container_right_const_input_type right
46690 	) {
46691 		left = hsi_model_type(rgb_model_type(YPbPr_model_type(right))).container();
46692 	}
46693 };
46694 
46695 }
46696 }
46697 
46698 namespace color {
46699 namespace _internal {
46700 
46701 template< typename hsi_tag_name, typename xyz_tag_name >
46702 struct convert
46703 	<
46704 	::color::category::hsi< hsi_tag_name >
46705 	,::color::category::xyz< xyz_tag_name >
46706 	> {
46707 public:
46708 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
46709 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
46710 
46711 	typedef typename ::color::akin::rgb< xyz_category_type >::akin_type rgb_category_type;
46712 
46713 	typedef ::color::model< hsi_category_type > hsi_model_type;
46714 	typedef ::color::model< xyz_category_type > xyz_model_type;
46715 
46716 	typedef ::color::model< rgb_category_type > rgb_model_type;
46717 
46718 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46719 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46720 
46721 	typedef typename container_left_trait_type::input_type container_left_input_type;
46722 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46723 
processcolor::_internal::convert46724 	static void process
46725 	(
46726 		container_left_input_type left
46727 		,container_right_const_input_type right
46728 	) {
46729 		left = hsi_model_type(rgb_model_type(xyz_model_type(right))).container();
46730 	}
46731 };
46732 
46733 }
46734 }
46735 
46736 namespace color {
46737 namespace _internal {
46738 
46739 template
46740 <
46741 	typename hsi_tag_name
46742 	,typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
46743 	>
46744 struct convert
46745 	<
46746 	::color::category::hsi< hsi_tag_name >
46747 	,::color::category::lab< lab_tag_name, lab_reference_number >
46748 	> {
46749 public:
46750 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
46751 	typedef ::color::category::lab< lab_tag_name, lab_reference_number > lab_category_type, category_right_type;
46752 
46753 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
46754 
46755 	typedef ::color::model< hsi_category_type > hsi_model_type;
46756 	typedef ::color::model< lab_category_type > lab_model_type;
46757 
46758 	typedef ::color::rgb< scalar_type > rgb_model_type;
46759 	typedef ::color::xyz< scalar_type > xyz_model_type;
46760 
46761 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46762 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46763 
46764 	typedef typename container_left_trait_type::input_type container_left_input_type;
46765 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46766 
processcolor::_internal::convert46767 	static void process
46768 	(
46769 		container_left_input_type left
46770 		,container_right_const_input_type right
46771 	) {
46772 		left = hsi_model_type(rgb_model_type(xyz_model_type(lab_model_type(right)))).container();
46773 	}
46774 };
46775 
46776 }
46777 }
46778 
46779 namespace color {
46780 namespace _internal {
46781 
46782 template
46783 <
46784 	typename hsi_tag_name
46785 	,typename xyy_tag_name
46786 	>
46787 struct convert
46788 	<
46789 	::color::category::hsi< hsi_tag_name >
46790 	,::color::category::xyy< xyy_tag_name >
46791 	> {
46792 public:
46793 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
46794 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
46795 
46796 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
46797 
46798 	typedef ::color::model< hsi_category_type > hsi_model_type;
46799 	typedef ::color::model< xyy_category_type > xyy_model_type;
46800 
46801 	typedef ::color::rgb< scalar_type > rgb_model_type;
46802 	typedef ::color::xyz< scalar_type > xyz_model_type;
46803 
46804 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46805 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46806 
46807 	typedef typename container_left_trait_type::input_type container_left_input_type;
46808 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46809 
processcolor::_internal::convert46810 	static void process
46811 	(
46812 		container_left_input_type left
46813 		,container_right_const_input_type right
46814 	) {
46815 		left = hsi_model_type(rgb_model_type(xyz_model_type(xyy_model_type(right)))).container();
46816 	}
46817 };
46818 
46819 }
46820 }
46821 
46822 namespace color {
46823 namespace _internal {
46824 
46825 template
46826 <
46827 	typename hsi_tag_name
46828 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
46829 	>
46830 struct convert
46831 	<
46832 	::color::category::hsi< hsi_tag_name >
46833 	,::color::category::lms< lms_tag_name, lms_reference_number >
46834 	> {
46835 public:
46836 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
46837 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
46838 
46839 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
46840 
46841 	typedef ::color::model< hsi_category_type > hsi_model_type;
46842 	typedef ::color::model< lms_category_type > lms_model_type;
46843 
46844 	typedef ::color::rgb< scalar_type > rgb_model_type;
46845 	typedef ::color::xyz< scalar_type > xyz_model_type;
46846 
46847 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46848 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46849 
46850 	typedef typename container_left_trait_type::input_type container_left_input_type;
46851 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46852 
processcolor::_internal::convert46853 	static void process
46854 	(
46855 		container_left_input_type left
46856 		,container_right_const_input_type right
46857 	) {
46858 		left = hsi_model_type(rgb_model_type(xyz_model_type(lms_model_type(right)))).container();
46859 	}
46860 };
46861 
46862 }
46863 }
46864 
46865 namespace color {
46866 namespace _internal {
46867 
46868 template
46869 <
46870 	typename hsi_tag_name
46871 	,typename luv_tag_name
46872 	>
46873 struct convert
46874 	<
46875 	::color::category::hsi< hsi_tag_name >
46876 	,::color::category::luv< luv_tag_name >
46877 	> {
46878 public:
46879 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
46880 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
46881 
46882 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
46883 
46884 	typedef ::color::model< hsi_category_type > hsi_model_type;
46885 	typedef ::color::model< luv_category_type > luv_model_type;
46886 
46887 	typedef ::color::rgb< scalar_type > rgb_model_type;
46888 	typedef ::color::xyz< scalar_type > xyz_model_type;
46889 
46890 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46891 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46892 
46893 	typedef typename container_left_trait_type::input_type container_left_input_type;
46894 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46895 
processcolor::_internal::convert46896 	static void process
46897 	(
46898 		container_left_input_type left
46899 		,container_right_const_input_type right
46900 	) {
46901 		left = hsi_model_type(rgb_model_type(xyz_model_type(luv_model_type(right)))).container();
46902 	}
46903 };
46904 
46905 }
46906 }
46907 
46908 namespace color {
46909 namespace _internal {
46910 
46911 template
46912 <
46913 	typename hsi_tag_name
46914 	,typename LabCH_tag_name
46915 	>
46916 struct convert
46917 	<
46918 	::color::category::hsi< hsi_tag_name >
46919 	,::color::category::LabCH< LabCH_tag_name >
46920 	> {
46921 public:
46922 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
46923 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
46924 
46925 	typedef typename ::color::trait::scalar< hsi_category_type >::instance_type scalar_type;
46926 
46927 	typedef ::color::model< hsi_category_type > hsi_model_type;
46928 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
46929 
46930 	typedef ::color::lab< scalar_type > lab_model_type;
46931 	typedef ::color::xyz< scalar_type > xyz_model_type;
46932 	typedef ::color::rgb< scalar_type > rgb_model_type;
46933 
46934 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46935 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46936 
46937 	typedef typename container_left_trait_type::input_type container_left_input_type;
46938 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46939 
processcolor::_internal::convert46940 	static void process
46941 	(
46942 		container_left_input_type left
46943 		,container_right_const_input_type right
46944 	) {
46945 		left = hsi_model_type(rgb_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right))))).container();
46946 	}
46947 };
46948 
46949 }
46950 }
46951 
46952 namespace color {
46953 namespace _internal {
46954 
46955 template
46956 <
46957 	typename hsi_tag_name
46958 	,typename LuvCH_tag_name
46959 	>
46960 struct convert
46961 	<
46962 	::color::category::hsi< hsi_tag_name >
46963 	,::color::category::LuvCH< LuvCH_tag_name >
46964 	> {
46965 public:
46966 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_left_type;
46967 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
46968 
46969 	typedef typename ::color::trait::scalar< hsi_category_type >::instance_type scalar_type;
46970 
46971 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
46972 	typedef ::color::model< hsi_category_type > hsi_model_type;
46973 
46974 	typedef ::color::luv< scalar_type > luv_model_type;
46975 	typedef ::color::xyz< scalar_type > xyz_model_type;
46976 	typedef ::color::rgb< scalar_type > rgb_model_type;
46977 
46978 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
46979 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
46980 
46981 	typedef typename container_left_trait_type::input_type container_left_input_type;
46982 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
46983 
processcolor::_internal::convert46984 	static void process
46985 	(
46986 		container_left_input_type left
46987 		,container_right_const_input_type right
46988 	) {
46989 		left = hsi_model_type(rgb_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right))))).container();
46990 	}
46991 };
46992 
46993 }
46994 }
46995 
46996 namespace color {
46997 namespace _internal {
46998 
46999 template
47000 <
47001 	typename hsv_tag_name
47002 	,typename hsi_right_name
47003 	>
47004 struct convert
47005 	<
47006 	::color::category::hsv< hsv_tag_name >
47007 	,::color::category::hsi< hsi_right_name>
47008 	> {
47009 public:
47010 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_left_type;
47011 	typedef ::color::category::hsi< hsi_right_name> hsi_category_type, category_right_type;
47012 
47013 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47014 
47015 	typedef ::color::model< hsv_category_type > hsv_model_type;
47016 	typedef ::color::model< hsi_category_type > hsi_model_type;
47017 
47018 	typedef ::color::rgb< scalar_type > rgb_model_type;
47019 
47020 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47021 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47022 
47023 	typedef typename container_left_trait_type::input_type container_left_input_type;
47024 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47025 
processcolor::_internal::convert47026 	static void process
47027 	(
47028 		container_left_input_type left
47029 		,container_right_const_input_type right
47030 	) {
47031 		left = hsv_model_type(rgb_model_type(hsi_model_type(right))).container();
47032 	}
47033 };
47034 
47035 }
47036 }
47037 
47038 namespace color {
47039 namespace _internal {
47040 
47041 template< typename hsv_tag_name, typename hwb_tag_name >
47042 struct convert
47043 	<
47044 	::color::category::hsv< hsv_tag_name >
47045 	,::color::category::hwb< hwb_tag_name >
47046 	> {
47047 public:
47048 	typedef ::color::category::hsv< hsv_tag_name > category_left_type;
47049 	typedef ::color::category::hwb< hwb_tag_name > category_right_type;
47050 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47051 
47052 	typedef ::color::trait::scalar<category_left_type> scalar_trait_type;
47053 
47054 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47055 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47056 
47057 	typedef typename container_left_trait_type::input_type container_left_input_type;
47058 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47059 
47060 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
47061 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
47062 
47063 	enum {
47064 		hue_p = ::color::place::_internal::hue<category_left_type>::position_enum
47065 		,saturation_p = ::color::place::_internal::saturation<category_left_type>::position_enum
47066 		, value_p = ::color::place::_internal::value<category_left_type>::position_enum
47067 	};
47068 
processcolor::_internal::convert47069 	static void process
47070 	(
47071 		container_left_input_type left
47072 		,container_right_const_input_type right
47073 	) {
47074 		scalar_type h = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
47075 		scalar_type w = normalize_type::template process<1>(container_right_trait_type::template get<1>(right));
47076 		scalar_type b = normalize_type::template process<2>(container_right_trait_type::template get<2>(right));
47077 		h = h;
47078 		scalar_type s = scalar_type(1)- w/(scalar_type(1) - b);
47079 		scalar_type v = scalar_type(1) - b;
47080 		container_left_trait_type::template set< hue_p>(left, diverse_type::template process< hue_p>(h));
47081 		container_left_trait_type::template set<saturation_p>(left, diverse_type::template process<saturation_p>(s));
47082 		container_left_trait_type::template set< value_p>(left, diverse_type::template process< value_p>(v));
47083 	}
47084 };
47085 
47086 }
47087 }
47088 
47089 namespace color {
47090 namespace _internal {
47091 
47092 template< typename hsv_tag_name, typename rgb_tag_name >
47093 struct convert
47094 	<
47095 	::color::category::hsv< hsv_tag_name >
47096 	,::color::category::rgb< rgb_tag_name >
47097 	> {
47098 public:
47099 	typedef ::color::category::hsv< hsv_tag_name > category_left_type;
47100 	typedef ::color::category::rgb< rgb_tag_name > category_right_type;
47101 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47102 
47103 	typedef ::color::trait::scalar<category_left_type> scalar_trait_type;
47104 
47105 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47106 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47107 
47108 	typedef typename container_left_trait_type::input_type container_left_input_type;
47109 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47110 
47111 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
47112 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
47113 
47114 	enum {
47115 		hue_p = ::color::place::_internal::hue<category_left_type>::position_enum
47116 		,saturation_p = ::color::place::_internal::saturation<category_left_type>::position_enum
47117 		, value_p = ::color::place::_internal::value<category_left_type>::position_enum
47118 	};
47119 
47120 	enum {
47121 		red_p = ::color::place::_internal::red<category_right_type>::position_enum
47122 		,green_p = ::color::place::_internal::green<category_right_type>::position_enum
47123 		, blue_p = ::color::place::_internal::blue<category_right_type>::position_enum
47124 	};
47125 
processcolor::_internal::convert47126 	static void process
47127 	(
47128 		container_left_input_type left
47129 		,container_right_const_input_type right
47130 	) {
47131 		scalar_type r = normalize_type::template process<red_p >(container_right_trait_type::template get<red_p >(right));
47132 		scalar_type g = normalize_type::template process<green_p>(container_right_trait_type::template get<green_p>(right));
47133 		scalar_type b = normalize_type::template process<blue_p >(container_right_trait_type::template get<blue_p >(right));
47134 		scalar_type lo = std::min<scalar_type>({r,g,b});
47135 		scalar_type hi = std::max<scalar_type>({r,g,b});
47136 		scalar_type const& v = hi;
47137 		scalar_type delta = v - lo;
47138 		scalar_type h = 0;
47139 		scalar_type s = 0;
47140 		if((false == scalar_trait_type::is_small(v))
47141 		   && (false == scalar_trait_type::is_small(delta))) {
47142 			s = delta / v;
47143 			if(hi == r) {
47144 				h = (scalar_type(60)/scalar_type(360)) * (g - b) / delta + (g < b ? scalar_type(1) : scalar_type(0));
47145 			}
47146 			if(hi == g) {
47147 				h = (scalar_type(60)/scalar_type(360)) * (b - r) / delta + (scalar_type(120)/scalar_type(360));
47148 			}
47149 			if(hi == b) {
47150 				h = (scalar_type(60)/scalar_type(360)) * (r - g) / delta + (scalar_type(240)/scalar_type(360));
47151 			}
47152 		}
47153 		container_left_trait_type::template set< hue_p>(left, diverse_type::template process< hue_p>(h));
47154 		container_left_trait_type::template set<saturation_p>(left, diverse_type::template process<saturation_p>(s));
47155 		container_left_trait_type::template set< value_p>(left, diverse_type::template process< value_p>(v));
47156 	}
47157 };
47158 
47159 }
47160 }
47161 
47162 namespace color {
47163 namespace _internal {
47164 
47165 template< typename hsv_tag_name, typename yiq_tag_name >
47166 struct convert
47167 	<
47168 	::color::category::hsv< hsv_tag_name >
47169 	,::color::category::yiq< yiq_tag_name >
47170 	> {
47171 public:
47172 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_left_type;
47173 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
47174 
47175 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47176 
47177 	typedef ::color::model< hsv_category_type > hsv_model_type;
47178 	typedef ::color::model< yiq_category_type > yiq_model_type;
47179 
47180 	typedef ::color::rgb< scalar_type > rgb_model_type;
47181 
47182 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47183 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47184 
47185 	typedef typename container_left_trait_type::input_type container_left_input_type;
47186 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47187 
processcolor::_internal::convert47188 	static void process
47189 	(
47190 		container_left_input_type left
47191 		,container_right_const_input_type right
47192 	) {
47193 		left = hsv_model_type(rgb_model_type(yiq_model_type(right))).container();
47194 	}
47195 };
47196 
47197 }
47198 }
47199 
47200 namespace color {
47201 namespace _internal {
47202 
47203 template
47204 <
47205 	typename hsv_tag_name
47206 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum reference_number
47207 	>
47208 struct convert
47209 	<
47210 	::color::category::hsv< hsv_tag_name >
47211 	,::color::category::yuv< yuv_tag_name, reference_number >
47212 	> {
47213 public:
47214 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_left_type;
47215 	typedef ::color::category::yuv< yuv_tag_name, reference_number > yuv_category_type, category_right_type;
47216 
47217 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47218 
47219 	typedef ::color::model< hsv_category_type > hsv_model_type;
47220 	typedef ::color::model< yuv_category_type > yuv_model_type;
47221 
47222 	typedef ::color::rgb< scalar_type > rgb_model_type;
47223 
47224 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47225 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47226 
47227 	typedef typename container_left_trait_type::input_type container_left_input_type;
47228 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47229 
processcolor::_internal::convert47230 	static void process
47231 	(
47232 		container_left_input_type left
47233 		,container_right_const_input_type right
47234 	) {
47235 		left = hsv_model_type(rgb_model_type(yuv_model_type(right))).container();
47236 	}
47237 };
47238 
47239 }
47240 }
47241 
47242 namespace color {
47243 namespace _internal {
47244 
47245 template< typename hsv_tag_name, typename YCgCo_tag_name >
47246 struct convert
47247 	<
47248 	::color::category::hsv< hsv_tag_name >
47249 	,::color::category::YCgCo< YCgCo_tag_name >
47250 	> {
47251 public:
47252 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_left_type;
47253 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
47254 
47255 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47256 
47257 	typedef ::color::model< hsv_category_type > hsv_model_type;
47258 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
47259 
47260 	typedef ::color::rgb< scalar_type > rgb_model_type;
47261 
47262 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47263 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47264 
47265 	typedef typename container_left_trait_type::input_type container_left_input_type;
47266 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47267 
processcolor::_internal::convert47268 	static void process
47269 	(
47270 		container_left_input_type left
47271 		,container_right_const_input_type right
47272 	) {
47273 		left = hsv_model_type(rgb_model_type(YCgCo_model_type(right))).container();
47274 	}
47275 };
47276 
47277 }
47278 }
47279 
47280 namespace color {
47281 namespace _internal {
47282 
47283 template< typename hsv_tag_name, typename YDbDr_tag_name >
47284 struct convert
47285 	<
47286 	::color::category::hsv< hsv_tag_name >
47287 	,::color::category::YDbDr< YDbDr_tag_name >
47288 	> {
47289 public:
47290 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_left_type;
47291 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
47292 
47293 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47294 
47295 	typedef ::color::model< hsv_category_type > hsv_model_type;
47296 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
47297 
47298 	typedef ::color::rgb< scalar_type > rgb_model_type;
47299 
47300 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47301 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47302 
47303 	typedef typename container_left_trait_type::input_type container_left_input_type;
47304 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47305 
processcolor::_internal::convert47306 	static void process
47307 	(
47308 		container_left_input_type left
47309 		,container_right_const_input_type right
47310 	) {
47311 		left = hsv_model_type(rgb_model_type(YDbDr_model_type(right))).container();
47312 	}
47313 };
47314 
47315 }
47316 }
47317 
47318 namespace color {
47319 namespace _internal {
47320 
47321 template
47322 <
47323 	typename hsv_tag_name
47324 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
47325 	>
47326 struct convert
47327 	<
47328 	::color::category::hsv< hsv_tag_name >
47329 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
47330 	> {
47331 public:
47332 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_left_type;
47333 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_right_type;
47334 
47335 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47336 
47337 	typedef ::color::model< hsv_category_type > hsv_model_type;
47338 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
47339 
47340 	typedef ::color::rgb< scalar_type > rgb_model_type;
47341 
47342 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47343 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47344 
47345 	typedef typename container_left_trait_type::input_type container_left_input_type;
47346 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47347 
processcolor::_internal::convert47348 	static void process
47349 	(
47350 		container_left_input_type left
47351 		,container_right_const_input_type right
47352 	) {
47353 		left = hsv_model_type(rgb_model_type(YPbPr_model_type(right))).container();
47354 	}
47355 };
47356 
47357 }
47358 }
47359 
47360 namespace color {
47361 namespace _internal {
47362 
47363 template< typename hsv_tag_name, typename xyz_tag_name >
47364 struct convert
47365 	<
47366 	::color::category::hsv< hsv_tag_name >
47367 	,::color::category::xyz< xyz_tag_name >
47368 	> {
47369 public:
47370 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_left_type;
47371 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
47372 
47373 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47374 
47375 	typedef ::color::model< hsv_category_type > hsv_model_type;
47376 	typedef ::color::model< xyz_category_type > xyz_model_type;
47377 
47378 	typedef ::color::rgb< scalar_type > rgb_model_type;
47379 
47380 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47381 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47382 
47383 	typedef typename container_left_trait_type::input_type container_left_input_type;
47384 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47385 
processcolor::_internal::convert47386 	static void process
47387 	(
47388 		container_left_input_type left
47389 		,container_right_const_input_type right
47390 	) {
47391 		left = hsv_model_type(rgb_model_type(xyz_model_type(right))).container();
47392 	}
47393 };
47394 
47395 }
47396 }
47397 
47398 namespace color {
47399 namespace _internal {
47400 
47401 template
47402 <
47403 	typename hsv_tag_name
47404 	,typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
47405 	>
47406 struct convert
47407 	<
47408 	::color::category::hsv< hsv_tag_name >
47409 	,::color::category::lab< lab_tag_name, lab_reference_number >
47410 	> {
47411 public:
47412 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_left_type;
47413 	typedef ::color::category::lab< lab_tag_name, lab_reference_number > lab_category_type, category_right_type;
47414 
47415 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47416 
47417 	typedef ::color::model< hsv_category_type > hsv_model_type;
47418 	typedef ::color::model< lab_category_type > lab_model_type;
47419 
47420 	typedef ::color::rgb< scalar_type > rgb_model_type;
47421 	typedef ::color::xyz< scalar_type > xyz_model_type;
47422 
47423 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47424 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47425 
47426 	typedef typename container_left_trait_type::input_type container_left_input_type;
47427 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47428 
processcolor::_internal::convert47429 	static void process
47430 	(
47431 		container_left_input_type left
47432 		,container_right_const_input_type right
47433 	) {
47434 		left = hsv_model_type(rgb_model_type(xyz_model_type(lab_model_type(right)))).container();
47435 	}
47436 };
47437 
47438 }
47439 }
47440 
47441 namespace color {
47442 namespace _internal {
47443 
47444 template
47445 <
47446 	typename hsv_tag_name
47447 	,typename xyy_tag_name
47448 	>
47449 struct convert
47450 	<
47451 	::color::category::hsv< hsv_tag_name >
47452 	,::color::category::xyy< xyy_tag_name >
47453 	> {
47454 public:
47455 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_left_type;
47456 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
47457 
47458 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47459 
47460 	typedef ::color::model< hsv_category_type > hsv_model_type;
47461 	typedef ::color::model< xyy_category_type > xyy_model_type;
47462 
47463 	typedef ::color::rgb< scalar_type > rgb_model_type;
47464 	typedef ::color::xyz< scalar_type > xyz_model_type;
47465 
47466 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47467 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47468 
47469 	typedef typename container_left_trait_type::input_type container_left_input_type;
47470 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47471 
processcolor::_internal::convert47472 	static void process
47473 	(
47474 		container_left_input_type left
47475 		,container_right_const_input_type right
47476 	) {
47477 		left = hsv_model_type(rgb_model_type(xyz_model_type(xyy_model_type(right)))).container();
47478 	}
47479 };
47480 
47481 }
47482 }
47483 
47484 namespace color {
47485 namespace _internal {
47486 
47487 template
47488 <
47489 	typename hsv_tag_name
47490 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
47491 	>
47492 struct convert
47493 	<
47494 	::color::category::hsv< hsv_tag_name >
47495 	,::color::category::lms< lms_tag_name, lms_reference_number >
47496 	> {
47497 public:
47498 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_left_type;
47499 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
47500 
47501 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47502 
47503 	typedef ::color::model< hsv_category_type > hsv_model_type;
47504 	typedef ::color::model< lms_category_type > lms_model_type;
47505 
47506 	typedef ::color::rgb< scalar_type > rgb_model_type;
47507 	typedef ::color::xyz< scalar_type > xyz_model_type;
47508 
47509 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47510 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47511 
47512 	typedef typename container_left_trait_type::input_type container_left_input_type;
47513 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47514 
processcolor::_internal::convert47515 	static void process
47516 	(
47517 		container_left_input_type left
47518 		,container_right_const_input_type right
47519 	) {
47520 		left = hsv_model_type(rgb_model_type(xyz_model_type(lms_model_type(right)))).container();
47521 	}
47522 };
47523 
47524 }
47525 }
47526 
47527 namespace color {
47528 namespace _internal {
47529 
47530 template
47531 <
47532 	typename hsv_tag_name
47533 	,typename luv_tag_name
47534 	>
47535 struct convert
47536 	<
47537 	::color::category::hsv< hsv_tag_name >
47538 	,::color::category::luv< luv_tag_name >
47539 	> {
47540 public:
47541 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_left_type;
47542 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
47543 
47544 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47545 
47546 	typedef ::color::model< hsv_category_type > hsv_model_type;
47547 	typedef ::color::model< luv_category_type > luv_model_type;
47548 
47549 	typedef ::color::rgb< scalar_type > rgb_model_type;
47550 	typedef ::color::xyz< scalar_type > xyz_model_type;
47551 
47552 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47553 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47554 
47555 	typedef typename container_left_trait_type::input_type container_left_input_type;
47556 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47557 
processcolor::_internal::convert47558 	static void process
47559 	(
47560 		container_left_input_type left
47561 		,container_right_const_input_type right
47562 	) {
47563 		left = hsv_model_type(rgb_model_type(xyz_model_type(luv_model_type(right)))).container();
47564 	}
47565 };
47566 
47567 }
47568 }
47569 
47570 namespace color {
47571 namespace _internal {
47572 
47573 template
47574 <
47575 	typename hsv_tag_name
47576 	,typename LabCH_tag_name
47577 	>
47578 struct convert
47579 	<
47580 	::color::category::hsv< hsv_tag_name >
47581 	,::color::category::LabCH< LabCH_tag_name >
47582 	> {
47583 public:
47584 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_left_type;
47585 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
47586 
47587 	typedef typename ::color::trait::scalar< hsv_category_type >::instance_type scalar_type;
47588 
47589 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
47590 	typedef ::color::model< hsv_category_type > hsv_model_type;
47591 
47592 	typedef ::color::lab< scalar_type > lab_model_type;
47593 	typedef ::color::xyz< scalar_type > xyz_model_type;
47594 	typedef ::color::rgb< scalar_type > rgb_model_type;
47595 
47596 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47597 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47598 
47599 	typedef typename container_left_trait_type::input_type container_left_input_type;
47600 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47601 
processcolor::_internal::convert47602 	static void process
47603 	(
47604 		container_left_input_type left
47605 		,container_right_const_input_type right
47606 	) {
47607 		left = hsv_model_type(rgb_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right))))).container();
47608 	}
47609 };
47610 
47611 }
47612 }
47613 
47614 namespace color {
47615 namespace _internal {
47616 
47617 template
47618 <
47619 	typename hsv_tag_name
47620 	,typename LuvCH_tag_name
47621 	>
47622 struct convert
47623 	<
47624 	::color::category::hsv< hsv_tag_name >
47625 	,::color::category::LuvCH< LuvCH_tag_name >
47626 	> {
47627 public:
47628 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_left_type;
47629 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
47630 
47631 	typedef typename ::color::trait::scalar< hsv_category_type >::instance_type scalar_type;
47632 
47633 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
47634 	typedef ::color::model< hsv_category_type > hsv_model_type;
47635 
47636 	typedef ::color::luv< scalar_type > luv_model_type;
47637 	typedef ::color::xyz< scalar_type > xyz_model_type;
47638 	typedef ::color::rgb< scalar_type > rgb_model_type;
47639 
47640 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47641 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47642 
47643 	typedef typename container_left_trait_type::input_type container_left_input_type;
47644 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47645 
processcolor::_internal::convert47646 	static void process
47647 	(
47648 		container_left_input_type left
47649 		,container_right_const_input_type right
47650 	) {
47651 		left = hsv_model_type(rgb_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right))))).container();
47652 	}
47653 };
47654 
47655 }
47656 }
47657 
47658 namespace color {
47659 namespace _internal {
47660 
47661 template< typename hsl_tag_name, typename hsv_tag_name >
47662 struct convert
47663 	<
47664 	::color::category::hsl< hsl_tag_name >
47665 	,::color::category::hsv< hsv_tag_name >
47666 	> {
47667 public:
47668 	typedef ::color::category::hsl< hsl_tag_name > category_left_type;
47669 	typedef ::color::category::hsv< hsv_tag_name > category_right_type;
47670 
47671 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47672 	typedef ::color::trait::scalar<category_left_type> scalar_trait_type;
47673 
47674 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47675 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47676 
47677 	typedef typename container_left_trait_type::input_type container_left_input_type;
47678 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47679 
47680 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
47681 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
47682 
processcolor::_internal::convert47683 	static void process
47684 	(
47685 		container_left_input_type left
47686 		,container_right_const_input_type right
47687 	) {
47688 		scalar_type h = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
47689 		scalar_type ss = normalize_type::template process<1>(container_right_trait_type::template get<1>(right));
47690 		scalar_type v = normalize_type::template process<2>(container_right_trait_type::template get<2>(right));
47691 		scalar_type l = v * (scalar_type(2) - ss) / scalar_type(2);
47692 		scalar_type s = 0;
47693 		if((false == scalar_trait_type::is_small(l))
47694 		   && (false == scalar_trait_type::is_small(scalar_type(1) - l))
47695 		  ) {
47696 			s = v*ss/(scalar_type(1)- fabs(scalar_type(2) * l - scalar_type(1)));
47697 		}
47698 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(h));
47699 		container_left_trait_type::template set<1>(left, diverse_type::template process<1>(s));
47700 		container_left_trait_type::template set<2>(left, diverse_type::template process<2>(l));
47701 	}
47702 };
47703 
47704 }
47705 }
47706 
47707 namespace color {
47708 namespace _internal {
47709 
47710 template
47711 <
47712 	typename hsl_tag_name
47713 	,typename hsi_tag_name
47714 	>
47715 struct convert
47716 	<
47717 	::color::category::hsl< hsl_tag_name >
47718 	,::color::category::hsi< hsi_tag_name >
47719 	> {
47720 public:
47721 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
47722 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
47723 
47724 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
47725 
47726 	typedef ::color::model< hsl_category_type > hsl_model_type;
47727 	typedef ::color::model< hsi_category_type > hsi_model_type;
47728 
47729 	typedef ::color::rgb< scalar_type > rgb_model_type;
47730 
47731 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47732 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47733 
47734 	typedef typename container_left_trait_type::input_type container_left_input_type;
47735 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47736 
processcolor::_internal::convert47737 	static void process
47738 	(
47739 		container_left_input_type left
47740 		,container_right_const_input_type right
47741 	) {
47742 		left = hsl_model_type(rgb_model_type(hsi_model_type(right))).container();
47743 	}
47744 };
47745 
47746 }
47747 }
47748 
47749 namespace color {
47750 namespace _internal {
47751 
47752 template
47753 <
47754 	typename hsl_tag_name
47755 	,typename hwb_tag_name
47756 	>
47757 struct convert
47758 	<
47759 	::color::category::hsl< hsl_tag_name >
47760 	,::color::category::hwb< hwb_tag_name >
47761 	> {
47762 public:
47763 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
47764 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
47765 
47766 	typedef typename ::color::trait::scalar< hsl_category_type >::instance_type scalar_type;
47767 
47768 	typedef ::color::model< hsl_category_type > hsl_model_type;
47769 	typedef ::color::model< hwb_category_type > hwb_model_type;
47770 
47771 	typedef ::color::rgb< scalar_type > rgb_model_type;
47772 	typedef ::color::hsv< scalar_type > hsv_model_type;
47773 
47774 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47775 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47776 
47777 	typedef typename container_left_trait_type::input_type container_left_input_type;
47778 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47779 
processcolor::_internal::convert47780 	static void process
47781 	(
47782 		container_left_input_type left
47783 		,container_right_const_input_type right
47784 	) {
47785 		left = hsl_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right)))).container();
47786 	}
47787 };
47788 
47789 }
47790 }
47791 
47792 namespace color {
47793 namespace _internal {
47794 
47795 template
47796 <
47797 	typename hsl_tag_name
47798 	,typename rgb_tag_name
47799 	>
47800 struct convert
47801 	<
47802 	::color::category::hsl< hsl_tag_name >
47803 	,::color::category::rgb< rgb_tag_name >
47804 	> {
47805 public:
47806 	typedef ::color::category::hsl< hsl_tag_name > category_left_type;
47807 	typedef ::color::category::rgb< rgb_tag_name > category_right_type;
47808 
47809 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47810 
47811 	typedef ::color::trait::scalar<category_left_type> scalar_trait_type;
47812 
47813 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47814 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47815 
47816 	typedef typename container_left_trait_type::input_type container_left_input_type;
47817 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47818 
47819 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
47820 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
47821 
47822 	enum {
47823 		hue_p = ::color::place::_internal::hue<category_left_type>::position_enum
47824 		,saturation_p = ::color::place::_internal::saturation<category_left_type>::position_enum
47825 		, lightness_p = ::color::place::_internal::lightness<category_left_type>::position_enum
47826 	};
47827 
47828 	enum {
47829 		red_p = ::color::place::_internal::red<category_right_type>::position_enum
47830 		,green_p = ::color::place::_internal::green<category_right_type>::position_enum
47831 		,blue_p = ::color::place::_internal::blue<category_right_type>::position_enum
47832 	};
47833 
processcolor::_internal::convert47834 	static void process
47835 	(
47836 		container_left_input_type left
47837 		,container_right_const_input_type right
47838 	) {
47839 		scalar_type r = normalize_type::template process<red_p >(container_right_trait_type::template get<red_p >(right));
47840 		scalar_type g = normalize_type::template process<green_p>(container_right_trait_type::template get<green_p>(right));
47841 		scalar_type b = normalize_type::template process<blue_p >(container_right_trait_type::template get<blue_p >(right));
47842 		const scalar_type hi = std::max<scalar_type>({ r, g, b });
47843 		const scalar_type lo = std::min<scalar_type>({ r, g, b });
47844 		scalar_type delta = hi - lo;
47845 		scalar_type h = 0;
47846 		scalar_type s = 0;
47847 		scalar_type l = (hi + lo) / scalar_type(2);
47848 		if(false == scalar_trait_type::is_small(delta)) {
47849 			s = delta / (1 - fabs(2*l - 1));
47850 			if(hi == r) {
47851 				h = (scalar_type(60)/scalar_type(360)) * (g - b) / delta + (g < b ? scalar_type(1) : scalar_type(0));
47852 			}
47853 			if(hi == g) {
47854 				h = (scalar_type(60)/scalar_type(360)) * (b - r) / delta + (scalar_type(120)/scalar_type(360));
47855 			}
47856 			if(hi == b) {
47857 				h = (scalar_type(60)/scalar_type(360)) * (r - g) / delta + (scalar_type(240)/scalar_type(360));
47858 			}
47859 		}
47860 		container_left_trait_type::template set< hue_p>(left, diverse_type::template process< hue_p>(h));
47861 		container_left_trait_type::template set<saturation_p>(left, diverse_type::template process<saturation_p>(s));
47862 		container_left_trait_type::template set< lightness_p>(left, diverse_type::template process< lightness_p>(l));
47863 	}
47864 };
47865 
47866 }
47867 }
47868 
47869 namespace color {
47870 namespace _internal {
47871 
47872 template
47873 <
47874 	typename hsl_tag_name
47875 	,typename yiq_tag_name
47876 	>
47877 struct convert
47878 	<
47879 	::color::category::hsl< hsl_tag_name >
47880 	,::color::category::yiq< yiq_tag_name >
47881 	> {
47882 public:
47883 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
47884 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
47885 
47886 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
47887 
47888 	typedef ::color::model< hsl_category_type > hsl_model_type;
47889 	typedef ::color::model< yiq_category_type > yiq_model_type;
47890 
47891 	typedef ::color::rgb< scalar_type > rgb_model_type;
47892 
47893 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47894 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47895 
47896 	typedef typename container_left_trait_type::input_type container_left_input_type;
47897 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47898 
processcolor::_internal::convert47899 	static void process
47900 	(
47901 		container_left_input_type left
47902 		,container_right_const_input_type right
47903 	) {
47904 		left = hsl_model_type(rgb_model_type(yiq_model_type(right))).container();
47905 	}
47906 };
47907 
47908 }
47909 }
47910 
47911 namespace color {
47912 namespace _internal {
47913 
47914 template
47915 <
47916 	typename hsl_tag_name
47917 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum reference_number
47918 	>
47919 struct convert
47920 	<
47921 	::color::category::hsl< hsl_tag_name >
47922 	,::color::category::yuv< yuv_tag_name, reference_number >
47923 	> {
47924 public:
47925 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
47926 	typedef ::color::category::yuv< yuv_tag_name, reference_number > yuv_category_type, category_right_type;
47927 
47928 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
47929 
47930 	typedef ::color::model< hsl_category_type > hsl_model_type;
47931 	typedef ::color::model< yuv_category_type > yuv_model_type;
47932 
47933 	typedef ::color::rgb< scalar_type > rgb_model_type;
47934 
47935 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47936 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47937 
47938 	typedef typename container_left_trait_type::input_type container_left_input_type;
47939 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47940 
processcolor::_internal::convert47941 	static void process
47942 	(
47943 		container_left_input_type left
47944 		,container_right_const_input_type right
47945 	) {
47946 		left = hsl_model_type(rgb_model_type(yuv_model_type(right))).container();
47947 	}
47948 };
47949 
47950 }
47951 }
47952 
47953 namespace color {
47954 namespace _internal {
47955 
47956 template< typename hsl_tag_name, typename YCgCo_tag_name >
47957 struct convert
47958 	<
47959 	::color::category::hsl< hsl_tag_name >
47960 	,::color::category::YCgCo< YCgCo_tag_name >
47961 	> {
47962 public:
47963 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
47964 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
47965 
47966 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
47967 
47968 	typedef ::color::model< hsl_category_type > hsl_model_type;
47969 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
47970 
47971 	typedef ::color::rgb< scalar_type > rgb_model_type;
47972 
47973 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
47974 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
47975 
47976 	typedef typename container_left_trait_type::input_type container_left_input_type;
47977 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
47978 
processcolor::_internal::convert47979 	static void process
47980 	(
47981 		container_left_input_type left
47982 		,container_right_const_input_type right
47983 	) {
47984 		left = hsl_model_type(rgb_model_type(YCgCo_model_type(right))).container();
47985 	}
47986 };
47987 
47988 }
47989 }
47990 
47991 namespace color {
47992 namespace _internal {
47993 
47994 template< typename hsl_tag_name, typename YDbDr_tag_name >
47995 struct convert
47996 	<
47997 	::color::category::hsl< hsl_tag_name >
47998 	,::color::category::YDbDr< YDbDr_tag_name >
47999 	> {
48000 public:
48001 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
48002 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
48003 
48004 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
48005 
48006 	typedef ::color::model< hsl_category_type > hsl_model_type;
48007 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
48008 
48009 	typedef ::color::rgb< scalar_type > rgb_model_type;
48010 
48011 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48012 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48013 
48014 	typedef typename container_left_trait_type::input_type container_left_input_type;
48015 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48016 
processcolor::_internal::convert48017 	static void process
48018 	(
48019 		container_left_input_type left
48020 		,container_right_const_input_type right
48021 	) {
48022 		left = hsl_model_type(rgb_model_type(YDbDr_model_type(right))).container();
48023 	}
48024 };
48025 
48026 }
48027 }
48028 
48029 namespace color {
48030 namespace _internal {
48031 
48032 template
48033 <
48034 	typename hsl_tag_name
48035 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
48036 	>
48037 struct convert
48038 	<
48039 	::color::category::hsl< hsl_tag_name >
48040 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
48041 	> {
48042 public:
48043 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
48044 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_right_type;
48045 
48046 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
48047 
48048 	typedef ::color::model< hsl_category_type > hsl_model_type;
48049 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
48050 
48051 	typedef ::color::rgb< scalar_type > rgb_model_type;
48052 
48053 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48054 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48055 
48056 	typedef typename container_left_trait_type::input_type container_left_input_type;
48057 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48058 
processcolor::_internal::convert48059 	static void process
48060 	(
48061 		container_left_input_type left
48062 		,container_right_const_input_type right
48063 	) {
48064 		left = hsl_model_type(rgb_model_type(YPbPr_model_type(right))).container();
48065 	}
48066 };
48067 
48068 }
48069 }
48070 
48071 namespace color {
48072 namespace _internal {
48073 
48074 template< typename hsl_tag_name, typename xyz_tag_name >
48075 struct convert
48076 	<
48077 	::color::category::hsl< hsl_tag_name >
48078 	,::color::category::xyz< xyz_tag_name >
48079 	> {
48080 public:
48081 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
48082 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
48083 
48084 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
48085 
48086 	typedef ::color::model< hsl_category_type > hsl_model_type;
48087 	typedef ::color::model< xyz_category_type > xyz_model_type;
48088 
48089 	typedef ::color::rgb< scalar_type > rgb_model_type;
48090 
48091 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48092 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48093 
48094 	typedef typename container_left_trait_type::input_type container_left_input_type;
48095 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48096 
processcolor::_internal::convert48097 	static void process
48098 	(
48099 		container_left_input_type left
48100 		,container_right_const_input_type right
48101 	) {
48102 		left = hsl_model_type(rgb_model_type(xyz_model_type(right))).container();
48103 	}
48104 };
48105 
48106 }
48107 }
48108 
48109 namespace color {
48110 namespace _internal {
48111 
48112 template
48113 <
48114 	typename hsl_tag_name
48115 	,typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
48116 	>
48117 struct convert
48118 	<
48119 	::color::category::hsl< hsl_tag_name >
48120 	,::color::category::lab< lab_tag_name, lab_reference_number >
48121 	> {
48122 public:
48123 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
48124 	typedef ::color::category::lab< lab_tag_name, lab_reference_number > lab_category_type, category_right_type;
48125 
48126 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
48127 
48128 	typedef ::color::model< hsl_category_type > hsl_model_type;
48129 	typedef ::color::model< lab_category_type > lab_model_type;
48130 
48131 	typedef ::color::rgb< scalar_type > rgb_model_type;
48132 	typedef ::color::xyz< scalar_type > xyz_model_type;
48133 
48134 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48135 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48136 
48137 	typedef typename container_left_trait_type::input_type container_left_input_type;
48138 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48139 
processcolor::_internal::convert48140 	static void process
48141 	(
48142 		container_left_input_type left
48143 		,container_right_const_input_type right
48144 	) {
48145 		left = hsl_model_type(rgb_model_type(xyz_model_type(lab_model_type(right)))).container();
48146 	}
48147 };
48148 
48149 }
48150 }
48151 
48152 namespace color {
48153 namespace _internal {
48154 
48155 template
48156 <
48157 	typename hsl_tag_name
48158 	,typename xyy_tag_name
48159 	>
48160 struct convert
48161 	<
48162 	::color::category::hsl< hsl_tag_name >
48163 	,::color::category::xyy< xyy_tag_name >
48164 	> {
48165 public:
48166 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
48167 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
48168 
48169 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
48170 
48171 	typedef ::color::model< hsl_category_type > hsl_model_type;
48172 	typedef ::color::model< xyy_category_type > xyy_model_type;
48173 
48174 	typedef ::color::rgb< scalar_type > rgb_model_type;
48175 	typedef ::color::xyz< scalar_type > xyz_model_type;
48176 
48177 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48178 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48179 
48180 	typedef typename container_left_trait_type::input_type container_left_input_type;
48181 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48182 
processcolor::_internal::convert48183 	static void process
48184 	(
48185 		container_left_input_type left
48186 		,container_right_const_input_type right
48187 	) {
48188 		left = hsl_model_type(rgb_model_type(xyz_model_type(xyy_model_type(right)))).container();
48189 	}
48190 };
48191 
48192 }
48193 }
48194 
48195 namespace color {
48196 namespace _internal {
48197 
48198 template
48199 <
48200 	typename hsl_tag_name
48201 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
48202 	>
48203 struct convert
48204 	<
48205 	::color::category::hsl< hsl_tag_name >
48206 	,::color::category::lms< lms_tag_name, lms_reference_number >
48207 	> {
48208 public:
48209 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
48210 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
48211 
48212 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
48213 
48214 	typedef ::color::model< hsl_category_type > hsl_model_type;
48215 	typedef ::color::model< lms_category_type > lms_model_type;
48216 
48217 	typedef ::color::rgb< scalar_type > rgb_model_type;
48218 	typedef ::color::xyz< scalar_type > xyz_model_type;
48219 
48220 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48221 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48222 
48223 	typedef typename container_left_trait_type::input_type container_left_input_type;
48224 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48225 
processcolor::_internal::convert48226 	static void process
48227 	(
48228 		container_left_input_type left
48229 		,container_right_const_input_type right
48230 	) {
48231 		left = hsl_model_type(rgb_model_type(xyz_model_type(lms_model_type(right)))).container();
48232 	}
48233 };
48234 
48235 }
48236 }
48237 
48238 namespace color {
48239 namespace _internal {
48240 
48241 template
48242 <
48243 	typename hsl_tag_name
48244 	,typename luv_tag_name
48245 	>
48246 struct convert
48247 	<
48248 	::color::category::hsl< hsl_tag_name >
48249 	,::color::category::luv< luv_tag_name >
48250 	> {
48251 public:
48252 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
48253 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
48254 
48255 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
48256 
48257 	typedef ::color::model< hsl_category_type > hsl_model_type;
48258 	typedef ::color::model< luv_category_type > luv_model_type;
48259 
48260 	typedef ::color::rgb< scalar_type > rgb_model_type;
48261 	typedef ::color::xyz< scalar_type > xyz_model_type;
48262 
48263 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48264 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48265 
48266 	typedef typename container_left_trait_type::input_type container_left_input_type;
48267 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48268 
processcolor::_internal::convert48269 	static void process
48270 	(
48271 		container_left_input_type left
48272 		,container_right_const_input_type right
48273 	) {
48274 		left = hsl_model_type(rgb_model_type(xyz_model_type(luv_model_type(right)))).container();
48275 	}
48276 };
48277 
48278 }
48279 }
48280 
48281 namespace color {
48282 namespace _internal {
48283 
48284 template
48285 <
48286 	typename hsl_tag_name
48287 	,typename LabCH_tag_name
48288 	>
48289 struct convert
48290 	<
48291 	::color::category::hsl< hsl_tag_name >
48292 	,::color::category::LabCH< LabCH_tag_name >
48293 	> {
48294 public:
48295 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
48296 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
48297 
48298 	typedef typename ::color::trait::scalar< hsl_category_type >::instance_type scalar_type;
48299 
48300 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
48301 	typedef ::color::model< hsl_category_type > hsl_model_type;
48302 
48303 	typedef ::color::lab< scalar_type > lab_model_type;
48304 	typedef ::color::xyz< scalar_type > xyz_model_type;
48305 	typedef ::color::rgb< scalar_type > rgb_model_type;
48306 
48307 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48308 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48309 
48310 	typedef typename container_left_trait_type::input_type container_left_input_type;
48311 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48312 
processcolor::_internal::convert48313 	static void process
48314 	(
48315 		container_left_input_type left
48316 		,container_right_const_input_type right
48317 	) {
48318 		left = hsl_model_type(rgb_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right))))).container();
48319 	}
48320 };
48321 
48322 }
48323 }
48324 
48325 namespace color {
48326 namespace _internal {
48327 
48328 template
48329 <
48330 	typename hsl_tag_name
48331 	,typename LuvCH_tag_name
48332 	>
48333 struct convert
48334 	<
48335 	::color::category::hsl< hsl_tag_name >
48336 	,::color::category::LuvCH< LuvCH_tag_name >
48337 	> {
48338 public:
48339 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type;
48340 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
48341 
48342 	typedef typename ::color::trait::scalar< hsl_category_type >::instance_type scalar_type;
48343 
48344 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
48345 	typedef ::color::model< hsl_category_type > hsl_model_type;
48346 
48347 	typedef ::color::luv< scalar_type > luv_model_type;
48348 	typedef ::color::xyz< scalar_type > xyz_model_type;
48349 	typedef ::color::rgb< scalar_type > rgb_model_type;
48350 
48351 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48352 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48353 
48354 	typedef typename container_left_trait_type::input_type container_left_input_type;
48355 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48356 
processcolor::_internal::convert48357 	static void process
48358 	(
48359 		container_left_input_type left
48360 		,container_right_const_input_type right
48361 	) {
48362 		left = hsl_model_type(rgb_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right))))).container();
48363 	}
48364 };
48365 
48366 }
48367 }
48368 
48369 namespace color {
48370 namespace _internal {
48371 
48372 template< typename rgb_tag_name, typename hsl_tag_name >
48373 struct convert
48374 	<
48375 	::color::category::rgb< rgb_tag_name >
48376 	,::color::category::hsl<hsl_tag_name>
48377 	> {
48378 public:
48379 	typedef ::color::category::rgb< rgb_tag_name > category_left_type;
48380 	typedef ::color::category::hsl<hsl_tag_name> category_right_type;
48381 
48382 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
48383 
48384 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48385 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48386 
48387 	typedef typename container_left_trait_type::input_type container_left_input_type;
48388 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48389 
48390 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
48391 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
48392 
48393 	typedef ::color::_internal::convert< category_left_type, category_right_type > this_type;
48394 
48395 	enum {
48396 		red_p = ::color::place::_internal::red<category_left_type>::position_enum
48397 		,green_p = ::color::place::_internal::green<category_left_type>::position_enum
48398 		,blue_p = ::color::place::_internal::blue<category_left_type>::position_enum
48399 	};
48400 
48401 	enum {
48402 		hue_p = ::color::place::_internal::hue<category_right_type>::position_enum
48403 		,saturation_p = ::color::place::_internal::saturation<category_right_type>::position_enum
48404 		,lightness_p = ::color::place::_internal::lightness<category_right_type>::position_enum
48405 	};
48406 
processcolor::_internal::convert48407 	static void process
48408 	(
48409 		container_left_input_type left
48410 		,container_right_const_input_type right
48411 	) {
48412 		scalar_type h = normalize_type::template process<hue_p >(container_right_trait_type::template get<hue_p >(right));
48413 		scalar_type s = normalize_type::template process<saturation_p>(container_right_trait_type::template get<saturation_p>(right));
48414 		scalar_type l = normalize_type::template process<lightness_p >(container_right_trait_type::template get<lightness_p >(right));
48415 		scalar_type r;
48416 		scalar_type g;
48417 		scalar_type b;
48418 		if(s == 0) {
48419 			r = l;
48420 			g = l;
48421 			b = l;
48422 		} else {
48423 			scalar_type q = l < scalar_type(0.5) ? (l * (1 + s)) : (l + s - l * s);
48424 			scalar_type p = scalar_type(2) * l - q;
48425 			r = this_type::value(p, q, h + (scalar_type(1) / scalar_type(3)) + (scalar_type(2) / scalar_type(3) < h ? -1 :0));
48426 			g = this_type::value(p, q, h);
48427 			b = this_type::value(p, q, h - (scalar_type(1) / scalar_type(3)) + (h < scalar_type(1) / scalar_type(3) ? +1 :0));
48428 		}
48429 		container_left_trait_type::template set<red_p >(left, diverse_type::template process<red_p >(r));
48430 		container_left_trait_type::template set<green_p>(left, diverse_type::template process<green_p>(g));
48431 		container_left_trait_type::template set<blue_p >(left, diverse_type::template process<blue_p >(b));
48432 	}
48433 
48434 private:
valuecolor::_internal::convert48435 	static scalar_type value(scalar_type const& p, scalar_type const& q, scalar_type const& t) {
48436 		if(t < scalar_type(1)/scalar_type(6)) {
48437 			return (p + (q - p) * scalar_type(6) * t);
48438 		}
48439 		if(t < scalar_type(1)/scalar_type(2)) {
48440 			return (q);
48441 		}
48442 		if(t < scalar_type(2)/scalar_type(3)) {
48443 			return (p + (q - p) * ((scalar_type(2)/scalar_type(3)) - t) * scalar_type(6));
48444 		}
48445 		return p ;
48446 	}
48447 };
48448 
48449 }
48450 }
48451 
48452 namespace color {
48453 namespace _internal {
48454 
48455 template< typename rgb_tag_name, typename hsv_tag_name >
48456 struct convert
48457 	<
48458 	::color::category::rgb< rgb_tag_name >
48459 	,::color::category::hsv< hsv_tag_name >
48460 	> {
48461 public:
48462 	typedef ::color::category::rgb< rgb_tag_name > category_left_type;
48463 	typedef ::color::category::hsv< hsv_tag_name > category_right_type;
48464 
48465 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
48466 
48467 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48468 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48469 
48470 	typedef typename container_left_trait_type::input_type container_left_input_type;
48471 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48472 
48473 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
48474 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
48475 
48476 	enum {
48477 		red_p = ::color::place::_internal::red<category_left_type>::position_enum
48478 		,green_p = ::color::place::_internal::green<category_left_type>::position_enum
48479 		,blue_p = ::color::place::_internal::blue<category_left_type>::position_enum
48480 	};
48481 
48482 	enum {
48483 		hue_p = ::color::place::_internal::hue<category_right_type>::position_enum
48484 		,saturation_p = ::color::place::_internal::saturation<category_right_type>::position_enum
48485 		,value_p = ::color::place::_internal::value<category_right_type>::position_enum
48486 	};
48487 
processcolor::_internal::convert48488 	static void process
48489 	(
48490 		container_left_input_type left
48491 		,container_right_const_input_type right
48492 	) {
48493 		scalar_type h = normalize_type::template process<hue_p >(container_right_trait_type::template get<hue_p >(right));
48494 		scalar_type s = normalize_type::template process<saturation_p>(container_right_trait_type::template get<saturation_p>(right));
48495 		scalar_type v = normalize_type::template process<value_p >(container_right_trait_type::template get<value_p >(right));
48496 		int region = int(6 * h);
48497 		scalar_type f = h * 6 - region ;
48498 		scalar_type p = v * (1 - s);
48499 		scalar_type q = v * (1 - f * s);
48500 		scalar_type t = v * (1 - (1 - f) * s);
48501 		scalar_type r;
48502 		scalar_type g;
48503 		scalar_type b;
48504 		switch(region % 6) {
48505 		case 0:
48506 			r = v, g = t, b = p;
48507 			break;
48508 		case 1:
48509 			r = q, g = v, b = p;
48510 			break;
48511 		case 2:
48512 			r = p, g = v, b = t;
48513 			break;
48514 		case 3:
48515 			r = p, g = q, b = v;
48516 			break;
48517 		case 4:
48518 			r = t, g = p, b = v;
48519 			break;
48520 		case 5:
48521 			r = v, g = p, b = q;
48522 			break;
48523 		}
48524 		container_left_trait_type::template set<red_p >(left, diverse_type::template process<red_p >(r));
48525 		container_left_trait_type::template set<green_p>(left, diverse_type::template process<green_p>(g));
48526 		container_left_trait_type::template set<blue_p >(left, diverse_type::template process<blue_p >(b));
48527 	}
48528 };
48529 
48530 }
48531 }
48532 
48533 namespace color {
48534 namespace _internal {
48535 
48536 template< typename rgb_tag_name, typename hsi_tag_name >
48537 struct convert
48538 	<
48539 	::color::category::rgb< rgb_tag_name >
48540 	,::color::category::hsi< hsi_tag_name >
48541 	> {
48542 public:
48543 	typedef ::color::category::rgb< rgb_tag_name > category_left_type;
48544 	typedef ::color::category::hsi< hsi_tag_name > category_right_type;
48545 
48546 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
48547 
48548 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48549 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48550 
48551 	typedef typename container_left_trait_type::input_type container_left_input_type;
48552 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48553 
48554 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
48555 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
48556 
48557 	typedef ::color::constant::generic< category_left_type > constant_type;
48558 
48559 	enum {
48560 		red_p = ::color::place::_internal::red<category_left_type>::position_enum
48561 		,green_p = ::color::place::_internal::green<category_left_type>::position_enum
48562 		,blue_p = ::color::place::_internal::blue<category_left_type>::position_enum
48563 	};
48564 
48565 	enum {
48566 		hue_p = ::color::place::_internal::hue<category_right_type>::position_enum
48567 		,saturation_p = ::color::place::_internal::saturation<category_right_type>::position_enum
48568 		,intensity_p = ::color::place::_internal::intensity<category_right_type>::position_enum
48569 	};
48570 
processcolor::_internal::convert48571 	static void process
48572 	(
48573 		container_left_input_type left
48574 		,container_right_const_input_type right
48575 	) {
48576 		scalar_type h = normalize_type::template process<hue_p >(container_right_trait_type::template get<hue_p >(right));
48577 		scalar_type s = normalize_type::template process<saturation_p>(container_right_trait_type::template get<saturation_p>(right));
48578 		scalar_type i = normalize_type::template process<intensity_p >(container_right_trait_type::template get<intensity_p >(right));
48579 		scalar_type min = i * (1 - s);
48580 		int region = int(3 * h);
48581 		h -= scalar_type(region) * constant_type::third();
48582 		h *= constant_type::two_pi();
48583 		scalar_type n = i*(scalar_type(1) + s * cos(h) / cos(constant_type::deg60() - h));
48584 		scalar_type r;
48585 		scalar_type g;
48586 		scalar_type b;
48587 		switch(region % 3) {
48588 		case 0:
48589 			r = n;
48590 			b = min;
48591 			g = scalar_type(3)*i - (r+b);
48592 			break;
48593 		case 1:
48594 			g = n;
48595 			r = min;
48596 			b = scalar_type(3)*i - (r+g);
48597 			break;
48598 		case 2:
48599 			b = n;
48600 			g = min;
48601 			r = scalar_type(3)*i - (g+b);
48602 			break;
48603 		}
48604 		container_left_trait_type::template set<red_p >(left, diverse_type::template process<red_p >(r));
48605 		container_left_trait_type::template set<green_p>(left, diverse_type::template process<green_p>(g));
48606 		container_left_trait_type::template set<blue_p >(left, diverse_type::template process<blue_p >(b));
48607 	}
48608 };
48609 
48610 }
48611 }
48612 
48613 namespace color {
48614 namespace _internal {
48615 
48616 template< typename rgb_tag_name, typename hwb_tag_name >
48617 struct convert
48618 	<
48619 	::color::category::rgb< rgb_tag_name >
48620 	,::color::category::hwb< hwb_tag_name >
48621 	> {
48622 public:
48623 	typedef ::color::category::rgb< rgb_tag_name > rgb_category_type, category_left_type;
48624 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
48625 
48626 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
48627 
48628 	typedef ::color::model< rgb_category_type > rgb_model_type;
48629 	typedef ::color::model< hwb_category_type > hwb_model_type;
48630 
48631 	typedef ::color::hsv< scalar_type > hsv_model_type;
48632 
48633 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48634 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48635 
48636 	typedef typename container_left_trait_type::input_type container_left_input_type;
48637 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48638 
processcolor::_internal::convert48639 	static void process
48640 	(
48641 		container_left_input_type left
48642 		,container_right_const_input_type right
48643 	) {
48644 		left = rgb_model_type(hsv_model_type(hwb_model_type(right))).container();
48645 	}
48646 };
48647 
48648 }
48649 }
48650 
48651 namespace color {
48652 namespace _internal {
48653 
48654 template< typename tag_left_name, typename tag_right_name >
48655 struct convert
48656 	<
48657 	::color::category::rgb< tag_left_name >
48658 	,::color::category::rgb< tag_right_name>
48659 	> {
48660 public:
48661 	typedef ::color::category::rgb< tag_left_name > category_left_type;
48662 	typedef ::color::category::rgb< tag_right_name> category_right_type;
48663 
48664 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48665 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48666 
48667 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
48668 
48669 	typedef typename container_left_trait_type::input_type container_left_input_type;
48670 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48671 
processcolor::_internal::convert48672 	static void process
48673 	(
48674 		container_left_input_type left
48675 		,container_right_const_input_type right
48676 	) {
48677 		enum {
48678 			rl = ::color::place::_internal::red<category_left_type>::position_enum
48679 			,gl = ::color::place::_internal::green<category_left_type>::position_enum
48680 			,bl = ::color::place::_internal::blue<category_left_type>::position_enum
48681 			,rr = ::color::place::_internal::red<category_right_type>::position_enum
48682 			,gr = ::color::place::_internal::green<category_right_type>::position_enum
48683 			,br = ::color::place::_internal::blue<category_right_type>::position_enum
48684 		};
48685 		container_left_trait_type::template set<rl>(left, reformat_type::template process<rl,rr>(container_right_trait_type::template get<rr>(right)));
48686 		container_left_trait_type::template set<gl>(left, reformat_type::template process<gl,gr>(container_right_trait_type::template get<gr>(right)));
48687 		container_left_trait_type::template set<bl>(left, reformat_type::template process<bl,br>(container_right_trait_type::template get<br>(right)));
48688 	}
48689 };
48690 }
48691 }
48692 
48693 namespace color {
48694 namespace _internal {
48695 
48696 template< typename rgb_tag_name, typename yiq_tag_name >
48697 struct convert
48698 	<
48699 	::color::category::rgb< rgb_tag_name >
48700 	,::color::category::yiq<yiq_tag_name>
48701 	> {
48702 public:
48703 	typedef ::color::category::rgb< rgb_tag_name > category_left_type;
48704 	typedef ::color::category::yiq<yiq_tag_name> category_right_type;
48705 
48706 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
48707 
48708 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48709 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48710 
48711 	typedef typename container_left_trait_type::input_type container_left_input_type;
48712 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48713 
48714 	typedef ::color::constant::yiq< category_right_type > yiq_const_type;
48715 
48716 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
48717 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
48718 
48719 	enum {
48720 		red_p = ::color::place::_internal::red<category_left_type>::position_enum
48721 		,green_p = ::color::place::_internal::green<category_left_type>::position_enum
48722 		,blue_p = ::color::place::_internal::blue<category_left_type>::position_enum
48723 	};
48724 
48725 	enum {
48726 		luma_p = ::color::place::_internal::luma<category_right_type>::position_enum
48727 		, inphase_p = ::color::place::_internal::inphase<category_right_type>::position_enum
48728 		,quadrature_p = ::color::place::_internal::quadrature<category_right_type>::position_enum
48729 	};
48730 
processcolor::_internal::convert48731 	static void process
48732 	(
48733 		container_left_input_type left
48734 		,container_right_const_input_type right
48735 	) {
48736 		static scalar_type a11 = yiq_const_type::a11(), a12 = yiq_const_type::a12(), a13 = yiq_const_type::a13();
48737 		static scalar_type a21 = yiq_const_type::a21(), a22 = yiq_const_type::a22(), a23 = yiq_const_type::a23();
48738 		static scalar_type a31 = yiq_const_type::a31(), a32 = yiq_const_type::a32(), a33 = yiq_const_type::a33();
48739 		scalar_type y = normalize_type::template process< luma_p>(container_right_trait_type::template get< luma_p>(right));
48740 		scalar_type i = normalize_type::template process< inphase_p>(container_right_trait_type::template get< inphase_p>(right));
48741 		scalar_type q = normalize_type::template process<quadrature_p>(container_right_trait_type::template get<quadrature_p>(right));
48742 		i = yiq_const_type::i_diverse(i);
48743 		q = yiq_const_type::q_diverse(q);
48744 		scalar_type r = a11 * y + a12 * i + a13 * q;
48745 		scalar_type g = a21 * y + a22 * i + a23 * q;
48746 		scalar_type b = a31 * y + a32 * i + a33 * q;
48747 		container_left_trait_type::template set<red_p >(left, diverse_type::template process<red_p >(r));
48748 		container_left_trait_type::template set<green_p>(left, diverse_type::template process<green_p>(g));
48749 		container_left_trait_type::template set<blue_p >(left, diverse_type::template process<blue_p >(b));
48750 	}
48751 };
48752 
48753 }
48754 }
48755 
48756 namespace color {
48757 namespace _internal {
48758 
48759 template
48760 <
48761 	typename rgb_tag_name
48762 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
48763 	>
48764 struct convert
48765 	<
48766 	::color::category::rgb< rgb_tag_name >
48767 	,::color::category::yuv< yuv_tag_name, yuv_reference_number>
48768 	> {
48769 public:
48770 	typedef ::color::category::rgb< rgb_tag_name > category_left_type;
48771 	typedef ::color::category::yuv<yuv_tag_name, yuv_reference_number> category_right_type;
48772 
48773 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
48774 
48775 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48776 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48777 
48778 	typedef typename container_left_trait_type::input_type container_left_input_type;
48779 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48780 
48781 	typedef ::color::constant::yuv::parameter< yuv_tag_name, yuv_reference_number > yuv_parameter_type;
48782 
48783 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
48784 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
48785 
48786 	enum {
48787 		red_p = ::color::place::_internal::red<category_left_type>::position_enum
48788 		,green_p = ::color::place::_internal::green<category_left_type>::position_enum
48789 		,blue_p = ::color::place::_internal::blue<category_left_type>::position_enum
48790 	};
48791 
processcolor::_internal::convert48792 	static void process
48793 	(
48794 		container_left_input_type left
48795 		,container_right_const_input_type right
48796 	) {
48797 		static scalar_type const Wr = yuv_parameter_type::Wr();
48798 		static scalar_type const Wb = yuv_parameter_type::Wb();
48799 		static scalar_type const Wg = yuv_parameter_type::Wg();
48800 		static scalar_type const Umax = yuv_parameter_type::Umax();
48801 		static scalar_type const Vmax = yuv_parameter_type::Vmax();
48802 		static scalar_type const b11 = 1, b12 = 0, b13 = (1 - Wr) / Vmax;
48803 		static scalar_type const b21 = 1, b22 = - Wb*(1 - Wb) / Umax / Wg, b23 = -Wr*(1 - Wr) / Vmax / Wg;
48804 		static scalar_type const b31 = 1, b32 = ((1 - Wb) / Umax), b33 = 0;
48805 		scalar_type y = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
48806 		scalar_type u = normalize_type::template process<1>(container_right_trait_type::template get<1>(right));
48807 		scalar_type v = normalize_type::template process<2>(container_right_trait_type::template get<2>(right));
48808 		u = (u - scalar_type(0.5)) * scalar_type(2) * Umax;
48809 		v = (v - scalar_type(0.5)) * scalar_type(2) * Vmax;
48810 		scalar_type r = y + v * b13;
48811 		scalar_type g = y + u * b22 + v * b23;
48812 		scalar_type b = y + u * b32;
48813 		container_left_trait_type::template set<red_p >(left, diverse_type::template process<red_p >(r));
48814 		container_left_trait_type::template set<green_p>(left, diverse_type::template process<green_p>(g));
48815 		container_left_trait_type::template set<blue_p >(left, diverse_type::template process<blue_p >(b));
48816 	}
48817 };
48818 
48819 }
48820 }
48821 
48822 namespace color {
48823 namespace _internal {
48824 
48825 template< typename rgb_tag_name, typename YCgCo_tag_name >
48826 struct convert
48827 	<
48828 	::color::category::rgb< rgb_tag_name >
48829 	,::color::category::YCgCo< YCgCo_tag_name>
48830 	> {
48831 public:
48832 	typedef ::color::category::rgb< rgb_tag_name > category_left_type;
48833 	typedef ::color::category::YCgCo<YCgCo_tag_name> category_right_type;
48834 
48835 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
48836 
48837 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48838 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48839 
48840 	typedef typename container_left_trait_type::input_type container_left_input_type;
48841 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48842 
48843 	typedef ::color::constant::YCgCo< category_right_type > YCgCo_const_type;
48844 
48845 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
48846 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
48847 
48848 	enum {
48849 		red_p = ::color::place::_internal::red<category_left_type>::position_enum
48850 		,green_p = ::color::place::_internal::green<category_left_type>::position_enum
48851 		,blue_p = ::color::place::_internal::blue<category_left_type>::position_enum
48852 	};
48853 
processcolor::_internal::convert48854 	static void process
48855 	(
48856 		container_left_input_type left
48857 		,container_right_const_input_type right
48858 	) {
48859 		scalar_type Y = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
48860 		scalar_type Cg = normalize_type::template process<1>(container_right_trait_type::template get<1>(right));
48861 		scalar_type Co = normalize_type::template process<2>(container_right_trait_type::template get<2>(right));
48862 		Cg = YCgCo_const_type::Cg_diverse(Cg);
48863 		Co = YCgCo_const_type::Co_diverse(Co);
48864 		scalar_type r = Y - Cg + Co;
48865 		scalar_type g = Y + Cg;
48866 		scalar_type b = Y - Cg - Co;
48867 		container_left_trait_type::template set<red_p >(left, diverse_type::template process<red_p >(r));
48868 		container_left_trait_type::template set<green_p>(left, diverse_type::template process<green_p>(g));
48869 		container_left_trait_type::template set<blue_p >(left, diverse_type::template process<blue_p >(b));
48870 	}
48871 };
48872 
48873 }
48874 }
48875 
48876 namespace color {
48877 namespace _internal {
48878 
48879 template< typename rgb_tag_name, typename YDbDr_tag_name >
48880 struct convert
48881 	<
48882 	::color::category::rgb< rgb_tag_name >
48883 	,::color::category::YDbDr< YDbDr_tag_name>
48884 	> {
48885 public:
48886 	typedef ::color::category::rgb< rgb_tag_name > category_left_type;
48887 	typedef ::color::category::YDbDr<YDbDr_tag_name> category_right_type;
48888 
48889 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
48890 
48891 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48892 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48893 
48894 	typedef typename container_left_trait_type::input_type container_left_input_type;
48895 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48896 
48897 	typedef ::color::constant::YDbDr< category_right_type > YDbDr_const_type;
48898 
48899 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
48900 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
48901 
48902 	enum {
48903 		red_p = ::color::place::_internal::red<category_left_type>::position_enum
48904 		,green_p = ::color::place::_internal::green<category_left_type>::position_enum
48905 		,blue_p = ::color::place::_internal::blue<category_left_type>::position_enum
48906 	};
48907 
processcolor::_internal::convert48908 	static void process
48909 	(
48910 		container_left_input_type left
48911 		,container_right_const_input_type right
48912 	) {
48913 		static scalar_type const Wr = YDbDr_const_type::Wr();
48914 		static scalar_type const Wb = YDbDr_const_type::Wb();
48915 		static scalar_type const Wg = YDbDr_const_type::Wg();
48916 		static scalar_type const Umax = YDbDr_const_type::Umax();
48917 		static scalar_type const Vmax = YDbDr_const_type::Vmax();
48918 		static scalar_type const b11 = 1, b12 = 0, b13 = (1 - Wr) / Vmax;
48919 		static scalar_type const b21 = 1, b22 = - Wb*(1 - Wb) / Umax / Wg, b23 = -Wr*(1 - Wr) / Vmax / Wg;
48920 		static scalar_type const b31 = 1, b32 = ((1 - Wb) / Umax), b33 = 0;
48921 		scalar_type Y = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
48922 		scalar_type Db = normalize_type::template process<1>(container_right_trait_type::template get<1>(right));
48923 		scalar_type Dr = normalize_type::template process<2>(container_right_trait_type::template get<2>(right));
48924 		scalar_type u = YDbDr_const_type::DB_diverse(Db) / YDbDr_const_type::DB_scale();
48925 		scalar_type v = YDbDr_const_type::DR_diverse(Dr) / YDbDr_const_type::DR_scale();
48926 		scalar_type r = Y + v * b13;
48927 		scalar_type g = Y + u * b22 + v * b23;
48928 		scalar_type b = Y + u * b32;
48929 		container_left_trait_type::template set<red_p >(left, diverse_type::template process<red_p >(r));
48930 		container_left_trait_type::template set<green_p>(left, diverse_type::template process<green_p>(g));
48931 		container_left_trait_type::template set<blue_p >(left, diverse_type::template process<blue_p >(b));
48932 	}
48933 };
48934 
48935 }
48936 }
48937 
48938 namespace color {
48939 namespace _internal {
48940 
48941 template
48942 <
48943 	typename rgb_tag_name
48944 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
48945 	>
48946 struct convert
48947 	<
48948 	::color::category::rgb< rgb_tag_name >
48949 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number>
48950 	> {
48951 public:
48952 	typedef ::color::category::rgb< rgb_tag_name > category_left_type;
48953 	typedef ::color::category::YPbPr<YPbPr_tag_name, YPbPr_reference_number> category_right_type;
48954 
48955 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
48956 
48957 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
48958 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
48959 
48960 	typedef typename container_left_trait_type::input_type container_left_input_type;
48961 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
48962 
48963 	typedef ::color::constant::YPbPr::parameter< YPbPr_tag_name, YPbPr_reference_number > YPbPr_parameter_type;
48964 
48965 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
48966 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
48967 
48968 	enum {
48969 		red_p = ::color::place::_internal::red<category_left_type>::position_enum
48970 		,green_p = ::color::place::_internal::green<category_left_type>::position_enum
48971 		,blue_p = ::color::place::_internal::blue<category_left_type>::position_enum
48972 	};
48973 
processcolor::_internal::convert48974 	static void process
48975 	(
48976 		container_left_input_type left
48977 		,container_right_const_input_type right
48978 	) {
48979 		scalar_type Y = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
48980 		scalar_type Pb = normalize_type::template process<1>(container_right_trait_type::template get<1>(right));
48981 		scalar_type Pr = normalize_type::template process<2>(container_right_trait_type::template get<2>(right));
48982 		Pb = YPbPr_parameter_type::Pb_diverse(Pb);
48983 		Pr = YPbPr_parameter_type::Pr_diverse(Pr);
48984 		scalar_type r = YPbPr_parameter_type::a11() * Y + YPbPr_parameter_type::a12() * Pb + YPbPr_parameter_type::a13() * Pr;
48985 		scalar_type g = YPbPr_parameter_type::a21() * Y + YPbPr_parameter_type::a22() * Pb + YPbPr_parameter_type::a23() * Pr;
48986 		scalar_type b = YPbPr_parameter_type::a31() * Y + YPbPr_parameter_type::a32() * Pb + YPbPr_parameter_type::a33() * Pr;
48987 		container_left_trait_type::template set<red_p >(left, diverse_type::template process<red_p >(r));
48988 		container_left_trait_type::template set<green_p>(left, diverse_type::template process<green_p>(g));
48989 		container_left_trait_type::template set<blue_p >(left, diverse_type::template process<blue_p >(b));
48990 	}
48991 };
48992 
48993 }
48994 }
48995 
48996 namespace color {
48997 namespace _internal {
48998 
48999 template< typename rgb_tag_name, typename xyz_tag_name >
49000 struct convert
49001 	<
49002 	::color::category::rgb< rgb_tag_name >
49003 	,::color::category::xyz<xyz_tag_name>
49004 	> {
49005 public:
49006 	typedef ::color::category::rgb< rgb_tag_name > category_left_type;
49007 	typedef ::color::category::xyz<xyz_tag_name> category_right_type;
49008 
49009 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
49010 
49011 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49012 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49013 
49014 	typedef typename container_left_trait_type::input_type container_left_input_type;
49015 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49016 
49017 	typedef ::color::constant::xyz::transformation::matrix< scalar_type > xyz_matrix_type;
49018 	typedef ::color::constant::xyz::space::gamma< scalar_type, ::color::constant::xyz::space::sRGB_entity > xyz_gamma_type;
49019 	typedef ::color::constant::xyz::adaptation::matrix< scalar_type > xyz_adaptation_type;
49020 
49021 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
49022 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
49023 
49024 	enum {
49025 		red_p = ::color::place::_internal::red<category_left_type>::position_enum
49026 		,green_p = ::color::place::_internal::green<category_left_type>::position_enum
49027 		,blue_p = ::color::place::_internal::blue<category_left_type>::position_enum
49028 	};
49029 
processcolor::_internal::convert49030 	static void process
49031 	(
49032 		container_left_input_type left
49033 		,container_right_const_input_type right
49034 	) {
49035 		static const scalar_type i11 = xyz_matrix_type::i11(), i12 = xyz_matrix_type::i12(), i13 = xyz_matrix_type::i13();
49036 		static const scalar_type i21 = xyz_matrix_type::i21(), i22 = xyz_matrix_type::i22(), i23 = xyz_matrix_type::i23();
49037 		static const scalar_type i31 = xyz_matrix_type::i31(), i32 = xyz_matrix_type::i32(), i33 = xyz_matrix_type::i33();
49038 		scalar_type x = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
49039 		scalar_type y = normalize_type::template process<1>(container_right_trait_type::template get<1>(right));
49040 		scalar_type z = normalize_type::template process<2>(container_right_trait_type::template get<2>(right));
49041 		scalar_type r = i11 * x + i12 * y + i13 * z;
49042 		scalar_type g = i21 * x + i22 * y + i23 * z;
49043 		scalar_type b = i31 * x + i32 * y + i33 * z;
49044 		r = xyz_gamma_type::encode(r);
49045 		g = xyz_gamma_type::encode(g);
49046 		b = xyz_gamma_type::encode(b);
49047 		container_left_trait_type::template set<red_p >(left, diverse_type::template process<red_p >(r));
49048 		container_left_trait_type::template set<green_p>(left, diverse_type::template process<green_p>(g));
49049 		container_left_trait_type::template set<blue_p >(left, diverse_type::template process<blue_p >(b));
49050 	}
49051 };
49052 
49053 }
49054 }
49055 
49056 namespace color {
49057 namespace _internal {
49058 
49059 template
49060 <
49061 	typename rgb_tag_name
49062 	,typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
49063 	>
49064 struct convert
49065 	<
49066 	::color::category::rgb< rgb_tag_name >
49067 	,::color::category::lab< lab_tag_name, lab_reference_number >
49068 	> {
49069 public:
49070 	typedef ::color::category::rgb< rgb_tag_name > rgb_category_type, category_left_type;
49071 	typedef ::color::category::lab< lab_tag_name, lab_reference_number > lab_category_type, category_right_type;
49072 
49073 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
49074 
49075 	typedef ::color::model< rgb_category_type > rgb_model_type;
49076 	typedef ::color::model< lab_category_type > lab_model_type;
49077 
49078 	typedef ::color::xyz< scalar_type > xyz_model_type;
49079 
49080 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49081 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49082 
49083 	typedef typename container_left_trait_type::input_type container_left_input_type;
49084 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49085 
processcolor::_internal::convert49086 	static void process
49087 	(
49088 		container_left_input_type left
49089 		,container_right_const_input_type right
49090 	) {
49091 		left = rgb_model_type(xyz_model_type(lab_model_type(right))).container();
49092 	}
49093 };
49094 
49095 }
49096 }
49097 
49098 namespace color {
49099 namespace _internal {
49100 
49101 template< typename rgb_tag_name, typename xyy_tag_name >
49102 struct convert
49103 	<
49104 	::color::category::rgb< rgb_tag_name >
49105 	,::color::category::xyy< xyy_tag_name >
49106 	> {
49107 public:
49108 	typedef ::color::category::rgb< rgb_tag_name > rgb_category_type, category_left_type;
49109 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
49110 
49111 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
49112 
49113 	typedef ::color::model< rgb_category_type > rgb_model_type;
49114 	typedef ::color::model< xyy_category_type > xyy_model_type;
49115 
49116 	typedef ::color::xyz< scalar_type > xyz_model_type;
49117 
49118 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49119 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49120 
49121 	typedef typename container_left_trait_type::input_type container_left_input_type;
49122 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49123 
processcolor::_internal::convert49124 	static void process
49125 	(
49126 		container_left_input_type left
49127 		,container_right_const_input_type right
49128 	) {
49129 		left = rgb_model_type(xyz_model_type(xyy_model_type(right))).container();
49130 	}
49131 };
49132 
49133 }
49134 }
49135 
49136 namespace color {
49137 namespace _internal {
49138 
49139 template
49140 <
49141 	typename rgb_tag_name
49142 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
49143 	>
49144 struct convert
49145 	<
49146 	::color::category::rgb< rgb_tag_name >
49147 	,::color::category::lms< lms_tag_name, lms_reference_number >
49148 	> {
49149 public:
49150 	typedef ::color::category::rgb< rgb_tag_name > rgb_category_type, category_left_type;
49151 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
49152 
49153 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
49154 
49155 	typedef ::color::model< rgb_category_type > rgb_model_type;
49156 	typedef ::color::model< lms_category_type > lms_model_type;
49157 
49158 	typedef ::color::xyz< scalar_type > xyz_model_type;
49159 
49160 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49161 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49162 
49163 	typedef typename container_left_trait_type::input_type container_left_input_type;
49164 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49165 
processcolor::_internal::convert49166 	static void process
49167 	(
49168 		container_left_input_type left
49169 		,container_right_const_input_type right
49170 	) {
49171 		left = rgb_model_type(xyz_model_type(lms_model_type(right))).container();
49172 	}
49173 };
49174 
49175 }
49176 }
49177 
49178 namespace color {
49179 namespace _internal {
49180 
49181 template< typename rgb_tag_name, typename luv_tag_name >
49182 struct convert
49183 	<
49184 	::color::category::rgb< rgb_tag_name >
49185 	,::color::category::luv< luv_tag_name >
49186 	> {
49187 public:
49188 	typedef ::color::category::rgb< rgb_tag_name > rgb_category_type, category_left_type;
49189 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
49190 
49191 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
49192 
49193 	typedef ::color::model< rgb_category_type > rgb_model_type;
49194 	typedef ::color::model< luv_category_type > luv_model_type;
49195 
49196 	typedef ::color::xyz< scalar_type > xyz_model_type;
49197 
49198 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49199 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49200 
49201 	typedef typename container_left_trait_type::input_type container_left_input_type;
49202 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49203 
processcolor::_internal::convert49204 	static void process
49205 	(
49206 		container_left_input_type left
49207 		,container_right_const_input_type right
49208 	) {
49209 		left = rgb_model_type(xyz_model_type(luv_model_type(right))).container();
49210 	}
49211 };
49212 
49213 }
49214 }
49215 
49216 namespace color {
49217 namespace _internal {
49218 
49219 template
49220 <
49221 	typename rgb_tag_name
49222 	,typename LabCH_tag_name
49223 	>
49224 struct convert
49225 	<
49226 	::color::category::rgb< rgb_tag_name >
49227 	,::color::category::LabCH< LabCH_tag_name >
49228 	> {
49229 public:
49230 	typedef ::color::category::rgb< rgb_tag_name > rgb_category_type, category_left_type;
49231 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
49232 
49233 	typedef typename ::color::trait::scalar< rgb_category_type >::instance_type scalar_type;
49234 
49235 	typedef ::color::model< rgb_category_type > rgb_model_type;
49236 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
49237 
49238 	typedef ::color::xyz< scalar_type > xyz_model_type;
49239 	typedef ::color::lab< scalar_type > lab_model_type;
49240 
49241 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49242 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49243 
49244 	typedef typename container_left_trait_type::input_type container_left_input_type;
49245 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49246 
processcolor::_internal::convert49247 	static void process
49248 	(
49249 		container_left_input_type left
49250 		,container_right_const_input_type right
49251 	) {
49252 		left = rgb_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right)))).container();
49253 	}
49254 };
49255 
49256 }
49257 }
49258 
49259 namespace color {
49260 namespace _internal {
49261 
49262 template
49263 <
49264 	typename rgb_tag_name
49265 	,typename LuvCH_tag_name
49266 	>
49267 struct convert
49268 	<
49269 	::color::category::rgb< rgb_tag_name >
49270 	,::color::category::LuvCH< LuvCH_tag_name >
49271 	> {
49272 public:
49273 	typedef ::color::category::rgb< rgb_tag_name > rgb_category_type, category_left_type;
49274 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
49275 
49276 	typedef typename ::color::trait::scalar< rgb_category_type >::instance_type scalar_type;
49277 
49278 	typedef ::color::model< rgb_category_type > rgb_model_type;
49279 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
49280 
49281 	typedef ::color::xyz< scalar_type > xyz_model_type;
49282 	typedef ::color::luv< scalar_type > luv_model_type;
49283 
49284 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49285 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49286 
49287 	typedef typename container_left_trait_type::input_type container_left_input_type;
49288 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49289 
processcolor::_internal::convert49290 	static void process
49291 	(
49292 		container_left_input_type left
49293 		,container_right_const_input_type right
49294 	) {
49295 		left = rgb_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right)))).container();
49296 	}
49297 };
49298 
49299 }
49300 }
49301 
49302 namespace color {
49303 namespace set {
49304 
49305 template< typename tag_name >
49306 inline
49307 void
gray(::color::model<::color::category::cmyk<tag_name>> & color_parameter,typename::color::trait::component<typename::color::akin::gray<::color::category::cmyk<tag_name>>::akin_type>::model_type component_parameter)49308 gray
49309 (
49310 	::color::model< ::color::category::cmyk<tag_name > > & color_parameter
49311 	,typename ::color::trait::component< typename ::color::akin::gray< ::color::category::cmyk< tag_name > >::akin_type >::model_type component_parameter
49312 ) {
49313 	typedef typename ::color::akin::rgb< ::color::category::cmyk< tag_name > >::akin_type rgb_category_type;
49314 	::color::model< rgb_category_type > rgb(color_parameter);
49315 	::color::set::gray(rgb, component_parameter);
49316 	color_parameter = rgb;
49317 }
49318 
49319 }
49320 }
49321 
49322 namespace color {
49323 namespace _internal {
49324 
49325 template< typename cmyk_tag_name, typename gray_tag_name >
49326 struct convert
49327 	<
49328 	::color::category::cmyk< cmyk_tag_name >
49329 	,::color::category::gray< gray_tag_name >
49330 	> {
49331 public:
49332 	typedef ::color::category::cmyk< cmyk_tag_name > category_left_type;
49333 	typedef ::color::category::gray< gray_tag_name > category_right_type;
49334 
49335 	typedef ::color::trait::bound<category_left_type> bound_left_trait_type;
49336 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49337 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49338 
49339 	typedef ::color::operation::_internal::invert< category_right_type > invert_type;
49340 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
49341 
49342 	typedef typename container_left_trait_type::input_type container_left_input_type;
49343 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49344 
49345 	enum {
49346 		cyan_p = ::color::place::_internal::cyan<category_left_type>::position_enum
49347 		,magenta_p = ::color::place::_internal::magenta<category_left_type>::position_enum
49348 		, yellow_p = ::color::place::_internal::yellow<category_left_type>::position_enum
49349 		, key_p = ::color::place::_internal::key<category_left_type>::position_enum
49350 	};
49351 
processcolor::_internal::convert49352 	static void process
49353 	(
49354 		container_left_input_type left
49355 		,container_right_const_input_type right
49356 	) {
49357 		container_left_trait_type::template set< cyan_p>(left, bound_left_trait_type::template minimum< cyan_p>());
49358 		container_left_trait_type::template set<magenta_p>(left, bound_left_trait_type::template minimum<magenta_p>());
49359 		container_left_trait_type::template set< yellow_p>(left, bound_left_trait_type::template minimum< yellow_p>());
49360 		container_left_trait_type::template set< key_p>(left, reformat_type::template process<key_p,0>(invert_type::template component<0>(container_right_trait_type::template get<0>(right))));
49361 	}
49362 };
49363 
49364 }
49365 }
49366 
49367 namespace color {
49368 namespace _internal {
49369 
49370 template< typename cmyk_tag_name, typename cmy_tag_name >
49371 struct convert
49372 	<
49373 	::color::category::cmyk< cmyk_tag_name >
49374 	,::color::category::cmy< cmy_tag_name >
49375 	> {
49376 public:
49377 	typedef ::color::category::cmyk< cmyk_tag_name > category_left_type;
49378 	typedef ::color::category::cmy< cmy_tag_name > category_right_type;
49379 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
49380 
49381 	typedef ::color::trait::scalar< category_left_type > scalar_trait_type;
49382 
49383 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49384 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49385 
49386 	typedef typename container_left_trait_type::input_type container_left_input_type;
49387 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49388 
49389 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
49390 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
49391 
49392 	enum {
49393 		cl_p = ::color::place::_internal::cyan<category_left_type>::position_enum
49394 		,ml_p = ::color::place::_internal::magenta<category_left_type>::position_enum
49395 		,yl_p = ::color::place::_internal::yellow<category_left_type>::position_enum
49396 		,kl_p = ::color::place::_internal::key<category_left_type>::position_enum
49397 	};
49398 
49399 	enum {
49400 		cr_p = ::color::place::_internal::cyan<category_right_type>::position_enum
49401 		,mr_p = ::color::place::_internal::magenta<category_right_type>::position_enum
49402 		,yr_p = ::color::place::_internal::yellow<category_right_type>::position_enum
49403 	};
49404 
processcolor::_internal::convert49405 	static void process
49406 	(
49407 		container_left_input_type left
49408 		,container_right_const_input_type right
49409 	) {
49410 		scalar_type cc = normalize_type::template process<cr_p>(container_right_trait_type::template get<cr_p>(right));
49411 		scalar_type cm = normalize_type::template process<mr_p>(container_right_trait_type::template get<mr_p>(right));
49412 		scalar_type cy = normalize_type::template process<yr_p>(container_right_trait_type::template get<yr_p>(right));
49413 		scalar_type k = std::min({ cc, cm, cy });
49414 		scalar_type c = scalar_type(0);
49415 		scalar_type m = scalar_type(0);
49416 		scalar_type y = scalar_type(0);
49417 		if(false == scalar_trait_type::is_small(1 - k)) {
49418 			c = (cc-k) / (1-k);
49419 			m = (cm-k) / (1-k);
49420 			y = (cy-k) / (1-k);
49421 		}
49422 		container_left_trait_type::template set<cl_p>(left, diverse_type::template process<cl_p>(c));
49423 		container_left_trait_type::template set<ml_p>(left, diverse_type::template process<ml_p>(m));
49424 		container_left_trait_type::template set<yl_p>(left, diverse_type::template process<yl_p>(y));
49425 		container_left_trait_type::template set<kl_p>(left, diverse_type::template process<kl_p>(k));
49426 	}
49427 };
49428 
49429 }
49430 }
49431 
49432 namespace color {
49433 namespace _internal {
49434 
49435 template< typename tag_left_name, typename tag_right_name >
49436 struct convert
49437 	<
49438 	::color::category::cmyk< tag_left_name >
49439 	,::color::category::cmyk< tag_right_name>
49440 	> {
49441 public:
49442 	typedef ::color::category::cmyk< tag_left_name > category_left_type;
49443 	typedef ::color::category::cmyk< tag_right_name> category_right_type;
49444 
49445 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49446 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49447 
49448 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
49449 
49450 	typedef typename container_left_trait_type::input_type container_left_input_type;
49451 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49452 
49453 	enum {
49454 		cl_p = ::color::place::_internal::cyan<category_left_type>::position_enum
49455 		,ml_p = ::color::place::_internal::magenta<category_left_type>::position_enum
49456 		,yl_p = ::color::place::_internal::yellow<category_left_type>::position_enum
49457 		,kl_p = ::color::place::_internal::key<category_left_type>::position_enum
49458 	};
49459 
49460 	enum {
49461 		cr_p = ::color::place::_internal::cyan<category_right_type>::position_enum
49462 		,mr_p = ::color::place::_internal::magenta<category_right_type>::position_enum
49463 		,yr_p = ::color::place::_internal::yellow<category_right_type>::position_enum
49464 		,kr_p = ::color::place::_internal::key<category_right_type>::position_enum
49465 	};
49466 
processcolor::_internal::convert49467 	static void process
49468 	(
49469 		container_left_input_type left
49470 		,container_right_const_input_type right
49471 	) {
49472 		container_left_trait_type::template set<cr_p>(left, reformat_type::template process<cr_p,cl_p>(container_right_trait_type::template get<cl_p>(right)));
49473 		container_left_trait_type::template set<mr_p>(left, reformat_type::template process<mr_p,ml_p>(container_right_trait_type::template get<ml_p>(right)));
49474 		container_left_trait_type::template set<yr_p>(left, reformat_type::template process<yr_p,yl_p>(container_right_trait_type::template get<yl_p>(right)));
49475 		container_left_trait_type::template set<kr_p>(left, reformat_type::template process<kr_p,kl_p>(container_right_trait_type::template get<kl_p>(right)));
49476 	}
49477 };
49478 
49479 }
49480 }
49481 
49482 namespace color {
49483 namespace _internal {
49484 
49485 template
49486 <
49487 	typename cmyk_tag_name
49488 	,typename hsl_tag_name
49489 	>
49490 struct convert
49491 	<
49492 	::color::category::cmyk< cmyk_tag_name >
49493 	,::color::category::hsl< hsl_tag_name >
49494 	> {
49495 public:
49496 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
49497 	typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_right_type;
49498 
49499 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
49500 
49501 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
49502 	typedef ::color::model< hsl_category_type > hsl_model_type;
49503 
49504 	typedef ::color::rgb< scalar_type > rgb_model_type;
49505 
49506 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49507 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49508 
49509 	typedef typename container_left_trait_type::input_type container_left_input_type;
49510 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49511 
processcolor::_internal::convert49512 	static void process
49513 	(
49514 		container_left_input_type left
49515 		,container_right_const_input_type right
49516 	) {
49517 		left = cmyk_model_type(rgb_model_type(hsl_model_type(right))).container();
49518 	}
49519 };
49520 
49521 }
49522 }
49523 
49524 namespace color {
49525 namespace _internal {
49526 
49527 template
49528 <
49529 	typename cmyk_tag_name
49530 	,typename hsv_tag_name
49531 	>
49532 struct convert
49533 	<
49534 	::color::category::cmyk< cmyk_tag_name >
49535 	,::color::category::hsv< hsv_tag_name >
49536 	> {
49537 public:
49538 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
49539 	typedef ::color::category::hsv< hsv_tag_name > hsv_category_type, category_right_type;
49540 
49541 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
49542 
49543 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
49544 	typedef ::color::model< hsv_category_type > hsv_model_type;
49545 
49546 	typedef ::color::rgb< scalar_type > rgb_model_type;
49547 
49548 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49549 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49550 
49551 	typedef typename container_left_trait_type::input_type container_left_input_type;
49552 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49553 
processcolor::_internal::convert49554 	static void process
49555 	(
49556 		container_left_input_type left
49557 		,container_right_const_input_type right
49558 	) {
49559 		left = cmyk_model_type(rgb_model_type(hsv_model_type(right))).container();
49560 	}
49561 };
49562 
49563 }
49564 }
49565 
49566 namespace color {
49567 namespace _internal {
49568 
49569 template
49570 <
49571 	typename cmyk_tag_name
49572 	,typename hsi_tag_name
49573 	>
49574 struct convert
49575 	<
49576 	::color::category::cmyk< cmyk_tag_name >
49577 	,::color::category::hsi< hsi_tag_name >
49578 	> {
49579 public:
49580 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
49581 	typedef ::color::category::hsi< hsi_tag_name > hsi_category_type, category_right_type;
49582 
49583 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
49584 
49585 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
49586 	typedef ::color::model< hsi_category_type > hsi_model_type;
49587 
49588 	typedef ::color::rgb< scalar_type > rgb_model_type;
49589 
49590 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49591 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49592 
49593 	typedef typename container_left_trait_type::input_type container_left_input_type;
49594 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49595 
processcolor::_internal::convert49596 	static void process
49597 	(
49598 		container_left_input_type left
49599 		,container_right_const_input_type right
49600 	) {
49601 		left = cmyk_model_type(rgb_model_type(hsi_model_type(right))).container();
49602 	}
49603 };
49604 
49605 }
49606 }
49607 
49608 namespace color {
49609 namespace _internal {
49610 
49611 template
49612 <
49613 	typename cmyk_tag_name
49614 	,typename hwb_tag_name
49615 	>
49616 struct convert
49617 	<
49618 	::color::category::cmyk< cmyk_tag_name >
49619 	,::color::category::hwb< hwb_tag_name >
49620 	> {
49621 public:
49622 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
49623 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
49624 
49625 	typedef typename ::color::trait::scalar< cmyk_category_type >::instance_type scalar_type;
49626 
49627 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
49628 	typedef ::color::model< hwb_category_type > hwb_model_type;
49629 
49630 	typedef ::color::rgb< scalar_type > rgb_model_type;
49631 	typedef ::color::hsv< scalar_type > hsv_model_type;
49632 
49633 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49634 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49635 
49636 	typedef typename container_left_trait_type::input_type container_left_input_type;
49637 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49638 
processcolor::_internal::convert49639 	static void process
49640 	(
49641 		container_left_input_type left
49642 		,container_right_const_input_type right
49643 	) {
49644 		left = cmyk_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right)))).container();
49645 	}
49646 };
49647 
49648 }
49649 }
49650 
49651 namespace color {
49652 namespace _internal {
49653 
49654 template< typename cmyk_tag_name, typename rgb_tag_name >
49655 struct convert
49656 	<
49657 	::color::category::cmyk< cmyk_tag_name >
49658 	,::color::category::rgb< rgb_tag_name >
49659 	> {
49660 public:
49661 	typedef ::color::category::cmyk< cmyk_tag_name > category_left_type;
49662 	typedef ::color::category::rgb< rgb_tag_name > category_right_type;
49663 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
49664 
49665 	typedef ::color::trait::scalar< category_left_type > scalar_trait_type;
49666 
49667 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49668 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49669 
49670 	typedef typename container_left_trait_type::input_type container_left_input_type;
49671 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49672 
49673 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
49674 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
49675 
49676 	enum {
49677 		red_p = ::color::place::_internal::red<category_right_type>::position_enum
49678 		,green_p = ::color::place::_internal::green<category_right_type>::position_enum
49679 		,blue_p = ::color::place::_internal::blue<category_right_type>::position_enum
49680 	};
49681 
49682 	enum {
49683 		cyan_p = ::color::place::_internal::cyan<category_left_type>::position_enum
49684 		,magenta_p = ::color::place::_internal::magenta<category_left_type>::position_enum
49685 		, yellow_p = ::color::place::_internal::yellow<category_left_type>::position_enum
49686 		, key_p = ::color::place::_internal::key<category_left_type>::position_enum
49687 	};
49688 
processcolor::_internal::convert49689 	static void process
49690 	(
49691 		container_left_input_type left
49692 		,container_right_const_input_type right
49693 	) {
49694 		scalar_type r = normalize_type::template process<red_p >(container_right_trait_type::template get<red_p >(right));
49695 		scalar_type g = normalize_type::template process<green_p>(container_right_trait_type::template get<green_p>(right));
49696 		scalar_type b = normalize_type::template process<blue_p >(container_right_trait_type::template get<blue_p >(right));
49697 		scalar_type max = std::max<scalar_type>({ r, g, b });
49698 		scalar_type k = scalar_type(1) - max;
49699 		scalar_type c = scalar_type(0);
49700 		scalar_type m = scalar_type(0);
49701 		scalar_type y = scalar_type(0);
49702 		if(false == scalar_trait_type::is_small(max)) {
49703 			c = scalar_type(1) - r / max;
49704 			m = scalar_type(1) - g / max;
49705 			y = scalar_type(1) - b / max;
49706 		}
49707 		container_left_trait_type::template set< cyan_p>(left, diverse_type::template process< cyan_p>(c));
49708 		container_left_trait_type::template set<magenta_p>(left, diverse_type::template process<magenta_p>(m));
49709 		container_left_trait_type::template set< yellow_p>(left, diverse_type::template process< yellow_p>(y));
49710 		container_left_trait_type::template set< key_p>(left, diverse_type::template process< key_p>(k));
49711 	}
49712 };
49713 
49714 }
49715 }
49716 
49717 namespace color {
49718 namespace _internal {
49719 
49720 template
49721 <
49722 	typename cmyk_tag_name
49723 	,typename yiq_tag_name
49724 	>
49725 struct convert
49726 	<
49727 	::color::category::cmyk< cmyk_tag_name >
49728 	,::color::category::yiq< yiq_tag_name >
49729 	> {
49730 public:
49731 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
49732 	typedef ::color::category::yiq< yiq_tag_name > yiq_category_type, category_right_type;
49733 
49734 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
49735 
49736 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
49737 	typedef ::color::model< yiq_category_type > yiq_model_type;
49738 
49739 	typedef ::color::rgb< scalar_type > rgb_model_type;
49740 
49741 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49742 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49743 
49744 	typedef typename container_left_trait_type::input_type container_left_input_type;
49745 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49746 
processcolor::_internal::convert49747 	static void process
49748 	(
49749 		container_left_input_type left
49750 		,container_right_const_input_type right
49751 	) {
49752 		left = cmyk_model_type(rgb_model_type(yiq_model_type(right))).container();
49753 	}
49754 };
49755 
49756 }
49757 }
49758 
49759 namespace color {
49760 namespace _internal {
49761 
49762 template
49763 <
49764 	typename cmyk_tag_name
49765 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum reference_number
49766 	>
49767 struct convert
49768 	<
49769 	::color::category::cmyk< cmyk_tag_name >
49770 	,::color::category::yuv< yuv_tag_name, reference_number >
49771 	> {
49772 public:
49773 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
49774 	typedef ::color::category::yuv< yuv_tag_name, reference_number > yuv_category_type, category_right_type;
49775 
49776 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
49777 
49778 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
49779 	typedef ::color::model< yuv_category_type > yuv_model_type;
49780 
49781 	typedef ::color::rgb< scalar_type > rgb_model_type;
49782 
49783 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49784 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49785 
49786 	typedef typename container_left_trait_type::input_type container_left_input_type;
49787 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49788 
processcolor::_internal::convert49789 	static void process
49790 	(
49791 		container_left_input_type left
49792 		,container_right_const_input_type right
49793 	) {
49794 		left = cmyk_model_type(rgb_model_type(yuv_model_type(right))).container();
49795 	}
49796 };
49797 
49798 }
49799 }
49800 
49801 namespace color {
49802 namespace _internal {
49803 
49804 template
49805 <
49806 	typename cmyk_tag_name
49807 	,typename YCgCo_tag_name
49808 	>
49809 struct convert
49810 	<
49811 	::color::category::cmyk< cmyk_tag_name >
49812 	,::color::category::YCgCo< YCgCo_tag_name >
49813 	> {
49814 public:
49815 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
49816 	typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_right_type;
49817 
49818 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
49819 
49820 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
49821 	typedef ::color::model< YCgCo_category_type > YCgCo_model_type;
49822 
49823 	typedef ::color::rgb< scalar_type > rgb_model_type;
49824 
49825 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49826 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49827 
49828 	typedef typename container_left_trait_type::input_type container_left_input_type;
49829 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49830 
processcolor::_internal::convert49831 	static void process
49832 	(
49833 		container_left_input_type left
49834 		,container_right_const_input_type right
49835 	) {
49836 		left = cmyk_model_type(rgb_model_type(YCgCo_model_type(right))).container();
49837 	}
49838 };
49839 
49840 }
49841 }
49842 
49843 namespace color {
49844 namespace _internal {
49845 
49846 template
49847 <
49848 	typename cmyk_tag_name
49849 	,typename YDbDr_tag_name
49850 	>
49851 struct convert
49852 	<
49853 	::color::category::cmyk< cmyk_tag_name >
49854 	,::color::category::YDbDr< YDbDr_tag_name >
49855 	> {
49856 public:
49857 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
49858 	typedef ::color::category::YDbDr< YDbDr_tag_name > YDbDr_category_type, category_right_type;
49859 
49860 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
49861 
49862 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
49863 	typedef ::color::model< YDbDr_category_type > YDbDr_model_type;
49864 
49865 	typedef ::color::rgb< scalar_type > rgb_model_type;
49866 
49867 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49868 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49869 
49870 	typedef typename container_left_trait_type::input_type container_left_input_type;
49871 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49872 
processcolor::_internal::convert49873 	static void process
49874 	(
49875 		container_left_input_type left
49876 		,container_right_const_input_type right
49877 	) {
49878 		left = cmyk_model_type(rgb_model_type(YDbDr_model_type(right))).container();
49879 	}
49880 };
49881 
49882 }
49883 }
49884 
49885 namespace color {
49886 namespace _internal {
49887 
49888 template
49889 <
49890 	typename cmyk_tag_name
49891 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
49892 	>
49893 struct convert
49894 	<
49895 	::color::category::cmyk< cmyk_tag_name >
49896 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
49897 	> {
49898 public:
49899 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
49900 	typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number > YPbPr_category_type, category_right_type;
49901 
49902 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
49903 
49904 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
49905 	typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
49906 
49907 	typedef ::color::rgb< scalar_type > rgb_model_type;
49908 
49909 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49910 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49911 
49912 	typedef typename container_left_trait_type::input_type container_left_input_type;
49913 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49914 
processcolor::_internal::convert49915 	static void process
49916 	(
49917 		container_left_input_type left
49918 		,container_right_const_input_type right
49919 	) {
49920 		left = cmyk_model_type(rgb_model_type(YPbPr_model_type(right))).container();
49921 	}
49922 };
49923 
49924 }
49925 }
49926 
49927 namespace color {
49928 namespace _internal {
49929 
49930 template
49931 <
49932 	typename cmyk_tag_name
49933 	,typename xyz_tag_name
49934 	>
49935 struct convert
49936 	<
49937 	::color::category::cmyk< cmyk_tag_name >
49938 	,::color::category::xyz< xyz_tag_name >
49939 	> {
49940 public:
49941 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
49942 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
49943 
49944 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
49945 
49946 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
49947 	typedef ::color::model< xyz_category_type > xyz_model_type;
49948 
49949 	typedef ::color::rgb< scalar_type > rgb_model_type;
49950 
49951 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49952 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49953 
49954 	typedef typename container_left_trait_type::input_type container_left_input_type;
49955 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49956 
processcolor::_internal::convert49957 	static void process
49958 	(
49959 		container_left_input_type left
49960 		,container_right_const_input_type right
49961 	) {
49962 		left = cmyk_model_type(rgb_model_type(xyz_model_type(right))).container();
49963 	}
49964 };
49965 
49966 }
49967 }
49968 
49969 namespace color {
49970 namespace _internal {
49971 
49972 template
49973 <
49974 	typename cmyk_tag_name
49975 	,typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
49976 	>
49977 struct convert
49978 	<
49979 	::color::category::cmyk< cmyk_tag_name >
49980 	,::color::category::lab< lab_tag_name, lab_reference_number >
49981 	> {
49982 public:
49983 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
49984 	typedef ::color::category::lab< lab_tag_name, lab_reference_number > lab_category_type, category_right_type;
49985 
49986 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
49987 
49988 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
49989 	typedef ::color::model< lab_category_type > lab_model_type;
49990 
49991 	typedef ::color::rgb< scalar_type > rgb_model_type;
49992 	typedef ::color::xyz< scalar_type > xyz_model_type;
49993 
49994 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
49995 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
49996 
49997 	typedef typename container_left_trait_type::input_type container_left_input_type;
49998 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
49999 
processcolor::_internal::convert50000 	static void process
50001 	(
50002 		container_left_input_type left
50003 		,container_right_const_input_type right
50004 	) {
50005 		left = cmyk_model_type(rgb_model_type(xyz_model_type(lab_model_type(right)))).container();
50006 	}
50007 };
50008 
50009 }
50010 }
50011 
50012 namespace color {
50013 namespace _internal {
50014 
50015 template
50016 <
50017 	typename cmyk_tag_name
50018 	,typename xyy_tag_name
50019 	>
50020 struct convert
50021 	<
50022 	::color::category::cmyk< cmyk_tag_name >
50023 	,::color::category::xyy< xyy_tag_name >
50024 	> {
50025 public:
50026 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
50027 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
50028 
50029 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
50030 
50031 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
50032 	typedef ::color::model< xyy_category_type > xyy_model_type;
50033 
50034 	typedef ::color::rgb< scalar_type > rgb_model_type;
50035 	typedef ::color::xyz< scalar_type > xyz_model_type;
50036 
50037 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50038 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50039 
50040 	typedef typename container_left_trait_type::input_type container_left_input_type;
50041 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50042 
processcolor::_internal::convert50043 	static void process
50044 	(
50045 		container_left_input_type left
50046 		,container_right_const_input_type right
50047 	) {
50048 		left = cmyk_model_type(rgb_model_type(xyz_model_type(xyy_model_type(right)))).container();
50049 	}
50050 };
50051 
50052 }
50053 }
50054 
50055 namespace color {
50056 namespace _internal {
50057 
50058 template
50059 <
50060 	typename cmyk_tag_name
50061 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
50062 	>
50063 struct convert
50064 	<
50065 	::color::category::cmyk< cmyk_tag_name >
50066 	,::color::category::lms< lms_tag_name, lms_reference_number >
50067 	> {
50068 public:
50069 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
50070 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
50071 
50072 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
50073 
50074 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
50075 	typedef ::color::model< lms_category_type > lms_model_type;
50076 
50077 	typedef ::color::rgb< scalar_type > rgb_model_type;
50078 	typedef ::color::xyz< scalar_type > xyz_model_type;
50079 
50080 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50081 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50082 
50083 	typedef typename container_left_trait_type::input_type container_left_input_type;
50084 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50085 
processcolor::_internal::convert50086 	static void process
50087 	(
50088 		container_left_input_type left
50089 		,container_right_const_input_type right
50090 	) {
50091 		left = cmyk_model_type(rgb_model_type(xyz_model_type(lms_model_type(right)))).container();
50092 	}
50093 };
50094 
50095 }
50096 }
50097 
50098 namespace color {
50099 namespace _internal {
50100 
50101 template
50102 <
50103 	typename cmyk_tag_name
50104 	,typename luv_tag_name
50105 	>
50106 struct convert
50107 	<
50108 	::color::category::cmyk< cmyk_tag_name >
50109 	,::color::category::luv< luv_tag_name >
50110 	> {
50111 public:
50112 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
50113 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
50114 
50115 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
50116 
50117 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
50118 	typedef ::color::model< luv_category_type > luv_model_type;
50119 
50120 	typedef ::color::rgb< scalar_type > rgb_model_type;
50121 	typedef ::color::xyz< scalar_type > xyz_model_type;
50122 
50123 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50124 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50125 
50126 	typedef typename container_left_trait_type::input_type container_left_input_type;
50127 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50128 
processcolor::_internal::convert50129 	static void process
50130 	(
50131 		container_left_input_type left
50132 		,container_right_const_input_type right
50133 	) {
50134 		left = cmyk_model_type(rgb_model_type(xyz_model_type(luv_model_type(right)))).container();
50135 	}
50136 };
50137 
50138 }
50139 }
50140 
50141 namespace color {
50142 namespace _internal {
50143 
50144 template
50145 <
50146 	typename cmyk_tag_name
50147 	,typename LabCH_tag_name
50148 	>
50149 struct convert
50150 	<
50151 	::color::category::cmyk< cmyk_tag_name >
50152 	,::color::category::LabCH< LabCH_tag_name >
50153 	> {
50154 public:
50155 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
50156 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
50157 
50158 	typedef typename ::color::trait::scalar< cmyk_category_type >::instance_type scalar_type;
50159 
50160 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
50161 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
50162 
50163 	typedef ::color::lab< scalar_type > lab_model_type;
50164 	typedef ::color::xyz< scalar_type > xyz_model_type;
50165 	typedef ::color::rgb< scalar_type > rgb_model_type;
50166 
50167 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50168 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50169 
50170 	typedef typename container_left_trait_type::input_type container_left_input_type;
50171 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50172 
processcolor::_internal::convert50173 	static void process
50174 	(
50175 		container_left_input_type left
50176 		,container_right_const_input_type right
50177 	) {
50178 		left = cmyk_model_type(rgb_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right))))).container();
50179 	}
50180 };
50181 
50182 }
50183 }
50184 
50185 namespace color {
50186 namespace _internal {
50187 
50188 template
50189 <
50190 	typename cmyk_tag_name
50191 	,typename LuvCH_tag_name
50192 	>
50193 struct convert
50194 	<
50195 	::color::category::cmyk< cmyk_tag_name >
50196 	,::color::category::LuvCH< LuvCH_tag_name >
50197 	> {
50198 public:
50199 	typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_left_type;
50200 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
50201 
50202 	typedef typename ::color::trait::scalar< cmyk_category_type >::instance_type scalar_type;
50203 
50204 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
50205 	typedef ::color::model< cmyk_category_type > cmyk_model_type;
50206 
50207 	typedef ::color::luv< scalar_type > luv_model_type;
50208 	typedef ::color::xyz< scalar_type > xyz_model_type;
50209 	typedef ::color::rgb< scalar_type > rgb_model_type;
50210 
50211 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50212 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50213 
50214 	typedef typename container_left_trait_type::input_type container_left_input_type;
50215 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50216 
processcolor::_internal::convert50217 	static void process
50218 	(
50219 		container_left_input_type left
50220 		,container_right_const_input_type right
50221 	) {
50222 		left = cmyk_model_type(rgb_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right))))).container();
50223 	}
50224 };
50225 
50226 }
50227 }
50228 
50229 namespace color {
50230 namespace _internal {
50231 
50232 template< typename gray_tag_name, typename cmyk_tag_name >
50233 struct convert
50234 	<
50235 	::color::category::gray< gray_tag_name >
50236 	,::color::category::cmyk<cmyk_tag_name>
50237 	> {
50238 public:
50239 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50240 	typedef ::color::category::cmyk<cmyk_tag_name> category_right_type;
50241 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
50242 
50243 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50244 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50245 
50246 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
50247 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
50248 
50249 	typedef typename container_left_trait_type::input_type container_left_input_type;
50250 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50251 
50252 	typedef ::color::constant::gray::rgb< category_left_type > gray_const_type;
50253 
50254 	enum {
50255 		cyan_p = ::color::place::_internal::cyan<category_right_type>::position_enum
50256 		,magenta_p = ::color::place::_internal::magenta<category_right_type>::position_enum
50257 		, yellow_p = ::color::place::_internal::yellow<category_right_type>::position_enum
50258 		, key_p = ::color::place::_internal::key<category_right_type>::position_enum
50259 	};
50260 
processcolor::_internal::convert50261 	static void process
50262 	(
50263 		container_left_input_type left
50264 		,container_right_const_input_type right
50265 	) {
50266 		scalar_type c = normalize_type::template process< cyan_p>(container_right_trait_type::template get< cyan_p>(right));
50267 		scalar_type m = normalize_type::template process<magenta_p>(container_right_trait_type::template get<magenta_p>(right));
50268 		scalar_type y = normalize_type::template process< yellow_p>(container_right_trait_type::template get< yellow_p>(right));
50269 		scalar_type k = normalize_type::template process< key_p>(container_right_trait_type::template get< key_p>(right));
50270 		scalar_type value =
50271 			(gray_const_type::Rc() * (1-c)
50272 			 + gray_const_type::Gc() * (1-m)
50273 			 + gray_const_type::Bc() * (1-y)) * (1-k);
50274 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(value));
50275 	}
50276 };
50277 
50278 }
50279 }
50280 
50281 namespace color {
50282 namespace _internal {
50283 
50284 template< typename gray_tag_name, typename hsl_tag_name >
50285 struct convert
50286 	<
50287 	::color::category::gray< gray_tag_name >
50288 	,::color::category::hsl<hsl_tag_name>
50289 	> {
50290 public:
50291 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50292 	typedef ::color::category::hsl<hsl_tag_name> category_right_type;
50293 
50294 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50295 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50296 
50297 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
50298 
50299 	typedef typename container_left_trait_type::input_type container_left_input_type;
50300 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50301 
50302 	enum {
50303 		lightness_p = ::color::place::_internal::lightness<category_right_type>::position_enum
50304 	};
50305 
processcolor::_internal::convert50306 	static void process
50307 	(
50308 		container_left_input_type left
50309 		,container_right_const_input_type right
50310 	) {
50311 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,lightness_p>(container_right_trait_type::template get<lightness_p>(right)));
50312 	}
50313 };
50314 
50315 }
50316 }
50317 
50318 namespace color {
50319 namespace _internal {
50320 
50321 template
50322 <
50323 	typename gray_tag_name
50324 	,typename hsv_tag_name
50325 	>
50326 struct convert
50327 	<
50328 	::color::category::gray< gray_tag_name >
50329 	,::color::category::hsv<hsv_tag_name>
50330 	> {
50331 public:
50332 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50333 	typedef ::color::category::hsv<hsv_tag_name> category_right_type;
50334 
50335 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50336 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50337 
50338 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
50339 
50340 	typedef typename container_left_trait_type::input_type container_left_input_type;
50341 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50342 
50343 	enum {
50344 		value_p = ::color::place::_internal::value<category_right_type>::position_enum
50345 	};
50346 
processcolor::_internal::convert50347 	static void process
50348 	(
50349 		container_left_input_type left
50350 		,container_right_const_input_type right
50351 	) {
50352 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,value_p>(container_right_trait_type::template get<value_p>(right)));
50353 	}
50354 };
50355 
50356 }
50357 }
50358 
50359 namespace color {
50360 namespace _internal {
50361 
50362 template< typename gray_tag_name, typename hsi_tag_name >
50363 struct convert
50364 	<
50365 	::color::category::gray< gray_tag_name >
50366 	,::color::category::hsi<hsi_tag_name>
50367 	> {
50368 public:
50369 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50370 	typedef ::color::category::hsi<hsi_tag_name> category_right_type;
50371 
50372 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50373 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50374 
50375 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
50376 
50377 	typedef typename container_left_trait_type::input_type container_left_input_type;
50378 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50379 
50380 	enum {
50381 		intensity_p = ::color::place::_internal::intensity<category_right_type>::position_enum
50382 	};
50383 
processcolor::_internal::convert50384 	static void process
50385 	(
50386 		container_left_input_type left
50387 		,container_right_const_input_type right
50388 	) {
50389 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,intensity_p>(container_right_trait_type::template get<intensity_p>(right)));
50390 	}
50391 };
50392 
50393 }
50394 }
50395 
50396 namespace color {
50397 namespace _internal {
50398 
50399 template
50400 <
50401 	typename gray_tag_name
50402 	,typename hwb_tag_name
50403 	>
50404 struct convert
50405 	<
50406 	::color::category::gray< gray_tag_name >
50407 	,::color::category::hwb< hwb_tag_name >
50408 	> {
50409 public:
50410 	typedef ::color::category::gray< gray_tag_name > gray_category_type, category_left_type;
50411 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
50412 
50413 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50414 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50415 
50416 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
50417 	typedef ::color::operation::_internal::invert< category_right_type > invert_type;
50418 
50419 	typedef typename container_left_trait_type::input_type container_left_input_type;
50420 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50421 
processcolor::_internal::convert50422 	static void process
50423 	(
50424 		container_left_input_type left
50425 		,container_right_const_input_type right
50426 	) {
50427 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,2>(invert_type::template component<2>(container_right_trait_type::template get<2>(right))));
50428 	}
50429 };
50430 
50431 }
50432 }
50433 
50434 namespace color {
50435 namespace _internal {
50436 
50437 template< typename gray_tag_name, typename rgb_tag_name >
50438 struct convert
50439 	<
50440 	::color::category::gray< gray_tag_name >
50441 	,::color::category::rgb< rgb_tag_name >
50442 	> {
50443 public:
50444 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50445 	typedef ::color::category::rgb< rgb_tag_name > category_right_type;
50446 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
50447 
50448 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50449 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50450 
50451 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
50452 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
50453 
50454 	typedef typename container_left_trait_type::input_type container_left_input_type;
50455 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50456 
50457 	typedef ::color::constant::gray::rgb< category_left_type > gray_const_type;
50458 
50459 	enum {
50460 		red_p = ::color::place::_internal::red<category_right_type>::position_enum
50461 		, green_p = ::color::place::_internal::green<category_right_type>::position_enum
50462 		, blue_p = ::color::place::_internal::blue<category_right_type>::position_enum
50463 	};
50464 
processcolor::_internal::convert50465 	static void process
50466 	(
50467 		container_left_input_type left
50468 		,container_right_const_input_type right
50469 	) {
50470 		scalar_type valueR = normalize_type::template process<red_p > (container_right_trait_type::template get<red_p >(right));
50471 		scalar_type valueG = normalize_type::template process<green_p> (container_right_trait_type::template get<green_p>(right));
50472 		scalar_type valueB = normalize_type::template process<blue_p > (container_right_trait_type::template get<blue_p >(right));
50473 		scalar_type value =
50474 			gray_const_type::Rc() * valueR
50475 			+ gray_const_type::Gc() * valueG
50476 			+ gray_const_type::Bc() * valueB;
50477 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(value));
50478 	}
50479 };
50480 
50481 }
50482 }
50483 
50484 namespace color {
50485 namespace _internal {
50486 
50487 template< typename gray_tag_name, typename yiq_tag_name >
50488 struct convert
50489 	<
50490 	::color::category::gray< gray_tag_name >
50491 	,::color::category::yiq< yiq_tag_name >
50492 	> {
50493 public:
50494 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50495 	typedef ::color::category::yiq<yiq_tag_name> category_right_type;
50496 
50497 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50498 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50499 
50500 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
50501 
50502 	typedef typename container_left_trait_type::input_type container_left_input_type;
50503 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50504 
50505 	enum {
50506 		luma_p = ::color::place::_internal::luma<category_right_type>::position_enum
50507 	};
50508 
processcolor::_internal::convert50509 	static void process
50510 	(
50511 		container_left_input_type left
50512 		,container_right_const_input_type right
50513 	) {
50514 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,luma_p>(container_right_trait_type::template get<luma_p>(right)));
50515 	}
50516 };
50517 
50518 }
50519 }
50520 
50521 namespace color {
50522 namespace _internal {
50523 
50524 template
50525 <
50526 	typename gray_tag_name
50527 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum reference_number
50528 	>
50529 struct convert
50530 	<
50531 	::color::category::gray< gray_tag_name >
50532 	,::color::category::yuv< yuv_tag_name, reference_number >
50533 	> {
50534 public:
50535 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50536 	typedef ::color::category::yuv<yuv_tag_name, reference_number> category_right_type;
50537 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
50538 
50539 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50540 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50541 
50542 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
50543 
50544 	typedef typename container_left_trait_type::input_type container_left_input_type;
50545 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50546 
50547 	enum {
50548 		luma_p = ::color::place::_internal::luma<category_right_type>::position_enum
50549 	};
50550 
processcolor::_internal::convert50551 	static void process
50552 	(
50553 		container_left_input_type left
50554 		,container_right_const_input_type right
50555 	) {
50556 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,luma_p>(container_right_trait_type::template get<luma_p>(right)));
50557 	}
50558 };
50559 
50560 }
50561 }
50562 
50563 namespace color {
50564 namespace _internal {
50565 
50566 template< typename gray_tag_name, typename YCgCo_tag_name >
50567 struct convert
50568 	<
50569 	::color::category::gray< gray_tag_name >
50570 	,::color::category::YCgCo< YCgCo_tag_name >
50571 	> {
50572 public:
50573 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50574 	typedef ::color::category::YCgCo<YCgCo_tag_name> category_right_type;
50575 
50576 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50577 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50578 
50579 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
50580 
50581 	typedef typename container_left_trait_type::input_type container_left_input_type;
50582 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50583 
50584 	enum {
50585 		luma_p = ::color::place::_internal::luma<category_right_type>::position_enum
50586 	};
50587 
processcolor::_internal::convert50588 	static void process
50589 	(
50590 		container_left_input_type left
50591 		,container_right_const_input_type right
50592 	) {
50593 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,luma_p>(container_right_trait_type::template get<luma_p>(right)));
50594 	}
50595 };
50596 
50597 }
50598 }
50599 
50600 namespace color {
50601 namespace _internal {
50602 
50603 template< typename gray_tag_name, typename YDbDr_tag_name >
50604 struct convert
50605 	<
50606 	::color::category::gray< gray_tag_name >
50607 	,::color::category::YDbDr< YDbDr_tag_name >
50608 	> {
50609 public:
50610 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50611 	typedef ::color::category::YDbDr<YDbDr_tag_name> category_right_type;
50612 
50613 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50614 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50615 
50616 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
50617 
50618 	typedef typename container_left_trait_type::input_type container_left_input_type;
50619 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50620 
50621 	enum {
50622 		luma_p = ::color::place::_internal::luma<category_right_type>::position_enum
50623 	};
50624 
processcolor::_internal::convert50625 	static void process
50626 	(
50627 		container_left_input_type left
50628 		,container_right_const_input_type right
50629 	) {
50630 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,luma_p>(container_right_trait_type::template get<luma_p>(right)));
50631 	}
50632 };
50633 
50634 }
50635 }
50636 
50637 namespace color {
50638 namespace _internal {
50639 
50640 template
50641 <
50642 	typename gray_tag_name
50643 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
50644 	>
50645 struct convert
50646 	<
50647 	::color::category::gray< gray_tag_name >
50648 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
50649 	> {
50650 public:
50651 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50652 	typedef ::color::category::YPbPr<YPbPr_tag_name, YPbPr_reference_number> category_right_type;
50653 
50654 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50655 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50656 
50657 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
50658 
50659 	typedef typename container_left_trait_type::input_type container_left_input_type;
50660 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50661 
50662 	enum {
50663 		luma_p = ::color::place::_internal::luma<category_right_type>::position_enum
50664 	};
50665 
processcolor::_internal::convert50666 	static void process
50667 	(
50668 		container_left_input_type left
50669 		,container_right_const_input_type right
50670 	) {
50671 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,luma_p>(container_right_trait_type::template get<luma_p>(right)));
50672 	}
50673 };
50674 
50675 }
50676 }
50677 
50678 namespace color {
50679 namespace _internal {
50680 
50681 template
50682 <
50683 	typename gray_tag_name
50684 	,typename xyz_tag_name
50685 	>
50686 struct convert
50687 	<
50688 	::color::category::gray< gray_tag_name >
50689 	,::color::category::xyz< xyz_tag_name >
50690 	> {
50691 public:
50692 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50693 	typedef ::color::category::xyz< xyz_tag_name > category_right_type;
50694 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
50695 
50696 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50697 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50698 
50699 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
50700 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
50701 
50702 	typedef typename container_left_trait_type::input_type container_left_input_type;
50703 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50704 
processcolor::_internal::convert50705 	static void process
50706 	(
50707 		container_left_input_type left
50708 		,container_right_const_input_type right
50709 	) {
50710 		scalar_type g = normalize_type::template process<1>(container_right_trait_type::template get<1>(right));
50711 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(g));
50712 	}
50713 };
50714 
50715 }
50716 }
50717 
50718 namespace color {
50719 namespace _internal {
50720 
50721 template
50722 <
50723 	typename gray_tag_name
50724 	,typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
50725 	>
50726 struct convert
50727 	<
50728 	::color::category::gray< gray_tag_name >
50729 	,::color::category::lab< lab_tag_name, lab_reference_number >
50730 	> {
50731 public:
50732 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50733 	typedef ::color::category::lab<lab_tag_name, lab_reference_number> category_right_type;
50734 
50735 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50736 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50737 
50738 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
50739 
50740 	typedef typename container_left_trait_type::input_type container_left_input_type;
50741 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50742 
processcolor::_internal::convert50743 	static void process
50744 	(
50745 		container_left_input_type left
50746 		,container_right_const_input_type right
50747 	) {
50748 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
50749 	}
50750 };
50751 
50752 }
50753 }
50754 
50755 namespace color {
50756 namespace _internal {
50757 
50758 template
50759 <
50760 	typename gray_tag_name
50761 	,typename xyy_tag_name
50762 	>
50763 struct convert
50764 	<
50765 	::color::category::gray< gray_tag_name >
50766 	,::color::category::xyy< xyy_tag_name >
50767 	> {
50768 public:
50769 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50770 	typedef ::color::category::xyy< xyy_tag_name > category_right_type;
50771 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
50772 
50773 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50774 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50775 
50776 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
50777 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
50778 
50779 	typedef typename container_left_trait_type::input_type container_left_input_type;
50780 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50781 
processcolor::_internal::convert50782 	static void process
50783 	(
50784 		container_left_input_type left
50785 		,container_right_const_input_type right
50786 	) {
50787 		scalar_type g = normalize_type::template process<2>(container_right_trait_type::template get<2>(right));
50788 		container_left_trait_type::template set<0>(left, diverse_type::template process<0>(g));
50789 	}
50790 };
50791 
50792 }
50793 }
50794 
50795 namespace color {
50796 namespace _internal {
50797 
50798 template
50799 <
50800 	typename gray_tag_name
50801 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
50802 	>
50803 struct convert
50804 	<
50805 	::color::category::gray< gray_tag_name >
50806 	,::color::category::lms< lms_tag_name, lms_reference_number >
50807 	> {
50808 public:
50809 	typedef ::color::category::gray< gray_tag_name > gray_category_type, category_left_type;
50810 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
50811 
50812 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50813 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50814 
50815 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
50816 
50817 	typedef typename container_left_trait_type::input_type container_left_input_type;
50818 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50819 
processcolor::_internal::convert50820 	static void process
50821 	(
50822 		container_left_input_type left
50823 		,container_right_const_input_type right
50824 	) {
50825 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
50826 	}
50827 };
50828 
50829 }
50830 }
50831 
50832 namespace color {
50833 namespace _internal {
50834 
50835 template< typename gray_tag_name, typename luv_tag_name >
50836 struct convert
50837 	<
50838 	::color::category::gray< gray_tag_name >
50839 	,::color::category::luv< luv_tag_name >
50840 	> {
50841 public:
50842 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50843 	typedef ::color::category::luv<luv_tag_name> category_right_type;
50844 
50845 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50846 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50847 
50848 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
50849 
50850 	typedef typename container_left_trait_type::input_type container_left_input_type;
50851 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50852 
processcolor::_internal::convert50853 	static void process
50854 	(
50855 		container_left_input_type left
50856 		,container_right_const_input_type right
50857 	) {
50858 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
50859 	}
50860 };
50861 
50862 }
50863 }
50864 
50865 namespace color {
50866 namespace _internal {
50867 
50868 template< typename gray_tag_name, typename LabCH_tag_name >
50869 struct convert
50870 	<
50871 	::color::category::gray< gray_tag_name >
50872 	,::color::category::LabCH< LabCH_tag_name >
50873 	> {
50874 public:
50875 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50876 	typedef ::color::category::LabCH<LabCH_tag_name> category_right_type;
50877 
50878 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50879 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50880 
50881 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
50882 
50883 	typedef typename container_left_trait_type::input_type container_left_input_type;
50884 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50885 
processcolor::_internal::convert50886 	static void process
50887 	(
50888 		container_left_input_type left
50889 		,container_right_const_input_type right
50890 	) {
50891 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
50892 	}
50893 };
50894 
50895 }
50896 }
50897 
50898 namespace color {
50899 namespace _internal {
50900 
50901 template< typename gray_tag_name, typename LuvCH_tag_name >
50902 struct convert
50903 	<
50904 	::color::category::gray< gray_tag_name >
50905 	,::color::category::LuvCH< LuvCH_tag_name >
50906 	> {
50907 public:
50908 	typedef ::color::category::gray< gray_tag_name > category_left_type;
50909 	typedef ::color::category::LuvCH<LuvCH_tag_name> category_right_type;
50910 
50911 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
50912 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
50913 
50914 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
50915 
50916 	typedef typename container_left_trait_type::input_type container_left_input_type;
50917 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
50918 
processcolor::_internal::convert50919 	static void process
50920 	(
50921 		container_left_input_type left
50922 		,container_right_const_input_type right
50923 	) {
50924 		container_left_trait_type::template set<0>(left, reformat_type::template process<0,0>(container_right_trait_type::template get<0>(right)));
50925 	}
50926 };
50927 
50928 }
50929 }
50930 
50931 namespace color {
50932 namespace operation {
50933 namespace _internal {
50934 
50935 template< typename category_name>
50936 struct gamma {
50937 public:
50938 	typedef category_name category_type;
50939 
50940 	typedef ::color::trait::index< category_name > index_trait_type;
50941 	typedef ::color::trait::container< category_type > container_trait_type;
50942 	typedef ::color::trait::scalar< category_name > scalar_trait_type;
50943 
50944 	typedef typename index_trait_type::instance_type index_type;
50945 	typedef typename scalar_trait_type::instance_type scalar_type;
50946 	typedef typename scalar_trait_type::model_type scalar_const_input_type;
50947 
50948 	typedef ::color::model<category_type> model_type;
50949 	typedef model_type & model_output_type;
50950 	typedef model_type const& model_const_input_type;
50951 
50952 	typedef ::color::_internal::diverse< category_type > diverse_type;
50953 	typedef ::color::_internal::normalize< category_type > normalize_type;
50954 
50955 	typedef ::color::operation::_internal::gamma< category_name > this_type;
50956 
processcolor::operation::_internal::gamma50957 	static model_type & process(model_output_type result, scalar_const_input_type scalar) {
50958 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
50959 			result.set(index, diverse_type::process(this_type::process(normalize_type::process(result.get(index), index), scalar), index));
50960 		}
50961 		return result;
50962 	}
50963 
processcolor::operation::_internal::gamma50964 	static model_type & process(model_output_type result, model_const_input_type left, scalar_const_input_type value) {
50965 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
50966 			result.set(index, diverse_type::process(this_type::process(normalize_type::process(left.get(index), index), value), index));
50967 		}
50968 		return result;
50969 	}
50970 
processcolor::operation::_internal::gamma50971 	static scalar_type process(scalar_const_input_type x, scalar_const_input_type value) {
50972 		return std::pow(x, scalar_type(1)/value);
50973 	}
50974 
50975 };
50976 }
50977 
50978 template< typename category_name >
50979 ::color::model<category_name> &
gamma(::color::model<category_name> & result,typename::color::trait::scalar<category_name>::instance_type const & value)50980 gamma
50981 (
50982 	::color::model<category_name> & result
50983 	,typename ::color::trait::scalar<category_name>::instance_type const& value
50984 ) {
50985 	return ::color::operation::_internal::gamma<category_name>::process(result, value);
50986 }
50987 
50988 template< typename category_name >
50989 ::color::model<category_name> &
gamma(::color::model<category_name> & result,::color::model<category_name> const & right,typename::color::trait::scalar<category_name>::instance_type const & value)50990 gamma
50991 (
50992 	::color::model<category_name> & result
50993 	, ::color::model<category_name> const& right
50994 	,typename ::color::trait::scalar<category_name>::instance_type const& value
50995 ) {
50996 	return ::color::operation::_internal::gamma<category_name>::process(result, right, value);
50997 }
50998 
50999 }
51000 }
51001 
51002 namespace color {
51003 namespace operation {
51004 
51005 template< typename tag_name >
51006 ::color::model< ::color::category::gray< tag_name > > &
gamma(::color::model<::color::category::gray<tag_name>> & result,typename::color::trait::scalar<::color::category::gray<tag_name>>::instance_type const & value)51007 gamma
51008 (
51009 	::color::model< ::color::category::gray< tag_name > > & result
51010 	,typename ::color::trait::scalar< ::color::category::gray< tag_name > >::instance_type const& value
51011 ) {
51012 	typedef ::color::category::gray< tag_name > category_type;
51013 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
51014 	typedef ::color::_internal::diverse< category_type > diverse_type;
51015 	typedef ::color::_internal::normalize< category_type > normalize_type;
51016 	scalar_type s = normalize_type::template process<0>(result.template get<0>());
51017 	result.template set<0>(diverse_type::template process<0>(std::pow(s, scalar_type(1)/value)));
51018 	return result;
51019 }
51020 
51021 template< typename tag_name >
51022 ::color::model< ::color::category::gray< tag_name > > &
gamma(::color::model<::color::category::gray<tag_name>> & result,::color::model<::color::category::gray<tag_name>> const & right,typename::color::trait::scalar<::color::category::gray<tag_name>>::instance_type const & value)51023 gamma
51024 (
51025 	::color::model< ::color::category::gray< tag_name > > & result
51026 	, ::color::model< ::color::category::gray< tag_name > > const& right
51027 	,typename ::color::trait::scalar< ::color::category::gray< tag_name > >::instance_type const& value
51028 ) {
51029 	typedef ::color::category::gray< tag_name > category_type;
51030 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
51031 	typedef ::color::_internal::diverse< category_type > diverse_type;
51032 	typedef ::color::_internal::normalize< category_type > normalize_type;
51033 	scalar_type s = normalize_type::template process<0>(right.template get<0>());
51034 	result.template set<0>(diverse_type::template process<0>(std::pow(s, scalar_type(1)/value)));
51035 	return result;
51036 }
51037 
51038 inline
51039 ::color::model< ::color::category::gray_float > &
gamma(::color::model<::color::category::gray_float> & result,::color::trait::component<::color::category::gray_float>::instance_type const & value)51040 gamma
51041 (
51042 	::color::model< ::color::category::gray_float > & result
51043 	,::color::trait::component< ::color::category::gray_float>::instance_type const& value
51044 ) {
51045 	typedef ::color::category::gray_float category_type;
51046 	typedef ::color::trait::scalar<category_type>::instance_type scalar_type;
51047 	typedef ::color::trait::component<category_type>::instance_type component_type;
51048 	result.set<0>(component_type(std::pow(result.get<0>(), scalar_type(1)/value)));
51049 	return result;
51050 }
51051 
51052 inline
51053 ::color::model< ::color::category::gray_float > &
gamma(::color::model<::color::category::gray_float> & result,::color::model<::color::category::gray_float> const & right,::color::trait::component<::color::category::gray_float>::instance_type const & value)51054 gamma
51055 (
51056 	::color::model< ::color::category::gray_float > & result
51057 	, ::color::model< ::color::category::gray_float > const& right
51058 	,::color::trait::component< ::color::category::gray_float>::instance_type const& value
51059 ) {
51060 	typedef ::color::category::gray_float category_type;
51061 	typedef ::color::trait::scalar<category_type>::instance_type scalar_type;
51062 	typedef ::color::trait::component<category_type>::instance_type component_type;
51063 	result.set<0>(component_type(std::pow(right.get<0>(), scalar_type(1)/value)));
51064 	return result;
51065 }
51066 
51067 inline
51068 ::color::model< ::color::category::gray_double > &
gamma(::color::model<::color::category::gray_double> & result,::color::trait::scalar<::color::category::gray_double>::instance_type const & value)51069 gamma
51070 (
51071 	::color::model< ::color::category::gray_double > & result
51072 	, ::color::trait::scalar< ::color::category::gray_double >::instance_type const& value
51073 ) {
51074 	typedef ::color::category::gray_double category_type;
51075 	typedef ::color::trait::scalar<category_type>::instance_type scalar_type;
51076 	typedef ::color::trait::component<category_type>::instance_type component_type;
51077 	result.set<0>(component_type(std::pow(result.get<0>(), scalar_type(1)/value)));
51078 	return result;
51079 }
51080 
51081 inline
51082 ::color::model< ::color::category::gray_double > &
gamma(::color::model<::color::category::gray_double> & result,::color::model<::color::category::gray_double> const & right,::color::trait::scalar<::color::category::gray_double>::instance_type const & value)51083 gamma
51084 (
51085 	::color::model< ::color::category::gray_double > & result
51086 	, ::color::model< ::color::category::gray_double > const& right
51087 	, ::color::trait::scalar< ::color::category::gray_double >::instance_type const& value
51088 ) {
51089 	typedef ::color::category::gray_double category_type;
51090 	typedef ::color::trait::scalar<category_type>::instance_type scalar_type;
51091 	result.set<0>(std::pow(right.get<0>(), scalar_type(1)/value));
51092 	return result;
51093 }
51094 
51095 inline
51096 ::color::model< ::color::category::gray_ldouble > &
gamma(::color::model<::color::category::gray_ldouble> & result,::color::trait::scalar<::color::category::gray_ldouble>::instance_type const & value)51097 gamma
51098 (
51099 	::color::model< ::color::category::gray_ldouble > & result
51100 	, ::color::trait::scalar< ::color::category::gray_ldouble >::instance_type const& value
51101 ) {
51102 	typedef ::color::category::gray_ldouble category_type;
51103 	typedef ::color::trait::scalar<category_type>::instance_type scalar_type;
51104 	result.set<0>(std::pow(result.get<0>(), scalar_type(1)/value));
51105 	return result;
51106 }
51107 
51108 inline
51109 ::color::model< ::color::category::gray_ldouble > &
gamma(::color::model<::color::category::gray_ldouble> & result,::color::model<::color::category::gray_ldouble> const & right,::color::trait::scalar<::color::category::gray_ldouble>::instance_type const & value)51110 gamma
51111 (
51112 	::color::model< ::color::category::gray_ldouble > & result
51113 	, ::color::model< ::color::category::gray_ldouble > const& right
51114 	, ::color::trait::scalar< ::color::category::gray_ldouble >::instance_type const& value
51115 ) {
51116 	typedef ::color::category::gray_ldouble category_type;
51117 	typedef ::color::trait::scalar<category_type>::instance_type scalar_type;
51118 	result.set<0>(std::pow(right.get<0>(), scalar_type(1)/value));
51119 	return result;
51120 }
51121 }
51122 }
51123 
51124 namespace color {
51125 namespace _internal {
51126 
51127 template< typename cmy_tag_name, typename gray_tag_name >
51128 struct convert
51129 	<
51130 	::color::category::cmy< cmy_tag_name >
51131 	,::color::category::gray<gray_tag_name>
51132 	> {
51133 public:
51134 	typedef ::color::category::cmy< cmy_tag_name > category_left_type;
51135 	typedef ::color::category::gray<gray_tag_name> category_right_type;
51136 
51137 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51138 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51139 
51140 	typedef ::color::operation::_internal::invert< category_right_type > invert_type;
51141 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
51142 
51143 	typedef typename container_left_trait_type::input_type container_left_input_type;
51144 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51145 
51146 	enum {
51147 		cyan_p = ::color::place::_internal::cyan<category_left_type>::position_enum
51148 		,magenta_p = ::color::place::_internal::magenta<category_left_type>::position_enum
51149 		, yellow_p = ::color::place::_internal::yellow<category_left_type>::position_enum
51150 	};
51151 
processcolor::_internal::convert51152 	static void process
51153 	(
51154 		container_left_input_type left
51155 		,container_right_const_input_type right
51156 	) {
51157 		container_left_trait_type::template set< cyan_p>(left, reformat_type::template process< cyan_p,0>(invert_type::template component<0>(container_right_trait_type::template get<0>(right))));
51158 		container_left_trait_type::template set<magenta_p>(left, reformat_type::template process<magenta_p,0>(invert_type::template component<0>(container_right_trait_type::template get<0>(right))));
51159 		container_left_trait_type::template set< yellow_p>(left, reformat_type::template process< yellow_p,0>(invert_type::template component<0>(container_right_trait_type::template get<0>(right))));
51160 	}
51161 };
51162 
51163 }
51164 }
51165 
51166 namespace color {
51167 namespace _internal {
51168 
51169 template< typename tag_left_name, typename tag_right_name >
51170 struct convert
51171 	<
51172 	::color::category::cmy< tag_left_name >
51173 	,::color::category::cmy< tag_right_name>
51174 	> {
51175 public:
51176 	typedef ::color::category::cmy< tag_left_name > category_left_type;
51177 	typedef ::color::category::cmy< tag_right_name> category_right_type;
51178 
51179 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51180 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51181 
51182 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
51183 
51184 	typedef typename container_left_trait_type::input_type container_left_input_type;
51185 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51186 
51187 	enum {
51188 		cl_p = ::color::place::_internal::cyan<category_left_type>::position_enum
51189 		,ml_p = ::color::place::_internal::magenta<category_left_type>::position_enum
51190 		,yl_p = ::color::place::_internal::yellow<category_left_type>::position_enum
51191 	};
51192 
51193 	enum {
51194 		cr_p = ::color::place::_internal::cyan<category_right_type>::position_enum
51195 		,mr_p = ::color::place::_internal::magenta<category_right_type>::position_enum
51196 		,yr_p = ::color::place::_internal::yellow<category_right_type>::position_enum
51197 	};
51198 
processcolor::_internal::convert51199 	static void process
51200 	(
51201 		container_left_input_type left
51202 		,container_right_const_input_type right
51203 	) {
51204 		container_left_trait_type::template set<cl_p>(left, reformat_type::template process<cl_p,cr_p>(container_right_trait_type::template get<cr_p>(right)));
51205 		container_left_trait_type::template set<ml_p>(left, reformat_type::template process<ml_p,mr_p>(container_right_trait_type::template get<mr_p>(right)));
51206 		container_left_trait_type::template set<yl_p>(left, reformat_type::template process<yl_p,yr_p>(container_right_trait_type::template get<yr_p>(right)));
51207 	}
51208 };
51209 }
51210 }
51211 
51212 namespace color {
51213 namespace _internal {
51214 
51215 template< typename cmy_tag_name, typename cmyk_tag_name >
51216 struct convert
51217 	<
51218 	::color::category::cmy< cmy_tag_name >
51219 	,::color::category::cmyk<cmyk_tag_name>
51220 	> {
51221 public:
51222 	typedef ::color::category::cmy< cmy_tag_name > category_left_type;
51223 	typedef ::color::category::cmyk<cmyk_tag_name> category_right_type;
51224 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
51225 
51226 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51227 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51228 
51229 	typedef typename container_left_trait_type::input_type container_left_input_type;
51230 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51231 
51232 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
51233 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
51234 
51235 	enum {
51236 		cl_p = ::color::place::_internal::cyan<category_left_type>::position_enum
51237 		,ml_p = ::color::place::_internal::magenta<category_left_type>::position_enum
51238 		,yl_p = ::color::place::_internal::yellow<category_left_type>::position_enum
51239 	};
51240 
51241 	enum {
51242 		cr_p = ::color::place::_internal::cyan<category_right_type>::position_enum
51243 		,mr_p = ::color::place::_internal::magenta<category_right_type>::position_enum
51244 		,yr_p = ::color::place::_internal::yellow<category_right_type>::position_enum
51245 		,kr_p = ::color::place::_internal::key<category_right_type>::position_enum
51246 	};
51247 
processcolor::_internal::convert51248 	static void process
51249 	(
51250 		container_left_input_type left
51251 		,container_right_const_input_type right
51252 	) {
51253 		scalar_type cc = normalize_type::template process<cr_p>(container_right_trait_type::template get<cr_p>(right));
51254 		scalar_type cm = normalize_type::template process<mr_p>(container_right_trait_type::template get<mr_p>(right));
51255 		scalar_type cy = normalize_type::template process<yr_p>(container_right_trait_type::template get<yr_p>(right));
51256 		scalar_type ck = normalize_type::template process<kr_p>(container_right_trait_type::template get<kr_p>(right));
51257 		scalar_type c = cc * (1-ck) + ck;
51258 		scalar_type m = cm * (1-ck) + ck;
51259 		scalar_type y = cy * (1-ck) + ck;
51260 		container_left_trait_type::template set<cl_p>(left, diverse_type::template process<cl_p>(c));
51261 		container_left_trait_type::template set<ml_p>(left, diverse_type::template process<ml_p>(m));
51262 		container_left_trait_type::template set<yl_p>(left, diverse_type::template process<yl_p>(y));
51263 	}
51264 };
51265 
51266 }
51267 }
51268 
51269 namespace color {
51270 namespace _internal {
51271 
51272 template< typename cmy_tag_name, typename hsl_tag_name >
51273 struct convert
51274 	<
51275 	::color::category::cmy< cmy_tag_name >
51276 	,::color::category::hsl<hsl_tag_name>
51277 	> {
51278 public:
51279 	typedef ::color::category::cmy< cmy_tag_name > category_left_type;
51280 	typedef ::color::category::hsl<hsl_tag_name> category_right_type;
51281 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
51282 
51283 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51284 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51285 
51286 	typedef typename container_left_trait_type::input_type container_left_input_type;
51287 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51288 
51289 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
51290 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
51291 
51292 	typedef ::color::_internal::convert< category_left_type, category_right_type > this_type;
51293 
51294 	enum {
51295 		cyan_p = ::color::place::_internal::cyan<category_left_type>::position_enum
51296 		,magenta_p = ::color::place::_internal::magenta<category_left_type>::position_enum
51297 		, yellow_p = ::color::place::_internal::yellow<category_left_type>::position_enum
51298 	};
51299 
51300 	enum {
51301 		hue_p = ::color::place::_internal::hue<category_right_type>::position_enum
51302 		,saturation_p = ::color::place::_internal::saturation<category_right_type>::position_enum
51303 		, lightness_p = ::color::place::_internal::lightness<category_right_type>::position_enum
51304 	};
51305 
processcolor::_internal::convert51306 	static void process
51307 	(
51308 		container_left_input_type left
51309 		,container_right_const_input_type right
51310 	) {
51311 		scalar_type h = normalize_type::template process< hue_p>(container_right_trait_type::template get< hue_p>(right));
51312 		scalar_type s = normalize_type::template process<saturation_p>(container_right_trait_type::template get<saturation_p>(right));
51313 		scalar_type l = normalize_type::template process< lightness_p>(container_right_trait_type::template get< lightness_p>(right));
51314 		scalar_type r;
51315 		scalar_type g;
51316 		scalar_type b;
51317 		if(s == 0) {
51318 			r = l;
51319 			g = l;
51320 			b = l;
51321 		} else {
51322 			scalar_type q = l < scalar_type(0.5) ? (l * (1 + s)) : (l + s - l * s);
51323 			scalar_type p = scalar_type(2) * l - q;
51324 			r = this_type::value(p, q, h + (scalar_type(1) / scalar_type(3)) + (scalar_type(2) / scalar_type(3) < h ? -1 :0));
51325 			g = this_type::value(p, q, h);
51326 			b = this_type::value(p, q, h - (scalar_type(1) / scalar_type(3)) + (h < scalar_type(1) / scalar_type(3) ? +1 :0));
51327 		}
51328 		container_left_trait_type::template set< cyan_p>(left, diverse_type::template process< cyan_p>(scalar_type(1) - r));
51329 		container_left_trait_type::template set<magenta_p>(left, diverse_type::template process<magenta_p>(scalar_type(1) - g));
51330 		container_left_trait_type::template set< yellow_p>(left, diverse_type::template process< yellow_p>(scalar_type(1) - b));
51331 	}
51332 
51333 private:
valuecolor::_internal::convert51334 	static scalar_type value(scalar_type const& p, scalar_type const& q, scalar_type const& t) {
51335 		if(t < scalar_type(1)/scalar_type(6)) {
51336 			return (p + (q - p) * scalar_type(6) * t);
51337 		}
51338 		if(t < scalar_type(1)/scalar_type(2)) {
51339 			return (q);
51340 		}
51341 		if(t < scalar_type(2)/scalar_type(3)) {
51342 			return (p + (q - p) * ((scalar_type(2)/scalar_type(3)) - t) * scalar_type(6));
51343 		}
51344 		return p ;
51345 	}
51346 };
51347 
51348 }
51349 }
51350 
51351 namespace color {
51352 namespace _internal {
51353 
51354 template< typename cmy_tag_name, typename hsv_tag_name >
51355 struct convert
51356 	<
51357 	::color::category::cmy< cmy_tag_name >
51358 	,::color::category::hsv<hsv_tag_name>
51359 	> {
51360 public:
51361 	typedef ::color::category::cmy< cmy_tag_name > category_left_type;
51362 	typedef ::color::category::hsv<hsv_tag_name> category_right_type;
51363 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
51364 
51365 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51366 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51367 
51368 	typedef typename container_left_trait_type::input_type container_left_input_type;
51369 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51370 
51371 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
51372 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
51373 
51374 	enum {
51375 		cyan_p = ::color::place::_internal::cyan<category_left_type>::position_enum
51376 		,magenta_p = ::color::place::_internal::magenta<category_left_type>::position_enum
51377 		,yellow_p = ::color::place::_internal::yellow<category_left_type>::position_enum
51378 	};
51379 
51380 	enum {
51381 		hue_p = ::color::place::_internal::hue<category_right_type>::position_enum
51382 		,saturation_p = ::color::place::_internal::saturation<category_right_type>::position_enum
51383 		,value_p = ::color::place::_internal::value<category_right_type>::position_enum
51384 	};
51385 
processcolor::_internal::convert51386 	static void process
51387 	(
51388 		container_left_input_type left
51389 		,container_right_const_input_type right
51390 	) {
51391 		scalar_type h = normalize_type::template process<hue_p >(container_right_trait_type::template get<hue_p >(right));
51392 		scalar_type s = normalize_type::template process<saturation_p>(container_right_trait_type::template get<saturation_p>(right));
51393 		scalar_type v = normalize_type::template process<value_p >(container_right_trait_type::template get<value_p >(right));
51394 		int region = int(6 * h);
51395 		scalar_type f = h * 6 - region ;
51396 		scalar_type p = v * (1 - s);
51397 		scalar_type q = v * (1 - f * s);
51398 		scalar_type t = v * (1 - (1 - f) * s);
51399 		scalar_type r;
51400 		scalar_type g;
51401 		scalar_type b;
51402 		switch(region % 6) {
51403 		case 0:
51404 			r = v, g = t, b = p;
51405 			break;
51406 		case 1:
51407 			r = q, g = v, b = p;
51408 			break;
51409 		case 2:
51410 			r = p, g = v, b = t;
51411 			break;
51412 		case 3:
51413 			r = p, g = q, b = v;
51414 			break;
51415 		case 4:
51416 			r = t, g = p, b = v;
51417 			break;
51418 		case 5:
51419 			r = v, g = p, b = q;
51420 			break;
51421 		}
51422 		container_left_trait_type::template set<cyan_p >(left, diverse_type::template process<cyan_p >(scalar_type(1) - r));
51423 		container_left_trait_type::template set<magenta_p>(left, diverse_type::template process<magenta_p>(scalar_type(1) - g));
51424 		container_left_trait_type::template set<yellow_p >(left, diverse_type::template process<yellow_p >(scalar_type(1) - b));
51425 	}
51426 };
51427 
51428 }
51429 }
51430 
51431 namespace color {
51432 namespace _internal {
51433 
51434 template< typename cmy_tag_name, typename hsi_tag_name >
51435 struct convert
51436 	<
51437 	::color::category::cmy< cmy_tag_name >
51438 	,::color::category::hsi<hsi_tag_name>
51439 	> {
51440 public:
51441 	typedef ::color::category::cmy< cmy_tag_name > category_left_type;
51442 	typedef ::color::category::hsi<hsi_tag_name> category_right_type;
51443 
51444 	typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type;
51445 
51446 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51447 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51448 
51449 	typedef typename container_left_trait_type::input_type container_left_input_type;
51450 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51451 
51452 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
51453 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
51454 
51455 	typedef ::color::constant::generic< category_left_type > constant_type;
51456 
51457 	enum {
51458 		cyan_p = ::color::place::_internal::cyan<category_left_type>::position_enum
51459 		,magenta_p = ::color::place::_internal::magenta<category_left_type>::position_enum
51460 		,yellow_p = ::color::place::_internal::yellow<category_left_type>::position_enum
51461 	};
51462 
51463 	enum {
51464 		hue_p = ::color::place::_internal::hue<category_right_type>::position_enum
51465 		,saturation_p = ::color::place::_internal::saturation<category_right_type>::position_enum
51466 		,intensity_p = ::color::place::_internal::intensity<category_right_type>::position_enum
51467 	};
51468 
processcolor::_internal::convert51469 	static void process
51470 	(
51471 		container_left_input_type left
51472 		,container_right_const_input_type right
51473 	) {
51474 		scalar_type h = normalize_type::template process<hue_p >(container_right_trait_type::template get<hue_p >(right));
51475 		scalar_type s = normalize_type::template process<saturation_p>(container_right_trait_type::template get<saturation_p>(right));
51476 		scalar_type i = normalize_type::template process<intensity_p >(container_right_trait_type::template get<intensity_p >(right));
51477 		scalar_type min = i * (1 - s);
51478 		int region = int(3 * h);
51479 		h -= region * constant_type::third();
51480 		h *= constant_type::two_pi();
51481 		scalar_type n = i*(1+ s*cos(h) / cos(constant_type::deg60() - h));
51482 		scalar_type r;
51483 		scalar_type g;
51484 		scalar_type b;
51485 		switch(region % 3) {
51486 		case 0:
51487 			r = n;
51488 			b = min;
51489 			g = 3*i-(r+b);
51490 			break;
51491 		case 1:
51492 			g = n;
51493 			r = min;
51494 			b = 3*i-(r+g);
51495 			break;
51496 		case 2:
51497 			b = n;
51498 			g = min;
51499 			r = 3*i-(g+b);
51500 			break;
51501 		}
51502 		container_left_trait_type::template set<cyan_p >(left, diverse_type::template process<cyan_p >(scalar_type(1) - r));
51503 		container_left_trait_type::template set<magenta_p>(left, diverse_type::template process<magenta_p>(scalar_type(1) - g));
51504 		container_left_trait_type::template set<yellow_p >(left, diverse_type::template process<yellow_p >(scalar_type(1) - b));
51505 	}
51506 };
51507 
51508 }
51509 }
51510 
51511 namespace color {
51512 namespace _internal {
51513 
51514 template
51515 <
51516 	typename cmy_tag_name
51517 	,typename hwb_tag_name
51518 	>
51519 struct convert
51520 	<
51521 	::color::category::cmy< cmy_tag_name >
51522 	,::color::category::hwb< hwb_tag_name >
51523 	> {
51524 public:
51525 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_left_type;
51526 	typedef ::color::category::hwb< hwb_tag_name > hwb_category_type, category_right_type;
51527 
51528 	typedef typename ::color::trait::scalar< cmy_category_type >::instance_type scalar_type;
51529 
51530 	typedef ::color::model< cmy_category_type > cmy_model_type;
51531 	typedef ::color::model< hwb_category_type > hwb_model_type;
51532 
51533 	typedef ::color::rgb< scalar_type > rgb_model_type;
51534 	typedef ::color::hsv< scalar_type > hsv_model_type;
51535 
51536 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51537 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51538 
51539 	typedef typename container_left_trait_type::input_type container_left_input_type;
51540 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51541 
processcolor::_internal::convert51542 	static void process
51543 	(
51544 		container_left_input_type left
51545 		,container_right_const_input_type right
51546 	) {
51547 		left = cmy_model_type(rgb_model_type(hsv_model_type(hwb_model_type(right)))).container();
51548 	}
51549 };
51550 
51551 }
51552 }
51553 
51554 namespace color {
51555 namespace _internal {
51556 
51557 template< typename cmy_tag_name, typename rgb_tag_name >
51558 struct convert
51559 	<
51560 	::color::category::cmy< cmy_tag_name >
51561 	,::color::category::rgb<rgb_tag_name>
51562 	> {
51563 public:
51564 	typedef ::color::category::cmy< cmy_tag_name > category_left_type;
51565 	typedef ::color::category::rgb<rgb_tag_name> category_right_type;
51566 
51567 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51568 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51569 
51570 	typedef typename container_left_trait_type::input_type container_left_input_type;
51571 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51572 
51573 	typedef ::color::_internal::reformat< category_left_type, category_right_type > reformat_type;
51574 	typedef ::color::operation::_internal::invert< category_right_type > invert_type;
51575 
51576 	enum {
51577 		cyan_p = ::color::place::_internal::cyan<category_left_type>::position_enum
51578 		,magenta_p = ::color::place::_internal::magenta<category_left_type>::position_enum
51579 		, yellow_p = ::color::place::_internal::yellow<category_left_type>::position_enum
51580 	};
51581 
51582 	enum {
51583 		red_p = ::color::place::_internal::red<category_right_type>::position_enum
51584 		,green_p = ::color::place::_internal::green<category_right_type>::position_enum
51585 		,blue_p = ::color::place::_internal::blue<category_right_type>::position_enum
51586 	};
51587 
processcolor::_internal::convert51588 	static void process
51589 	(
51590 		container_left_input_type left
51591 		,container_right_const_input_type right
51592 	) {
51593 		container_left_trait_type::template set< cyan_p>(left, reformat_type::template process< cyan_p,red_p >(invert_type::template component<red_p >(container_right_trait_type::template get<red_p >(right))));
51594 		container_left_trait_type::template set<magenta_p>(left, reformat_type::template process<magenta_p,green_p>(invert_type::template component<green_p>(container_right_trait_type::template get<green_p>(right))));
51595 		container_left_trait_type::template set< yellow_p>(left, reformat_type::template process< yellow_p,blue_p >(invert_type::template component<blue_p >(container_right_trait_type::template get<blue_p >(right))));
51596 	}
51597 };
51598 
51599 }
51600 }
51601 
51602 namespace color {
51603 namespace _internal {
51604 
51605 template< typename cmy_tag_name, typename yiq_tag_name >
51606 struct convert
51607 	<
51608 	::color::category::cmy< cmy_tag_name >
51609 	,::color::category::yiq<yiq_tag_name>
51610 	> {
51611 public:
51612 	typedef ::color::category::cmy< cmy_tag_name > category_left_type;
51613 	typedef ::color::category::yiq<yiq_tag_name> category_right_type;
51614 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
51615 
51616 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51617 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51618 
51619 	typedef typename container_left_trait_type::input_type container_left_input_type;
51620 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51621 
51622 	typedef ::color::constant::yiq< category_right_type > yiq_const_type;
51623 
51624 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
51625 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
51626 
51627 	enum {
51628 		cyan_p = ::color::place::_internal::cyan<category_left_type>::position_enum
51629 		,magenta_p = ::color::place::_internal::magenta<category_left_type>::position_enum
51630 		, yellow_p = ::color::place::_internal::yellow<category_left_type>::position_enum
51631 	};
51632 
51633 	enum {
51634 		luma_p = ::color::place::_internal::luma<category_right_type>::position_enum
51635 		, inphase_p = ::color::place::_internal::inphase<category_right_type>::position_enum
51636 		,quadrature_p = ::color::place::_internal::quadrature<category_right_type>::position_enum
51637 	};
51638 
processcolor::_internal::convert51639 	static void process
51640 	(
51641 		container_left_input_type left
51642 		,container_right_const_input_type right
51643 	) {
51644 		static const scalar_type a11 = yiq_const_type::a11(), a12 = yiq_const_type::a12(), a13 = yiq_const_type::a13();
51645 		static const scalar_type a21 = yiq_const_type::a21(), a22 = yiq_const_type::a22(), a23 = yiq_const_type::a23();
51646 		static const scalar_type a31 = yiq_const_type::a31(), a32 = yiq_const_type::a32(), a33 = yiq_const_type::a33();
51647 		scalar_type y = normalize_type::template process< luma_p>(container_right_trait_type::template get< luma_p>(right));
51648 		scalar_type i = normalize_type::template process< inphase_p>(container_right_trait_type::template get< inphase_p>(right));
51649 		scalar_type q = normalize_type::template process<quadrature_p>(container_right_trait_type::template get<quadrature_p>(right));
51650 		i = yiq_const_type::i_diverse(i);
51651 		q = yiq_const_type::q_diverse(q);
51652 		scalar_type r = a11 * y + a12 * i + a13 * q;
51653 		scalar_type g = a21 * y + a22 * i + a23 * q;
51654 		scalar_type b = a31 * y + a32 * i + a33 * q;
51655 		container_left_trait_type::template set< cyan_p>(left, diverse_type::template process< cyan_p>(scalar_type(1) - r));
51656 		container_left_trait_type::template set< magenta_p>(left, diverse_type::template process<magenta_p>(scalar_type(1) - g));
51657 		container_left_trait_type::template set< yellow_p>(left, diverse_type::template process< yellow_p>(scalar_type(1) - b));
51658 	}
51659 };
51660 
51661 }
51662 }
51663 
51664 namespace color {
51665 namespace _internal {
51666 
51667 template
51668 <
51669 	typename cmy_tag_name
51670 	,typename yuv_tag_name, ::color::constant::yuv::reference_enum yuv_reference_number
51671 	>
51672 struct convert
51673 	<
51674 	::color::category::cmy< cmy_tag_name >
51675 	,::color::category::yuv<yuv_tag_name, yuv_reference_number>
51676 	> {
51677 public:
51678 	typedef ::color::category::cmy< cmy_tag_name > category_left_type;
51679 	typedef ::color::category::yuv<yuv_tag_name, yuv_reference_number> category_right_type;
51680 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
51681 
51682 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51683 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51684 
51685 	typedef typename container_left_trait_type::input_type container_left_input_type;
51686 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51687 
51688 	typedef ::color::constant::yuv::parameter< yuv_tag_name, yuv_reference_number > yuv_parameter_type;
51689 
51690 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
51691 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
51692 
51693 	enum {
51694 		cyan_p = ::color::place::_internal::cyan<category_left_type>::position_enum
51695 		,magenta_p = ::color::place::_internal::magenta<category_left_type>::position_enum
51696 		, yellow_p = ::color::place::_internal::yellow<category_left_type>::position_enum
51697 	};
51698 
processcolor::_internal::convert51699 	static void process
51700 	(
51701 		container_left_input_type left
51702 		,container_right_const_input_type right
51703 	) {
51704 		static scalar_type const Wr = yuv_parameter_type::Wr();
51705 		static scalar_type const Wb = yuv_parameter_type::Wb();
51706 		static scalar_type const Wg = yuv_parameter_type::Wg();
51707 		static scalar_type const Umax = yuv_parameter_type::Umax();
51708 		static scalar_type const Vmax = yuv_parameter_type::Vmax();
51709 		static scalar_type const b11 = 1, b12 = 0, b13 = (1 - Wr) / Vmax;
51710 		static scalar_type const b21 = 1, b22 = - Wb*(1 - Wb) / Umax / Wg, b23 = -Wr*(1 - Wr) / Vmax / Wg;
51711 		static scalar_type const b31 = 1, b32 = ((1 - Wb) / Umax), b33 = 0;
51712 		scalar_type y = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
51713 		scalar_type u = normalize_type::template process<1>(container_right_trait_type::template get<1>(right));
51714 		scalar_type v = normalize_type::template process<2>(container_right_trait_type::template get<2>(right));
51715 		u = (u - scalar_type(0.5)) * scalar_type(2) * Umax;
51716 		v = (v - scalar_type(0.5)) * scalar_type(2) * Vmax;
51717 		scalar_type r = y + v * b13;
51718 		scalar_type g = y + u * b22 + v * b23;
51719 		scalar_type b = y + u * b32 ;
51720 		container_left_trait_type::template set< cyan_p>(left, diverse_type::template process< cyan_p>(scalar_type(1) - r));
51721 		container_left_trait_type::template set<magenta_p>(left, diverse_type::template process<magenta_p>(scalar_type(1) - g));
51722 		container_left_trait_type::template set< yellow_p>(left, diverse_type::template process< yellow_p>(scalar_type(1) - b));
51723 	}
51724 };
51725 
51726 }
51727 }
51728 
51729 namespace color {
51730 namespace _internal {
51731 
51732 template< typename cmy_tag_name, typename YCgCo_tag_name >
51733 struct convert
51734 	<
51735 	::color::category::cmy< cmy_tag_name >
51736 	,::color::category::YCgCo< YCgCo_tag_name>
51737 	> {
51738 public:
51739 	typedef ::color::category::cmy< cmy_tag_name > category_left_type;
51740 	typedef ::color::category::YCgCo<YCgCo_tag_name> category_right_type;
51741 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
51742 
51743 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51744 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51745 
51746 	typedef typename container_left_trait_type::input_type container_left_input_type;
51747 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51748 
51749 	typedef ::color::constant::YCgCo< category_right_type > YCgCo_const_type;
51750 
51751 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
51752 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
51753 
51754 	enum {
51755 		cyan_p = ::color::place::_internal:: cyan<category_left_type>::position_enum
51756 		,magenta_p = ::color::place::_internal::magenta<category_left_type>::position_enum
51757 		, yellow_p = ::color::place::_internal:: yellow<category_left_type>::position_enum
51758 	};
51759 
processcolor::_internal::convert51760 	static void process
51761 	(
51762 		container_left_input_type left
51763 		,container_right_const_input_type right
51764 	) {
51765 		scalar_type Y = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
51766 		scalar_type Cg = normalize_type::template process<1>(container_right_trait_type::template get<1>(right));
51767 		scalar_type Co = normalize_type::template process<2>(container_right_trait_type::template get<2>(right));
51768 		Cg = YCgCo_const_type::Cg_diverse(Cg);
51769 		Co = YCgCo_const_type::Co_diverse(Co);
51770 		scalar_type r = Y - Cg + Co;
51771 		scalar_type g = Y + Cg;
51772 		scalar_type b = Y - Cg - Co;
51773 		container_left_trait_type::template set< cyan_p>(left, diverse_type::template process< cyan_p>(scalar_type(1) - r));
51774 		container_left_trait_type::template set<magenta_p>(left, diverse_type::template process<magenta_p>(scalar_type(1) - g));
51775 		container_left_trait_type::template set< yellow_p>(left, diverse_type::template process< yellow_p>(scalar_type(1) - b));
51776 	}
51777 };
51778 
51779 }
51780 }
51781 
51782 namespace color {
51783 namespace _internal {
51784 
51785 template< typename cmy_tag_name, typename YDbDr_tag_name >
51786 struct convert
51787 	<
51788 	::color::category::cmy< cmy_tag_name >
51789 	,::color::category::YDbDr< YDbDr_tag_name>
51790 	> {
51791 public:
51792 	typedef ::color::category::cmy< cmy_tag_name > category_left_type;
51793 	typedef ::color::category::YDbDr<YDbDr_tag_name> category_right_type;
51794 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
51795 
51796 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51797 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51798 
51799 	typedef typename container_left_trait_type::input_type container_left_input_type;
51800 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51801 
51802 	typedef ::color::constant::YDbDr< category_right_type > YDbDr_const_type;
51803 
51804 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
51805 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
51806 
51807 	enum {
51808 		cyan_p = ::color::place::_internal::cyan<category_left_type>::position_enum
51809 		,magenta_p = ::color::place::_internal::magenta<category_left_type>::position_enum
51810 		, yellow_p = ::color::place::_internal::yellow<category_left_type>::position_enum
51811 	};
51812 
processcolor::_internal::convert51813 	static void process
51814 	(
51815 		container_left_input_type left
51816 		,container_right_const_input_type right
51817 	) {
51818 		static scalar_type const Wr = YDbDr_const_type::Wr();
51819 		static scalar_type const Wb = YDbDr_const_type::Wb();
51820 		static scalar_type const Wg = YDbDr_const_type::Wg();
51821 		static scalar_type const Umax = YDbDr_const_type::Umax();
51822 		static scalar_type const Vmax = YDbDr_const_type::Vmax();
51823 		static scalar_type const b11 = 1, b12 = 0, b13 = (1 - Wr) / Vmax;
51824 		static scalar_type const b21 = 1, b22 = - Wb*(1 - Wb) / Umax / Wg, b23 = -Wr*(1 - Wr) / Vmax / Wg;
51825 		static scalar_type const b31 = 1, b32 = ((1 - Wb) / Umax), b33 = 0;
51826 		scalar_type Y = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
51827 		scalar_type Db = normalize_type::template process<1>(container_right_trait_type::template get<1>(right));
51828 		scalar_type Dr = normalize_type::template process<2>(container_right_trait_type::template get<2>(right));
51829 		scalar_type u = YDbDr_const_type::DB_diverse(Db) / YDbDr_const_type::DB_scale();
51830 		scalar_type v = YDbDr_const_type::DR_diverse(Dr) / YDbDr_const_type::DR_scale();
51831 		scalar_type r = Y + v * b13;
51832 		scalar_type g = Y + u * b22 + v * b23;
51833 		scalar_type b = Y + u * b32;
51834 		container_left_trait_type::template set< cyan_p>(left, diverse_type::template process< cyan_p>(scalar_type(1) - r));
51835 		container_left_trait_type::template set<magenta_p>(left, diverse_type::template process<magenta_p>(scalar_type(1) - g));
51836 		container_left_trait_type::template set< yellow_p>(left, diverse_type::template process< yellow_p>(scalar_type(1) - b));
51837 	}
51838 };
51839 
51840 }
51841 }
51842 
51843 namespace color {
51844 namespace _internal {
51845 
51846 template
51847 <
51848 	typename cmy_tag_name
51849 	,typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
51850 	>
51851 struct convert
51852 	<
51853 	::color::category::cmy< cmy_tag_name >
51854 	,::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number>
51855 	> {
51856 public:
51857 	typedef ::color::category::cmy< cmy_tag_name > category_left_type;
51858 	typedef ::color::category::YPbPr<YPbPr_tag_name, YPbPr_reference_number> category_right_type;
51859 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
51860 
51861 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51862 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51863 
51864 	typedef typename container_left_trait_type::input_type container_left_input_type;
51865 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51866 
51867 	typedef ::color::constant::YPbPr::parameter< YPbPr_tag_name, YPbPr_reference_number > YPbPr_parameter_type;
51868 
51869 	typedef ::color::_internal::diverse< category_left_type > diverse_type;
51870 	typedef ::color::_internal::normalize< category_right_type > normalize_type;
51871 
51872 	enum {
51873 		cyan_p = ::color::place::_internal::cyan<category_left_type>::position_enum
51874 		,magenta_p = ::color::place::_internal::magenta<category_left_type>::position_enum
51875 		, yellow_p = ::color::place::_internal::yellow<category_left_type>::position_enum
51876 	};
51877 
processcolor::_internal::convert51878 	static void process
51879 	(
51880 		container_left_input_type left
51881 		,container_right_const_input_type right
51882 	) {
51883 		scalar_type Y = normalize_type::template process<0>(container_right_trait_type::template get<0>(right));
51884 		scalar_type Pb = normalize_type::template process<1>(container_right_trait_type::template get<1>(right));
51885 		scalar_type Pr = normalize_type::template process<2>(container_right_trait_type::template get<2>(right));
51886 		Pb = YPbPr_parameter_type::Pb_diverse(Pb);
51887 		Pr = YPbPr_parameter_type::Pr_diverse(Pr);
51888 		scalar_type r = YPbPr_parameter_type::a11() * Y + YPbPr_parameter_type::a12() * Pb + YPbPr_parameter_type::a13() * Pr;
51889 		scalar_type g = YPbPr_parameter_type::a21() * Y + YPbPr_parameter_type::a22() * Pb + YPbPr_parameter_type::a23() * Pr;
51890 		scalar_type b = YPbPr_parameter_type::a31() * Y + YPbPr_parameter_type::a32() * Pb + YPbPr_parameter_type::a33() * Pr;
51891 		container_left_trait_type::template set< cyan_p>(left, diverse_type::template process< cyan_p>(scalar_type(1) - r));
51892 		container_left_trait_type::template set<magenta_p>(left, diverse_type::template process<magenta_p>(scalar_type(1) - g));
51893 		container_left_trait_type::template set< yellow_p>(left, diverse_type::template process< yellow_p>(scalar_type(1) - b));
51894 	}
51895 };
51896 
51897 }
51898 }
51899 
51900 namespace color {
51901 namespace _internal {
51902 
51903 template
51904 <
51905 	typename cmy_tag_name
51906 	,typename xyz_tag_name
51907 	>
51908 struct convert
51909 	<
51910 	::color::category::cmy< cmy_tag_name >
51911 	,::color::category::xyz< xyz_tag_name >
51912 	> {
51913 public:
51914 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_left_type;
51915 	typedef ::color::category::xyz< xyz_tag_name > xyz_category_type, category_right_type;
51916 
51917 	typedef typename ::color::trait::scalar< cmy_category_type >::instance_type scalar_type;
51918 
51919 	typedef ::color::model< cmy_category_type > cmy_model_type;
51920 	typedef ::color::model< xyz_category_type > xyz_model_type;
51921 
51922 	typedef ::color::rgb< scalar_type > rgb_model_type;
51923 
51924 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51925 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51926 
51927 	typedef typename container_left_trait_type::input_type container_left_input_type;
51928 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51929 
processcolor::_internal::convert51930 	static void process
51931 	(
51932 		container_left_input_type left
51933 		,container_right_const_input_type right
51934 	) {
51935 		left = cmy_model_type(rgb_model_type(xyz_model_type(right))).container();
51936 	}
51937 };
51938 
51939 }
51940 }
51941 
51942 namespace color {
51943 namespace _internal {
51944 
51945 template
51946 <
51947 	typename cmy_tag_name
51948 	,typename lab_tag_name, ::color::constant::lab::reference_enum lab_reference_number
51949 	>
51950 struct convert
51951 	<
51952 	::color::category::cmy< cmy_tag_name >
51953 	,::color::category::lab< lab_tag_name, lab_reference_number >
51954 	> {
51955 public:
51956 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_left_type;
51957 	typedef ::color::category::lab< lab_tag_name, lab_reference_number > lab_category_type, category_right_type;
51958 
51959 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
51960 
51961 	typedef ::color::model< cmy_category_type > cmy_model_type;
51962 	typedef ::color::model< lab_category_type > lab_model_type;
51963 
51964 	typedef ::color::rgb< scalar_type > rgb_model_type;
51965 	typedef ::color::xyz< scalar_type > xyz_model_type;
51966 
51967 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
51968 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
51969 
51970 	typedef typename container_left_trait_type::input_type container_left_input_type;
51971 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
51972 
processcolor::_internal::convert51973 	static void process
51974 	(
51975 		container_left_input_type left
51976 		,container_right_const_input_type right
51977 	) {
51978 		left = cmy_model_type(rgb_model_type(xyz_model_type(lab_model_type(right)))).container();
51979 	}
51980 };
51981 
51982 }
51983 }
51984 
51985 namespace color {
51986 namespace _internal {
51987 
51988 template
51989 <
51990 	typename cmy_tag_name
51991 	,typename xyy_tag_name
51992 	>
51993 struct convert
51994 	<
51995 	::color::category::cmy< cmy_tag_name >
51996 	,::color::category::xyy< xyy_tag_name >
51997 	> {
51998 public:
51999 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_left_type;
52000 	typedef ::color::category::xyy< xyy_tag_name > xyy_category_type, category_right_type;
52001 
52002 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
52003 
52004 	typedef ::color::model< cmy_category_type > cmy_model_type;
52005 	typedef ::color::model< xyy_category_type > xyy_model_type;
52006 
52007 	typedef ::color::rgb< scalar_type > rgb_model_type;
52008 	typedef ::color::xyz< scalar_type > xyz_model_type;
52009 
52010 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
52011 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
52012 
52013 	typedef typename container_left_trait_type::input_type container_left_input_type;
52014 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
52015 
processcolor::_internal::convert52016 	static void process
52017 	(
52018 		container_left_input_type left
52019 		,container_right_const_input_type right
52020 	) {
52021 		left = cmy_model_type(rgb_model_type(xyz_model_type(xyy_model_type(right)))).container();
52022 	}
52023 };
52024 
52025 }
52026 }
52027 
52028 namespace color {
52029 namespace _internal {
52030 
52031 template
52032 <
52033 	typename cmy_tag_name
52034 	,typename lms_tag_name, ::color::constant::lms::reference_enum lms_reference_number
52035 	>
52036 struct convert
52037 	<
52038 	::color::category::cmy< cmy_tag_name >
52039 	,::color::category::lms< lms_tag_name, lms_reference_number >
52040 	> {
52041 public:
52042 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_left_type;
52043 	typedef ::color::category::lms< lms_tag_name, lms_reference_number > lms_category_type, category_right_type;
52044 
52045 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
52046 
52047 	typedef ::color::model< cmy_category_type > cmy_model_type;
52048 	typedef ::color::model< lms_category_type > lms_model_type;
52049 
52050 	typedef ::color::rgb< scalar_type > rgb_model_type;
52051 	typedef ::color::xyz< scalar_type > xyz_model_type;
52052 
52053 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
52054 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
52055 
52056 	typedef typename container_left_trait_type::input_type container_left_input_type;
52057 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
52058 
processcolor::_internal::convert52059 	static void process
52060 	(
52061 		container_left_input_type left
52062 		,container_right_const_input_type right
52063 	) {
52064 		left = cmy_model_type(rgb_model_type(xyz_model_type(lms_model_type(right)))).container();
52065 	}
52066 };
52067 
52068 }
52069 }
52070 
52071 namespace color {
52072 namespace _internal {
52073 
52074 template
52075 <
52076 	typename cmy_tag_name
52077 	,typename luv_tag_name
52078 	>
52079 struct convert
52080 	<
52081 	::color::category::cmy< cmy_tag_name >
52082 	,::color::category::luv< luv_tag_name >
52083 	> {
52084 public:
52085 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_left_type;
52086 	typedef ::color::category::luv< luv_tag_name > luv_category_type, category_right_type;
52087 
52088 	typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
52089 
52090 	typedef ::color::model< cmy_category_type > cmy_model_type;
52091 	typedef ::color::model< luv_category_type > luv_model_type;
52092 
52093 	typedef ::color::rgb< scalar_type > rgb_model_type;
52094 	typedef ::color::xyz< scalar_type > xyz_model_type;
52095 
52096 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
52097 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
52098 
52099 	typedef typename container_left_trait_type::input_type container_left_input_type;
52100 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
52101 
processcolor::_internal::convert52102 	static void process
52103 	(
52104 		container_left_input_type left
52105 		,container_right_const_input_type right
52106 	) {
52107 		left = cmy_model_type(rgb_model_type(xyz_model_type(luv_model_type(right)))).container();
52108 	}
52109 };
52110 
52111 }
52112 }
52113 
52114 namespace color {
52115 namespace _internal {
52116 
52117 template
52118 <
52119 	typename cmy_tag_name
52120 	,typename LabCH_tag_name
52121 	>
52122 struct convert
52123 	<
52124 	::color::category::cmy< cmy_tag_name >
52125 	,::color::category::LabCH< LabCH_tag_name >
52126 	> {
52127 public:
52128 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_left_type;
52129 	typedef ::color::category::LabCH< LabCH_tag_name > LabCH_category_type, category_right_type;
52130 
52131 	typedef typename ::color::trait::scalar< cmy_category_type >::instance_type scalar_type;
52132 
52133 	typedef ::color::model< LabCH_category_type > LabCH_model_type;
52134 	typedef ::color::model< cmy_category_type > cmy_model_type;
52135 
52136 	typedef ::color::lab< scalar_type > lab_model_type;
52137 	typedef ::color::xyz< scalar_type > xyz_model_type;
52138 	typedef ::color::rgb< scalar_type > rgb_model_type;
52139 
52140 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
52141 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
52142 
52143 	typedef typename container_left_trait_type::input_type container_left_input_type;
52144 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
52145 
processcolor::_internal::convert52146 	static void process
52147 	(
52148 		container_left_input_type left
52149 		,container_right_const_input_type right
52150 	) {
52151 		left = cmy_model_type(rgb_model_type(xyz_model_type(lab_model_type(LabCH_model_type(right))))).container();
52152 	}
52153 };
52154 
52155 }
52156 }
52157 
52158 namespace color {
52159 namespace _internal {
52160 
52161 template
52162 <
52163 	typename cmy_tag_name
52164 	,typename LuvCH_tag_name
52165 	>
52166 struct convert
52167 	<
52168 	::color::category::cmy< cmy_tag_name >
52169 	,::color::category::LuvCH< LuvCH_tag_name >
52170 	> {
52171 public:
52172 	typedef ::color::category::cmy< cmy_tag_name > cmy_category_type, category_left_type;
52173 	typedef ::color::category::LuvCH< LuvCH_tag_name > LuvCH_category_type, category_right_type;
52174 
52175 	typedef typename ::color::trait::scalar< cmy_category_type >::instance_type scalar_type;
52176 
52177 	typedef ::color::model< cmy_category_type > cmy_model_type;
52178 	typedef ::color::model< LuvCH_category_type > LuvCH_model_type;
52179 
52180 	typedef ::color::rgb< scalar_type > rgb_model_type;
52181 	typedef ::color::xyz< scalar_type > xyz_model_type;
52182 	typedef ::color::luv< scalar_type > luv_model_type;
52183 
52184 	typedef ::color::trait::container<category_left_type> container_left_trait_type;
52185 	typedef ::color::trait::container<category_right_type> container_right_trait_type;
52186 
52187 	typedef typename container_left_trait_type::input_type container_left_input_type;
52188 	typedef typename container_right_trait_type::model_type container_right_const_input_type;
52189 
processcolor::_internal::convert52190 	static void process
52191 	(
52192 		container_left_input_type left
52193 		,container_right_const_input_type right
52194 	) {
52195 		left = cmy_model_type(rgb_model_type(xyz_model_type(luv_model_type(LuvCH_model_type(right))))).container();
52196 	}
52197 };
52198 
52199 }
52200 }
52201 
52202 namespace color {
52203 namespace operation {
52204 namespace _internal {
52205 
52206 template< typename category_name>
52207 struct addition {
52208 public:
52209 	typedef category_name category_type;
52210 
52211 	typedef ::color::trait::index< category_type > index_trait_type;
52212 	typedef ::color::trait::container< category_type > container_trait_type;
52213 
52214 	typedef ::color::model<category_type> model_type;
52215 
52216 	typedef model_type & model_output_type;
52217 	typedef model_type const& model_const_input_type;
52218 
52219 	typedef model_type result_type;
52220 	typedef model_type left_type, first_argument_type;
52221 	typedef model_type right_type, second_argument_type;
52222 
52223 	typedef typename index_trait_type::instance_type index_type;
52224 
52225 	typedef ::color::operation::_internal::addition<category_type> this_type;
52226 
operator ()color::operation::_internal::addition52227 	model_type operator()(model_type const& left, model_type const& right) const {
52228 		return this_type::function(left, right);
52229 	}
52230 
operator ()color::operation::_internal::addition52231 	model_type& operator()(model_output_type result, model_const_input_type left, model_const_input_type right) const {
52232 		return this_type::procedure(result, left, right);
52233 	}
52234 
52235 public:
accumulatecolor::operation::_internal::addition52236 	static model_type & accumulate(model_output_type result, model_const_input_type right) {
52237 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52238 			result.set(index, result.get(index) + right.get(index));
52239 		}
52240 		return result;
52241 	}
52242 
functioncolor::operation::_internal::addition52243 	static model_type function(model_const_input_type left, model_const_input_type right) {
52244 		model_type result;
52245 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52246 			result.set(index, left.get(index) + right.get(index));
52247 		}
52248 		return result;
52249 	}
52250 
procedurecolor::operation::_internal::addition52251 	static model_type & procedure(model_output_type result, model_const_input_type left, model_const_input_type right) {
52252 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52253 			result.set(index, left.get(index) + right.get(index));
52254 		}
52255 		return result;
52256 	}
52257 };
52258 
52259 }
52260 
52261 template< typename category_name >
52262 ::color::model<category_name> &
addition(::color::model<category_name> & result,::color::model<category_name> const & right)52263 addition
52264 (
52265 	::color::model<category_name> & result
52266 	,::color::model<category_name> const& right
52267 ) {
52268 	return ::color::operation::_internal::addition<category_name>::accumulate(result, right);
52269 }
52270 
52271 template< typename category_name >
52272 ::color::model<category_name> &
addition(::color::model<category_name> & result,::color::model<category_name> const & left,::color::model<category_name> const & right)52273 addition
52274 (
52275 	::color::model<category_name> & result
52276 	,::color::model<category_name> const& left
52277 	,::color::model<category_name> const& right
52278 ) {
52279 	return ::color::operation::_internal::addition<category_name>::procedure(result, left, right);
52280 }
52281 
52282 }
52283 }
52284 namespace color {
52285 namespace operation {
52286 namespace _internal {
52287 
52288 template< typename category_name >
52289 struct subtract {
52290 public:
52291 	typedef category_name category_type;
52292 
52293 	typedef ::color::trait::index<category_type> index_trait_type;
52294 	typedef ::color::trait::container< category_type > container_trait_type;
52295 
52296 	typedef ::color::model<category_type> model_type;
52297 
52298 	typedef model_type & model_output_type;
52299 	typedef model_type const& model_const_input_type;
52300 
52301 	typedef model_type result_type;
52302 	typedef model_type left_type, first_argument_type;
52303 	typedef model_type right_type, second_argument_type;
52304 
52305 	typedef typename index_trait_type::instance_type index_type;
52306 
52307 	typedef ::color::operation::_internal::subtract<category_type> this_type;
52308 
operator ()color::operation::_internal::subtract52309 	model_type operator()(model_type const& left, model_type const& right) const {
52310 		return this_type::function(left, right);
52311 	}
52312 
operator ()color::operation::_internal::subtract52313 	model_type& operator()(model_output_type result, model_const_input_type left, model_const_input_type right) const {
52314 		return this_type::procedure(result, left, right);
52315 	}
52316 
52317 public:
accumulatecolor::operation::_internal::subtract52318 	static model_type & accumulate(model_output_type result, model_const_input_type right) {
52319 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52320 			result.set(index, result.get(index) - right.get(index));
52321 		}
52322 		return result;
52323 	}
52324 
functioncolor::operation::_internal::subtract52325 	static model_type function(model_const_input_type left, model_const_input_type right) {
52326 		model_type result;
52327 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52328 			result.set(index, left.get(index) - right.get(index));
52329 		}
52330 		return result;
52331 	}
52332 
procedurecolor::operation::_internal::subtract52333 	static model_type & procedure(model_output_type result, model_const_input_type left, model_const_input_type right) {
52334 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52335 			result.set(index, left.get(index) - right.get(index));
52336 		}
52337 		return result;
52338 	}
52339 };
52340 
52341 }
52342 
52343 template< typename category_name >
52344 ::color::model<category_name> &
subtract(::color::model<category_name> & result,::color::model<category_name> const & right)52345 subtract
52346 (
52347 	::color::model<category_name> & result
52348 	,::color::model<category_name> const& right
52349 ) {
52350 	return ::color::operation::_internal::subtract<category_name>::accumulate(result, right);
52351 }
52352 
52353 template< typename category_name >
52354 ::color::model<category_name> &
subtract(::color::model<category_name> & result,::color::model<category_name> const & left,::color::model<category_name> const & right)52355 subtract
52356 (
52357 	::color::model<category_name> & result
52358 	,::color::model<category_name> const& left
52359 	,::color::model<category_name> const& right
52360 ) {
52361 	return ::color::operation::_internal::subtract<category_name>::procedure(result, left, right);
52362 }
52363 
52364 }
52365 }
52366 
52367 namespace color {
52368 namespace operation {
52369 namespace arithmetic {
52370 
52371 template< typename category_name >
52372 inline
52373 ::color::model< category_name >
operator +(::color::model<category_name> const & left,::color::model<category_name> const & right)52374 operator +(::color::model< category_name > const& left, ::color::model< category_name > const& right) {
52375 	::color::model< category_name > result;
52376 	::color::operation::addition(result, left, right);
52377 	return result;
52378 }
52379 
52380 template< typename category_name>
52381 inline
52382 ::color::model< category_name > &
operator +=(::color::model<category_name> & result,::color::model<category_name> const & right)52383 operator +=(::color::model< category_name > & result, ::color::model< category_name > const& right) {
52384 	::color::operation::addition(result, right);
52385 	return result;
52386 }
52387 
52388 template< typename category_name >
52389 inline
52390 ::color::model< category_name >
operator -(::color::model<category_name> const & left,::color::model<category_name> const & right)52391 operator -(::color::model< category_name > const& left, ::color::model< category_name > const& right) {
52392 	::color::model< category_name > result;
52393 	::color::operation::subtract(result, left, right);
52394 	return result;
52395 }
52396 
52397 template< typename category_name, typename scalar_name >
52398 inline
52399 ::color::model< category_name >
operator *(scalar_name const & left,::color::model<category_name> const & right)52400 operator *
52401 (
52402 	scalar_name const& left
52403 	,::color::model< category_name > const& right
52404 ) {
52405 	::color::model< category_name > result;
52406 	::color::operation::scale(result, left, right);
52407 	return result;
52408 }
52409 
52410 template< typename category_name, typename scalar_name >
52411 inline
52412 ::color::model< category_name >
operator *(::color::model<category_name> const & left,scalar_name const & right)52413 operator *
52414 (
52415 	::color::model< category_name > const & left
52416 	,scalar_name const & right
52417 ) {
52418 	::color::model< category_name > result;
52419 	::color::operation::scale(result, right, left);
52420 	return result;
52421 }
52422 
52423 template< typename category_name, typename scalar_name >
52424 inline
52425 ::color::model< category_name >
operator /(::color::model<category_name> const & left,scalar_name const & right)52426 operator /
52427 (
52428 	::color::model< category_name > const & left
52429 	,scalar_name const & right
52430 ) {
52431 	typedef typename ::color::trait::scalar<category_name>::instance_type scalar_type;
52432 	::color::model< category_name > result;
52433 	::color::operation::scale(result, scalar_type(1) / scalar_type(right), left);
52434 	return result;
52435 }
52436 
52437 template< typename category_name, typename scalar_name >
52438 inline
52439 ::color::model< category_name > &
operator -=(::color::model<category_name> & result,scalar_name const & left)52440 operator -=(::color::model< category_name > & result, scalar_name const& left) {
52441 	::color::operation::subtract(result, left);
52442 	return result;
52443 }
52444 
52445 template< typename category_name, typename scalar_name >
52446 inline
52447 ::color::model< category_name > &
operator *=(::color::model<category_name> & result,scalar_name const & scalar)52448 operator *=(::color::model< category_name > & result, scalar_name const& scalar) {
52449 	::color::operation::scale(result, scalar);
52450 	return result;
52451 }
52452 
52453 template< typename category_name, typename scalar_name >
52454 inline
52455 ::color::model< category_name > &
operator /=(::color::model<category_name> & result,scalar_name const & scalar)52456 operator /=(::color::model< category_name > & result, scalar_name const& scalar) {
52457 	typedef typename ::color::trait::scalar<category_name>::instance_type scalar_type;
52458 	::color::operation::scale(result, scalar_type(1) / scalar_type(scalar));
52459 	return result;
52460 }
52461 
52462 }
52463 
52464 }
52465 }
52466 
52467 namespace color {
52468 namespace operation {
52469 namespace _internal {
52470 
52471 template
52472 <
52473 	typename category_name
52474 	>
52475 struct combine {
52476 public:
52477 	typedef category_name category_type;
52478 
52479 	typedef ::color::trait::index< category_type > index_trait_type;
52480 	typedef ::color::trait::component< category_name > component_trait_type;
52481 	typedef ::color::trait::container< category_type > container_trait_type;
52482 	typedef ::color::trait::scalar<category_type> scalar_trait_type;
52483 
52484 	typedef typename index_trait_type::instance_type index_type;
52485 	typedef typename component_trait_type::instance_type component_type;
52486 	typedef typename scalar_trait_type::instance_type scalar_type;
52487 
52488 	typedef ::color::model<category_type> model_type;
52489 
processcolor::operation::_internal::combine52490 	static model_type & process
52491 	(
52492 		model_type & result
52493 		,scalar_type const& a0
52494 		,model_type const& c0
52495 		,scalar_type const& a1
52496 		,model_type const& c1
52497 	) {
52498 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52499 			result.set(index, component_type(a0 * c0.get(index) + a1 * c1.get(index)));
52500 		}
52501 		return result;
52502 	}
52503 
processcolor::operation::_internal::combine52504 	static model_type & process
52505 	(
52506 		model_type & result
52507 		,scalar_type const& a0
52508 		,model_type const& c0
52509 		,scalar_type const& a1
52510 		,model_type const& c1
52511 		,scalar_type const& a2
52512 		,model_type const& c2
52513 	) {
52514 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52515 			result.set(index, component_type(a0 * c0.get(index) + a1 * c1.get(index) + a2 * c2.get(index)));
52516 		}
52517 		return result;
52518 	}
52519 
processcolor::operation::_internal::combine52520 	static model_type & process
52521 	(
52522 		model_type & result
52523 		,scalar_type const& a0
52524 		,model_type const& c0
52525 		,scalar_type const& a1
52526 		,model_type const& c1
52527 		,scalar_type const& a2
52528 		,model_type const& c2
52529 		,scalar_type const& a3
52530 		,model_type const& c3
52531 	) {
52532 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52533 			result.set(index, component_type(a0 * c0.get(index) + a1 * c1.get(index) + a2 * c2.get(index) + a3 * c3.get(index)));
52534 		}
52535 		return result;
52536 	}
52537 
52538 };
52539 
52540 }
52541 
52542 template< typename category_name >
52543 ::color::model<category_name> &
combine(::color::model<category_name> & result,typename::color::trait::scalar<category_name>::model_type const & a0,::color::model<category_name> const & c0,typename::color::trait::scalar<category_name>::model_type const & a1,::color::model<category_name> const & c1)52544 combine
52545 (
52546 	::color::model<category_name> & result
52547 	,typename ::color::trait::scalar<category_name>::model_type const& a0
52548 	,::color::model<category_name> const& c0
52549 	,typename ::color::trait::scalar<category_name>::model_type const& a1
52550 	,::color::model<category_name> const& c1
52551 ) {
52552 	return ::color::operation::_internal::combine<category_name>::process(result, a0, c0, a1, c1);
52553 }
52554 
52555 template< typename category_name >
52556 ::color::model<category_name> &
combine(::color::model<category_name> & result,typename::color::trait::scalar<category_name>::model_type const & a0,::color::model<category_name> const & c0,typename::color::trait::scalar<category_name>::model_type const & a1,::color::model<category_name> const & c1,typename::color::trait::scalar<category_name>::model_type const & a2,::color::model<category_name> const & c2)52557 combine
52558 (
52559 	::color::model<category_name> & result
52560 	,typename ::color::trait::scalar<category_name>::model_type const& a0
52561 	,::color::model<category_name> const& c0
52562 	,typename ::color::trait::scalar<category_name>::model_type const& a1
52563 	,::color::model<category_name> const& c1
52564 	,typename ::color::trait::scalar<category_name>::model_type const& a2
52565 	,::color::model<category_name> const& c2
52566 ) {
52567 	return ::color::operation::_internal::combine<category_name>::process(result, a0, c0, a1, c1, a2, c2);
52568 }
52569 
52570 template< typename category_name >
52571 ::color::model<category_name> &
combine(::color::model<category_name> & result,typename::color::trait::scalar<category_name>::model_type const & a0,::color::model<category_name> const & c0,typename::color::trait::scalar<category_name>::model_type const & a1,::color::model<category_name> const & c1,typename::color::trait::scalar<category_name>::model_type const & a2,::color::model<category_name> const & c2,typename::color::trait::scalar<category_name>::model_type const & a3,::color::model<category_name> const & c3)52572 combine
52573 (
52574 	::color::model<category_name> & result
52575 	,typename ::color::trait::scalar<category_name>::model_type const& a0
52576 	,::color::model<category_name> const& c0
52577 	,typename ::color::trait::scalar<category_name>::model_type const& a1
52578 	,::color::model<category_name> const& c1
52579 	,typename ::color::trait::scalar<category_name>::model_type const& a2
52580 	,::color::model<category_name> const& c2
52581 	,typename ::color::trait::scalar<category_name>::model_type const& a3
52582 	,::color::model<category_name> const& c3
52583 ) {
52584 	return ::color::operation::_internal::combine<category_name>::process(result, a0, c0, a1, c1, a2, c2, a3, c3);
52585 }
52586 
52587 }
52588 }
52589 
52590 namespace color {
52591 namespace operation {
52592 
52593 template< typename category_name >
52594 ::color::model<category_name> &
median(::color::model<category_name> & result,typename::color::trait::scalar<category_name>::model_type scalar,::color::model<category_name> const & right)52595 median
52596 (
52597 	::color::model<category_name> & result
52598 	,typename ::color::trait::scalar<category_name>::model_type scalar
52599 	,::color::model<category_name> const& right
52600 ) {
52601 	typedef typename ::color::trait::scalar<category_name>::instance_type scalar_type;
52602 	return ::color::operation::combine<category_name>(result, scalar_type(1) - scalar, result, scalar, right);
52603 }
52604 
52605 template< typename category_name >
52606 ::color::model<category_name> &
median(::color::model<category_name> & result,::color::model<category_name> const & left,typename::color::trait::scalar<category_name>::model_type scalar,::color::model<category_name> const & right)52607 median
52608 (
52609 	::color::model<category_name> & result
52610 	,::color::model<category_name> const& left
52611 	,typename ::color::trait::scalar<category_name>::model_type scalar
52612 	,::color::model<category_name> const& right
52613 ) {
52614 	typedef typename ::color::trait::scalar<category_name>::instance_type scalar_type;
52615 	return ::color::operation::combine<category_name>(result, scalar_type(1) - scalar, left, scalar, right);
52616 }
52617 
52618 }
52619 }
52620 namespace color {
52621 namespace operation {
52622 
52623 template< typename category_name >
52624 ::color::model<category_name> &
convex(::color::model<category_name> & result,typename::color::trait::scalar<category_name>::model_type a0,::color::model<category_name> const & x0,::color::model<category_name> const & x1)52625 convex
52626 (
52627 	::color::model<category_name> & result
52628 	,typename ::color::trait::scalar<category_name>::model_type a0
52629 	,::color::model<category_name> const& x0
52630 	,::color::model<category_name> const& x1
52631 ) {
52632 	typedef typename ::color::trait::scalar<category_name>::instance_type scalar_type;
52633 	return ::color::operation::_internal::combine<category_name>::process(result, a0, x0, scalar_type(1)- a0, x1);
52634 }
52635 
52636 template< typename category_name >
52637 ::color::model<category_name> &
convex(::color::model<category_name> & result,typename::color::trait::scalar<category_name>::model_type a0,::color::model<category_name> const & x0,typename::color::trait::scalar<category_name>::model_type a1,::color::model<category_name> const & x1,::color::model<category_name> const & x2)52638 convex
52639 (
52640 	::color::model<category_name> & result
52641 	,typename ::color::trait::scalar<category_name>::model_type a0
52642 	,::color::model<category_name> const& x0
52643 	,typename ::color::trait::scalar<category_name>::model_type a1
52644 	,::color::model<category_name> const& x1
52645 	,::color::model<category_name> const& x2
52646 ) {
52647 	typedef typename ::color::trait::scalar<category_name>::instance_type scalar_type;
52648 	return ::color::operation::_internal::combine<category_name>::process(result, a0, x0, a1, x1, scalar_type(1)-a0-a1, x2);
52649 }
52650 
52651 template< typename category_name >
52652 ::color::model<category_name> &
convex(::color::model<category_name> & result,typename::color::trait::scalar<category_name>::model_type const & a0,::color::model<category_name> const & x0,typename::color::trait::scalar<category_name>::model_type const & a1,::color::model<category_name> const & x1,typename::color::trait::scalar<category_name>::model_type const & a2,::color::model<category_name> const & x2,::color::model<category_name> const & x3)52653 convex
52654 (
52655 	::color::model<category_name> & result
52656 	,typename ::color::trait::scalar<category_name>::model_type const& a0
52657 	,::color::model<category_name> const& x0
52658 	,typename ::color::trait::scalar<category_name>::model_type const& a1
52659 	,::color::model<category_name> const& x1
52660 	,typename ::color::trait::scalar<category_name>::model_type const& a2
52661 	,::color::model<category_name> const& x2
52662 	,::color::model<category_name> const& x3
52663 ) {
52664 	typedef typename ::color::trait::scalar<category_name>::instance_type scalar_type;
52665 	return ::color::operation::_internal::combine<category_name>::process(result, a0,x0, a1,x1, a2,x2, scalar_type(1)-a0-a1-a2, x3);
52666 }
52667 
52668 template< typename category_name >
52669 ::color::model<category_name> &
convex(::color::model<category_name> & result,typename::color::trait::scalar<category_name>::model_type const & a0,::color::model<category_name> const & x0,typename::color::trait::scalar<category_name>::model_type const & a1,::color::model<category_name> const & x1,typename::color::trait::scalar<category_name>::model_type const & a2,::color::model<category_name> const & x2,typename::color::trait::scalar<category_name>::model_type const & a3,::color::model<category_name> const & x3,::color::model<category_name> const & x4)52670 convex
52671 (
52672 	::color::model<category_name> & result
52673 	,typename ::color::trait::scalar<category_name>::model_type const& a0
52674 	,::color::model<category_name> const& x0
52675 	,typename ::color::trait::scalar<category_name>::model_type const& a1
52676 	,::color::model<category_name> const& x1
52677 	,typename ::color::trait::scalar<category_name>::model_type const& a2
52678 	,::color::model<category_name> const& x2
52679 	,typename ::color::trait::scalar<category_name>::model_type const& a3
52680 	,::color::model<category_name> const& x3
52681 	,::color::model<category_name> const& x4
52682 ) {
52683 	typedef typename ::color::trait::scalar<category_name>::instance_type scalar_type;
52684 	return ::color::operation::_internal::combine<category_name>::process(result, a0,x0, a1,x1, a2,x2, a3,x3, scalar_type(1)-a0-a1-a2-a3, x4);
52685 }
52686 
52687 }
52688 }
52689 
52690 namespace color {
52691 namespace operation {
52692 namespace _internal {
52693 
52694 template
52695 <
52696 	typename category_name
52697 	>
52698 struct blend {
52699 public:
52700 	typedef category_name category_type;
52701 
52702 	typedef ::color::trait::index< category_type > index_trait_type;
52703 	typedef ::color::trait::component< category_name > component_trait_type;
52704 	typedef ::color::trait::container< category_type > container_trait_type;
52705 	typedef ::color::trait::scalar<category_type> scalar_trait_type;
52706 
52707 	typedef typename index_trait_type::instance_type index_type;
52708 
52709 	typedef typename component_trait_type::instance_type component_instance_type;
52710 
52711 	typedef typename scalar_trait_type::instance_type scalar_type;
52712 	typedef typename scalar_trait_type::model_type scalar_const_input_type;
52713 
52714 	typedef ::color::model<category_type> model_type;
52715 
52716 	typedef ::color::_internal::diverse< category_type > diverse_type;
52717 	typedef ::color::_internal::normalize< category_type > normalize_type;
52718 
52719 	typedef ::color::operation::_internal::blend<category_type> this_type;
52720 
52721 public:
accumulatecolor::operation::_internal::blend52722 	static model_type & accumulate(model_type &result, scalar_type const& alpha, model_type const& upper) {
52723 		return this_type::template accumulate(result, result, alpha, upper);
52724 	}
52725 
accumulatecolor::operation::_internal::blend52726 	static model_type & accumulate(model_type &result, model_type const& lower, scalar_type const& alpha, model_type const& upper) {
52727 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52728 			result.set(index, component_instance_type((scalar_type(1) - alpha) * lower.get(index) + alpha * upper.get(index)));
52729 		}
52730 		return result;
52731 	}
52732 
52733 	template< index_type alpha_index >
accumulatecolor::operation::_internal::blend52734 	static model_type & accumulate(model_type &result, model_type const& upper) {
52735 		return this_type::template accumulate<alpha_index>(result, result, upper);
52736 	}
52737 
52738 	template< index_type alpha_index >
accumulatecolor::operation::_internal::blend52739 	static model_type & accumulate(model_type &result, model_type const& lower, model_type const& upper) {
52740 		scalar_type aU = normalize_type::template process<alpha_index>(::color::get::alpha(upper));
52741 		scalar_type aL = normalize_type::template process<alpha_index>(::color::get::alpha(lower));
52742 		scalar_type divisor = aU + aL*(scalar_type(1) - aU);
52743 		scalar_type cU = aU/divisor;
52744 		scalar_type cL = aL * (scalar_type(1) - aU) / divisor;
52745 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52746 			result.set(index, component_instance_type(cL * lower.get(index) + cU * upper.get(index)));
52747 		}
52748 		::color::set::alpha(result, diverse_type::template process<alpha_index>(divisor));
52749 		return result;
52750 	}
52751 
mixcolor::operation::_internal::blend52752 	static model_type mix(model_type const& lower, scalar_type const& alpha, model_type const& upper) {
52753 		model_type result;
52754 		this_type::template accumulate(result, lower, alpha, upper);
52755 		return result;
52756 	}
52757 
52758 	template< index_type alpha_index >
mixcolor::operation::_internal::blend52759 	static model_type mix(model_type const& lower, model_type const& upper) {
52760 		model_type result;
52761 		this_type::template accumulate<alpha_index>(result, lower, upper);
52762 		return result;
52763 	}
52764 };
52765 
52766 }
52767 
52768 template< typename category_name >
52769 inline
52770 ::color::model<category_name> &
blend(::color::model<category_name> & result,::color::model<category_name> const & upper)52771 blend
52772 (
52773 	::color::model<category_name> & result
52774 	,::color::model<category_name> const& upper
52775 ) {
52776 	enum { alpha_index = ::color::place::_internal::alpha<category_name>::position_enum };
52777 	static_assert(0 <= alpha_index, "Error: This combination of model/format has no alpha channel") ;
52778 	return ::color::operation::_internal::blend<category_name>::template accumulate< alpha_index >(result, upper);
52779 }
52780 
52781 template< typename category_name >
52782 inline
52783 ::color::model<category_name> &
blend(::color::model<category_name> & result,::color::model<category_name> const & lower,::color::model<category_name> const & upper)52784 blend
52785 (
52786 	::color::model<category_name> & result
52787 	,::color::model<category_name> const& lower
52788 	,::color::model<category_name> const& upper
52789 ) {
52790 	enum { alpha_index = ::color::place::_internal::alpha<category_name>::position_enum };
52791 	static_assert(0 <= alpha_index, "Error: This combination of model/format has no alpha channel") ;
52792 	return ::color::operation::_internal::blend<category_name>::template accumulate< alpha_index >(result, lower, upper);
52793 }
52794 
52795 template< typename category_name >
52796 ::color::model<category_name>
mix(::color::model<category_name> const & lower,::color::model<category_name> const & upper)52797 mix
52798 (
52799 	::color::model<category_name> const& lower
52800 	,::color::model<category_name> const& upper
52801 ) {
52802 	enum { alpha_index = ::color::place::_internal::alpha<category_name>::position_enum };
52803 	static_assert(0 <= alpha_index, "Error: This combination of model/format has no alpha channel") ;
52804 	return ::color::operation::_internal::blend<category_name>::template mix< alpha_index >(lower, upper);
52805 }
52806 
52807 template< typename category_name >
52808 inline
52809 ::color::model<category_name> &
blend(::color::model<category_name> & result,typename::color::trait::scalar<category_name>::model_type alpha,::color::model<category_name> const & upper)52810 blend
52811 (
52812 	::color::model<category_name> & result
52813 	,typename ::color::trait::scalar<category_name>::model_type alpha
52814 	,::color::model<category_name> const& upper
52815 ) {
52816 	return ::color::operation::_internal::blend<category_name>::accumulate(result, alpha, upper);
52817 }
52818 
52819 template< typename category_name >
52820 inline
52821 ::color::model<category_name> &
blend(::color::model<category_name> & result,::color::model<category_name> const & lower,typename::color::trait::scalar<category_name>::model_type alpha,::color::model<category_name> const & upper)52822 blend
52823 (
52824 	::color::model<category_name> & result
52825 	,::color::model<category_name> const& lower
52826 	,typename ::color::trait::scalar<category_name>::model_type alpha
52827 	,::color::model<category_name> const& upper
52828 ) {
52829 	return ::color::operation::_internal::blend<category_name>::accumulate(result, lower, alpha, upper);
52830 }
52831 
52832 template< typename category_name >
52833 ::color::model<category_name>
mix(::color::model<category_name> const & lower,typename::color::trait::scalar<category_name>::model_type alpha,::color::model<category_name> const & upper)52834 mix
52835 (
52836 	::color::model<category_name> const& lower
52837 	,typename ::color::trait::scalar<category_name>::model_type alpha
52838 	,::color::model<category_name> const& upper
52839 ) {
52840 	return ::color::operation::_internal::blend<category_name>::mix(lower, alpha, upper);
52841 }
52842 
52843 }
52844 }
52845 
52846 namespace color {
52847 namespace operation {
52848 namespace _internal {
52849 
52850 template< typename category_name >
52851 struct bias {
52852 public:
52853 	typedef category_name category_type;
52854 
52855 	typedef ::color::trait::index<category_type> index_trait_type;
52856 
52857 	typedef ::color::trait::container< category_type > container_trait_type;
52858 	typedef ::color::trait::scalar<category_type> scalar_trait_type;
52859 
52860 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
52861 	typedef typename ::color::trait::scalar<category_type>::model_type scalar_const_input_type;
52862 
52863 	typedef typename index_trait_type::instance_type index_type;
52864 
52865 	typedef ::color::model<category_type> model_type;
52866 	typedef model_type & model_output_type;
52867 	typedef model_type const& model_const_input_type;
52868 
52869 	typedef ::color::_internal::diverse< category_type > diverse_type;
52870 	typedef ::color::_internal::normalize< category_type > normalize_type;
52871 
52872 	typedef ::color::operation::_internal::bias< category_name > this_type;
52873 
processcolor::operation::_internal::bias52874 	static model_type & process(model_output_type result, scalar_const_input_type scalar) {
52875 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52876 			result.set(index, diverse_type::process(this_type::process(normalize_type::process(result.get(index), index), scalar), index));
52877 		}
52878 		return result;
52879 	}
52880 
processcolor::operation::_internal::bias52881 	static model_type & process(model_output_type result, model_const_input_type left, scalar_const_input_type value) {
52882 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52883 			result.set(index, diverse_type::process(this_type::process(normalize_type::process(left.get(index), index), value), index));
52884 		}
52885 		return result;
52886 	}
52887 
52888 	template< index_type index_number >
processcolor::operation::_internal::bias52889 	static model_type & process(model_output_type result, model_const_input_type left, scalar_const_input_type scalar) {
52890 		result.template set<index_number>(diverse_type::template process<index_number>(this_type::process(normalize_type::template process<index_number>(left.template get<index_number>()), scalar)));
52891 		return result;
52892 	}
52893 
processcolor::operation::_internal::bias52894 	static scalar_type process(scalar_const_input_type x, scalar_const_input_type b) {
52895 		return pow(x, log(b) / log(scalar_type(0.5)));
52896 	}
52897 
52898 };
52899 }
52900 
52901 template< typename category_name >
52902 ::color::model<category_name> &
bias(::color::model<category_name> & result,typename::color::trait::scalar<category_name>::model_type const & scalar)52903 bias
52904 (
52905 	::color::model<category_name> & result
52906 	,typename ::color::trait::scalar<category_name>::model_type const& scalar
52907 ) {
52908 	return ::color::operation::_internal::bias<category_name>::process(result, scalar);
52909 }
52910 
52911 template< typename category_name>
52912 ::color::model<category_name> &
bias(::color::model<category_name> & result,::color::model<category_name> const & left,typename::color::trait::scalar<category_name>::model_type const & scalar)52913 bias
52914 (
52915 	::color::model<category_name> & result
52916 	,::color::model<category_name> const& left
52917 	,typename ::color::trait::scalar<category_name>::model_type const& scalar
52918 ) {
52919 	return ::color::operation::_internal::bias<category_name>::process(result, left, scalar);
52920 }
52921 
52922 }
52923 }
52924 namespace color {
52925 namespace operation {
52926 namespace _internal {
52927 
52928 template< typename category_name >
52929 struct gain {
52930 public:
52931 	typedef category_name category_type;
52932 
52933 	typedef ::color::trait::index<category_type> index_trait_type;
52934 	typedef ::color::trait::container< category_type > container_trait_type;
52935 	typedef ::color::trait::scalar< category_name > scalar_trait_type;
52936 
52937 	typedef typename ::color::trait::scalar<category_type>::instance_type scalar_type;
52938 	typedef typename ::color::trait::scalar<category_type>::model_type scalar_const_input_type;
52939 	typedef typename index_trait_type::instance_type index_type;
52940 
52941 	typedef ::color::model<category_type> model_type;
52942 	typedef model_type & model_output_type;
52943 	typedef model_type const& model_const_input_type;
52944 
52945 	typedef ::color::_internal::diverse< category_type > diverse_type;
52946 	typedef ::color::_internal::normalize< category_type > normalize_type;
52947 
52948 	typedef ::color::operation::_internal::bias< category_name > bias_type;
52949 
52950 	typedef ::color::operation::_internal::gain< category_name > this_type;
52951 
processcolor::operation::_internal::gain52952 	static model_type & process(model_output_type result, scalar_const_input_type scalar) {
52953 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52954 			result.set(index, diverse_type::process(this_type::process(normalize_type::process(result.get(index), index), scalar), index));
52955 		}
52956 		return result;
52957 	}
52958 
processcolor::operation::_internal::gain52959 	static model_type & process(model_output_type result, model_const_input_type left, scalar_const_input_type value) {
52960 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
52961 			result.set(index, diverse_type::process(this_type::process(normalize_type::process(left.get(index), index), value), index));
52962 		}
52963 		return result;
52964 	}
52965 
52966 	template< index_type index_number >
processcolor::operation::_internal::gain52967 	static model_type & process(model_output_type result, model_const_input_type left, scalar_const_input_type scalar) {
52968 		result.template set<index_number>(diverse_type::template process<index_number>(this_type::process(normalize_type::template process<index_number>(left.template get<index_number>()), scalar)));
52969 		return result;
52970 	}
52971 
processcolor::operation::_internal::gain52972 	static scalar_type process(scalar_const_input_type x, scalar_const_input_type g) {
52973 		if(x < scalar_type(0.5)) {
52974 			return bias_type::process(scalar_type(1)-g, scalar_type(2)*x)/scalar_type(2);
52975 		} else {
52976 			return scalar_type(1) - bias_type::process(scalar_type(1)-g,scalar_type(2) - scalar_type(2)*x)/scalar_type(2);
52977 		}
52978 	}
52979 
52980 };
52981 }
52982 
52983 template< typename category_name >
52984 ::color::model<category_name> &
gain(::color::model<category_name> & result,typename::color::trait::scalar<category_name>::model_type const & scalar)52985 gain
52986 (
52987 	::color::model<category_name> & result
52988 	,typename ::color::trait::scalar<category_name>::model_type const& scalar
52989 ) {
52990 	return ::color::operation::_internal::gain<category_name>::process(result, scalar);
52991 }
52992 
52993 template< typename category_name >
52994 ::color::model<category_name> &
gain(::color::model<category_name> & result,::color::model<category_name> const & left,typename::color::trait::scalar<category_name>::model_type const & scalar)52995 gain
52996 (
52997 	::color::model<category_name> & result
52998 	,::color::model<category_name> const& left
52999 	,typename ::color::trait::scalar<category_name>::model_type const& scalar
53000 ) {
53001 	return ::color::operation::_internal::gain<category_name>::process(result, left, scalar);
53002 }
53003 }
53004 }
53005 
53006 namespace color {
53007 namespace operation {
53008 namespace _internal {
53009 
53010 template< typename category_name >
53011 struct multiply {
53012 public:
53013 	typedef category_name category_type;
53014 
53015 	typedef ::color::trait::index<category_type> index_trait_type;
53016 	typedef ::color::trait::component< category_type > component_trait_type;
53017 	typedef ::color::trait::container< category_type > container_trait_type;
53018 
53019 	typedef typename component_trait_type::instance_type component_instance_type;
53020 
53021 	typedef ::color::model<category_type> model_type;
53022 
53023 	typedef model_type & model_output_type;
53024 	typedef model_type const& model_const_input_type;
53025 
53026 	typedef model_type result_type;
53027 	typedef model_type left_type, first_argument_type;
53028 	typedef model_type right_type, second_argument_type;
53029 
53030 	typedef typename index_trait_type::instance_type index_type;
53031 
53032 	typedef ::color::operation::_internal::multiply<category_type> this_type;
53033 
53034 public:
operator ()color::operation::_internal::multiply53035 	model_type& operator()(model_output_type result, model_const_input_type right) const {
53036 		return this_type::accumulate(result, right);
53037 	}
53038 
operator ()color::operation::_internal::multiply53039 	model_type& operator()(model_output_type result, model_const_input_type left, model_const_input_type right) const {
53040 		return this_type::procedure(result, left, right);
53041 	}
53042 
53043 public:
accumulatecolor::operation::_internal::multiply53044 	static model_type & accumulate(model_output_type result, model_const_input_type right) {
53045 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
53046 			result.set(index, result.get(index) * right.get(index));
53047 		}
53048 		return result;
53049 	}
53050 
functioncolor::operation::_internal::multiply53051 	static model_type function(model_const_input_type left, model_const_input_type right) {
53052 		model_type result;
53053 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
53054 			result.set(index, left.get(index) * right.get(index));
53055 		}
53056 		return result;
53057 	}
53058 
procedurecolor::operation::_internal::multiply53059 	static model_type & procedure(model_output_type result, model_const_input_type left, model_const_input_type right) {
53060 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
53061 			result.set(index, left.get(index) * right.get(index));
53062 		}
53063 		return result;
53064 	}
53065 };
53066 
53067 }
53068 
53069 template< typename category_name >
53070 ::color::model<category_name> &
multiply(::color::model<category_name> & result,::color::model<category_name> const & right)53071 multiply
53072 (
53073 	::color::model<category_name> & result
53074 	,::color::model<category_name> const& right
53075 ) {
53076 	return ::color::operation::_internal::multiply<category_name>::accumulate(result, right);
53077 }
53078 
53079 template< typename category_name >
53080 ::color::model<category_name> &
multiply(::color::model<category_name> & result,::color::model<category_name> const & left,::color::model<category_name> const & right)53081 multiply
53082 (
53083 	::color::model<category_name> & result
53084 	,::color::model<category_name> const& left
53085 	,::color::model<category_name> const& right
53086 ) {
53087 	return ::color::operation::_internal::multiply<category_name>::procedure(result, left, right);
53088 }
53089 
53090 }
53091 }
53092 namespace color {
53093 namespace operation {
53094 namespace _internal {
53095 
53096 template< typename category_name >
53097 struct divide {
53098 public:
53099 	typedef category_name category_type;
53100 
53101 	typedef ::color::trait::index<category_type> index_trait_type;
53102 	typedef ::color::trait::component< category_type > component_trait_type;
53103 	typedef ::color::trait::container< category_type > container_trait_type;
53104 
53105 	typedef typename component_trait_type::instance_type component_instance_type;
53106 
53107 	typedef ::color::model<category_type> model_type;
53108 
53109 	typedef model_type & model_output_type;
53110 	typedef model_type const& model_const_input_type;
53111 
53112 	typedef model_type result_type;
53113 	typedef model_type left_type, first_argument_type;
53114 	typedef model_type right_type, second_argument_type;
53115 
53116 	typedef typename index_trait_type::instance_type index_type;
53117 
53118 	typedef ::color::operation::_internal::divide<category_type> this_type;
53119 
53120 public:
operator ()color::operation::_internal::divide53121 	model_type operator()(model_type const& left, model_type const& right)const {
53122 		return this_type::function(left, right);
53123 	}
53124 
operator ()color::operation::_internal::divide53125 	model_type& operator()(model_output_type result, model_const_input_type left, model_const_input_type right) const {
53126 		return this_type::procedure(result, left, right);
53127 	}
53128 
53129 public:
accumulatecolor::operation::_internal::divide53130 	static model_type & accumulate(model_output_type result, model_const_input_type right) {
53131 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
53132 			result.set(index, result.get(index) / right.get(index));
53133 		}
53134 		return result;
53135 	}
53136 
functioncolor::operation::_internal::divide53137 	static model_type function(model_const_input_type left, model_const_input_type right) {
53138 		model_type result;
53139 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
53140 			result.set(index, left.get(index) / right.get(index));
53141 		}
53142 		return result;
53143 	}
53144 
procedurecolor::operation::_internal::divide53145 	static model_type & procedure(model_output_type result, model_const_input_type left, model_const_input_type right) {
53146 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
53147 			result.set(index, left.get(index) / right.get(index));
53148 		}
53149 		return result;
53150 	}
53151 };
53152 
53153 }
53154 
53155 template< typename category_name >
53156 ::color::model<category_name> &
divide(::color::model<category_name> & result,::color::model<category_name> const & right)53157 divide
53158 (
53159 	::color::model<category_name> & result
53160 	,::color::model<category_name> const& right
53161 ) {
53162 	return ::color::operation::_internal::divide<category_name>::accumulate(result, right);
53163 }
53164 
53165 template< typename category_name >
53166 ::color::model<category_name> &
divide(::color::model<category_name> & result,::color::model<category_name> const & left,::color::model<category_name> const & right)53167 divide
53168 (
53169 	::color::model<category_name> & result
53170 	,::color::model<category_name> const& left
53171 	,::color::model<category_name> const& right
53172 ) {
53173 	return ::color::operation::_internal::divide<category_name>::procedure(result, left, right);
53174 }
53175 
53176 }
53177 }
53178 
53179 namespace color {
53180 namespace operation {
53181 namespace _internal {
53182 
53183 template< typename category_name >
53184 struct ceil {
53185 public:
53186 	typedef category_name category_type;
53187 
53188 	typedef ::color::trait::index<category_type> index_trait_type;
53189 	typedef ::color::trait::container< category_type > container_trait_type;
53190 
53191 	typedef ::color::model<category_type> model_type;
53192 	typedef model_type & model_output_type;
53193 	typedef model_type const& model_const_input_type;
53194 
53195 	typedef model_type result_type;
53196 	typedef model_type left_type, first_argument_type;
53197 	typedef model_type right_type, second_argument_type;
53198 
53199 	typedef typename index_trait_type::instance_type index_type;
53200 
53201 	typedef ::color::operation::_internal::ceil<category_type> this_type;
53202 
53203 public:
operator ()color::operation::_internal::ceil53204 	model_type & operator()(model_type &result, model_type const& upper_bound) const {
53205 		return this_type::procedure(result, upper_bound);
53206 	}
operator ()color::operation::_internal::ceil53207 	model_type & operator()(model_type &result, model_type const& left, model_type const& upper_bound) const {
53208 		return this_type::procedure(result, left, upper_bound);
53209 	}
53210 
53211 public:
accumulatecolor::operation::_internal::ceil53212 	static model_type & accumulate(model_output_type result, model_const_input_type upper_bound) {
53213 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
53214 			if(upper_bound.get(index) < result.get(index)) {
53215 				result.set(index, upper_bound.get(index));
53216 			}
53217 		}
53218 		return result;
53219 	}
53220 
functioncolor::operation::_internal::ceil53221 	static model_type function(model_const_input_type left, model_const_input_type upper_bound) {
53222 		model_type result;
53223 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
53224 			if(upper_bound.get(index) < result.get(index)) {
53225 				result.set(index, upper_bound.get(index));
53226 			} else {
53227 				result.set(index, left.get(index));
53228 			}
53229 		}
53230 		return result;
53231 	}
53232 
procedurecolor::operation::_internal::ceil53233 	static model_type & procedure(model_output_type result, model_const_input_type left, model_const_input_type upper_bound) {
53234 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
53235 			if(upper_bound.get(index) < result.get(index)) {
53236 				result.set(index, upper_bound.get(index));
53237 			} else {
53238 				result.set(index, left.get(index));
53239 			}
53240 		}
53241 		return result;
53242 	}
53243 };
53244 
53245 }
53246 
53247 template< typename category_name >
53248 ::color::model<category_name> &
ceil(::color::model<category_name> & result,::color::model<category_name> const & upper_bound)53249 ceil
53250 (
53251 	::color::model<category_name> & result
53252 	,::color::model<category_name> const& upper_bound
53253 ) {
53254 	return ::color::operation::_internal::ceil<category_name>::accumulate(result, upper_bound);
53255 }
53256 
53257 template< typename category_name >
53258 ::color::model<category_name> &
ceil(::color::model<category_name> & result,::color::model<category_name> const & left,::color::model<category_name> const & upper_bound)53259 ceil
53260 (
53261 	::color::model<category_name> & result
53262 	,::color::model<category_name> const& left
53263 	,::color::model<category_name> const& upper_bound
53264 ) {
53265 	return ::color::operation::_internal::ceil<category_name>::procedure(result, left, upper_bound);
53266 }
53267 
53268 }
53269 }
53270 namespace color {
53271 namespace operation {
53272 namespace _internal {
53273 
53274 template< typename category_name >
53275 struct clip {
53276 public:
53277 	typedef category_name category_type;
53278 
53279 	typedef ::color::trait::index<category_type> index_trait_type;
53280 	typedef ::color::trait::container< category_type > container_trait_type;
53281 
53282 	typedef ::color::model<category_type> model_type;
53283 
53284 	typedef typename index_trait_type::instance_type index_type;
53285 
53286 	typedef ::color::operation::_internal::clip<category_type> this_type;
53287 
53288 public:
operator ()color::operation::_internal::clip53289 	model_type & operator()(model_type &result, model_type const& low_bound, model_type const& upper_bound) const {
53290 		return this_type::process(result, low_bound, upper_bound);
53291 	}
operator ()color::operation::_internal::clip53292 	model_type & operator()(model_type &result, model_type const& left, model_type const& low_bound, model_type const& upper_bound) const {
53293 		return this_type::process(result, left, low_bound, upper_bound);
53294 	}
53295 
53296 public:
accumulatecolor::operation::_internal::clip53297 	static model_type & accumulate(model_type &result, model_type const& low_bound, model_type const& upper_bound) {
53298 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
53299 			if(result.get(index) < low_bound.get(index)) {
53300 				result.set(index, low_bound.get(index));
53301 				continue;
53302 			}
53303 			if(upper_bound.get(index) < result.get(index)) {
53304 				result.set(index, upper_bound.get(index));
53305 				continue;
53306 			}
53307 		}
53308 		return result;
53309 	}
53310 
processcolor::operation::_internal::clip53311 	static model_type & process(model_type &result, model_type const& left, model_type const& low_bound, model_type const& upper_bound) {
53312 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
53313 			if(left.get(index) < low_bound.get(index)) {
53314 				result.set(index, low_bound.get(index));
53315 				continue;
53316 			}
53317 			if(upper_bound.get(index) < left.get(index)) {
53318 				result.set(index, upper_bound.get(index));
53319 				continue;
53320 			}
53321 			result.set(index, left.get(index));
53322 		}
53323 		return result;
53324 	}
53325 };
53326 
53327 }
53328 
53329 template< typename category_name >
53330 ::color::model<category_name> &
clip(::color::model<category_name> & result,::color::model<category_name> const & low_bound,::color::model<category_name> const & upper_bound)53331 clip
53332 (
53333 	::color::model<category_name> & result
53334 	,::color::model<category_name> const& low_bound, ::color::model<category_name> const& upper_bound
53335 ) {
53336 	return ::color::operation::_internal::clip<category_name>::accumulate(result, low_bound, upper_bound);
53337 }
53338 
53339 template< typename category_name >
53340 ::color::model<category_name> &
clip(::color::model<category_name> & result,::color::model<category_name> const & left,::color::model<category_name> const & low_bound,::color::model<category_name> const & upper_bound)53341 clip
53342 (
53343 	::color::model<category_name> & result
53344 	,::color::model<category_name> const& left
53345 	,::color::model<category_name> const& low_bound, ::color::model<category_name> const& upper_bound
53346 ) {
53347 	return ::color::operation::_internal::clip<category_name>::process(result, left, low_bound, upper_bound);
53348 }
53349 
53350 }
53351 }
53352 namespace color {
53353 namespace operation {
53354 namespace _internal {
53355 
53356 template< typename category_name >
53357 struct floor {
53358 public:
53359 	typedef category_name category_type;
53360 
53361 	typedef ::color::trait::index<category_type> index_trait_type;
53362 	typedef ::color::trait::container< category_type > container_trait_type;
53363 
53364 	typedef ::color::model<category_type> model_type;
53365 	typedef model_type & model_output_type;
53366 	typedef model_type const& model_const_input_type;
53367 
53368 	typedef model_type result_type;
53369 	typedef model_type left_type, first_argument_type;
53370 	typedef model_type right_type, second_argument_type;
53371 
53372 	typedef typename index_trait_type::instance_type index_type;
53373 
53374 	typedef ::color::operation::_internal::floor<category_type> this_type;
53375 
53376 public:
operator ()color::operation::_internal::floor53377 	model_type & operator()(model_type &result, model_type const& low_bound) const {
53378 		return this_type::procedure(result, low_bound);
53379 	}
operator ()color::operation::_internal::floor53380 	model_type & operator()(model_type &result, model_type const& left, model_type const& low_bound) const {
53381 		return this_type::procedure(result, left, low_bound);
53382 	}
53383 
53384 public:
accumulatecolor::operation::_internal::floor53385 	static model_type & accumulate(model_output_type result, model_const_input_type low_bound) {
53386 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
53387 			if(result.get(index) < low_bound.get(index)) {
53388 				result.set(index, low_bound.get(index));
53389 			}
53390 		}
53391 		return result;
53392 	}
53393 
functioncolor::operation::_internal::floor53394 	static model_type function(model_const_input_type left, model_const_input_type low_bound) {
53395 		model_type result;
53396 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
53397 			if(result.get(index) < low_bound.get(index)) {
53398 				result.set(index, low_bound.get(index));
53399 			} else {
53400 				result.set(index, left.get(index));
53401 			}
53402 		}
53403 		return result;
53404 	}
53405 
procedurecolor::operation::_internal::floor53406 	static model_type & procedure(model_output_type result, model_const_input_type left, model_const_input_type& low_bound) {
53407 		for(index_type index = 0; index < container_trait_type::size(); index ++) {
53408 			if(result.get(index) < low_bound.get(index)) {
53409 				result.set(index, low_bound.get(index));
53410 			} else {
53411 				result.set(index, left.get(index));
53412 			}
53413 		}
53414 		return result;
53415 	}
53416 };
53417 
53418 }
53419 
53420 template< typename category_name >
53421 ::color::model<category_name> &
floor(::color::model<category_name> & result,::color::model<category_name> const & low_bound)53422 floor
53423 (
53424 	::color::model<category_name> & result
53425 	,::color::model<category_name> const& low_bound
53426 ) {
53427 	return ::color::operation::_internal::floor<category_name>::accumulate(result, low_bound);
53428 }
53429 
53430 template< typename category_name >
53431 ::color::model<category_name> &
floor(::color::model<category_name> & result,::color::model<category_name> const & left,::color::model<category_name> const & low_bound)53432 floor
53433 (
53434 	::color::model<category_name> & result
53435 	,::color::model<category_name> const& left
53436 	,::color::model<category_name> const& low_bound
53437 ) {
53438 	return ::color::operation::_internal::floor<category_name>::procedure(result, left, low_bound);
53439 }
53440 
53441 }
53442 }
53443 
53444 namespace color {
53445 namespace compare {
53446 
53447 template < typename category_name >
equal(::color::model<category_name> const & left,::color::model<category_name> const & right)53448 bool equal
53449 (
53450 	::color::model< category_name > const& left
53451 	,::color::model< category_name > const& right
53452 ) {
53453 	return left.container() == right.container();
53454 }
53455 
53456 template< typename tag_name, typename category_name >
equal(::color::constant::base<tag_name> const & left,::color::model<category_name> const & right)53457 bool equal
53458 (
53459 	::color::constant::base< tag_name > const& left
53460 	,::color::model< category_name > const& right
53461 ) {
53462 	return ::color::compare::equal< category_name >(::color::model< category_name >(left), right);
53463 }
53464 
53465 template < typename category_name, typename tag_name >
equal(::color::model<category_name> const & left,::color::constant::base<tag_name> const & right)53466 bool equal
53467 (
53468 	::color::model< category_name > const& left
53469 	,::color::constant::base< tag_name > const& right
53470 ) {
53471 	return ::color::compare::equal< category_name >(::color::model< category_name >(left), right);
53472 }
53473 
53474 namespace operators {
53475 
53476 template< typename category_name >
53477 inline
53478 bool
operator ==(::color::model<category_name> const & left,::color::model<category_name> const & right)53479 operator ==(::color::model< category_name > const& left, ::color::model< category_name > const& right) {
53480 	return ::color::compare::equal(left, right);
53481 }
53482 
53483 template< typename tag_name, typename category_name >
53484 inline
53485 bool
operator ==(::color::constant::base<tag_name> const & left,::color::model<category_name> const & right)53486 operator ==(::color::constant::base< tag_name > const& left, ::color::model< category_name > const& right) {
53487 	return ::color::compare::equal(left, right);
53488 }
53489 
53490 template< typename category_name, typename tag_name >
53491 inline
53492 bool
operator ==(::color::model<category_name> const & left,::color::constant::base<tag_name> const & right)53493 operator ==(::color::model< category_name > const& left, ::color::constant::base< tag_name > const& right) {
53494 	return ::color::compare::equal(left, right);
53495 }
53496 
53497 }
53498 
53499 namespace functor {
53500 
53501 template< typename category_name >
53502 class equal {
53503 public:
53504 	typedef ::color::model< category_name > value_type;
operator ()(value_type const & left,value_type const & right) const53505 	bool operator()(value_type const& left, value_type const& right)const {
53506 		return ::color::compare::equal(left, right);
53507 	}
53508 };
53509 
53510 }
53511 
53512 }
53513 }
53514 
53515 namespace std {
53516 
53517 template< typename category_name >
53518 struct equal_to< ::color::model< category_name > > {
53519 private:
53520 	typedef ::color::model< category_name > value_type;
53521 public:
operator ()std::equal_to53522 	bool operator()(value_type const& left, value_type const& right)const {
53523 		return ::color::compare::equal(left, right);
53524 	}
53525 };
53526 
53527 }
53528 namespace color {
53529 namespace compare {
53530 
53531 template < typename category_name >
different(::color::model<category_name> const & left,::color::model<category_name> const & right)53532 bool different
53533 (
53534 	::color::model< category_name > const& left
53535 	,::color::model< category_name > const& right
53536 ) {
53537 	return left.container() != right.container();
53538 }
53539 
53540 template< typename tag_name, typename category_name >
different(::color::constant::base<tag_name> const & left,::color::model<category_name> const & right)53541 bool different
53542 (
53543 	::color::constant::base< tag_name > const& left
53544 	,::color::model< category_name > const& right
53545 ) {
53546 	return ::color::compare::different< category_name >(::color::model< category_name >(left), right);
53547 }
53548 
53549 template < typename category_name, typename tag_name >
different(::color::model<category_name> const & left,::color::constant::base<tag_name> const & right)53550 bool different
53551 (
53552 	::color::model< category_name > const& left
53553 	,::color::constant::base< tag_name > const& right
53554 ) {
53555 	return ::color::compare::different< category_name >(::color::model< category_name >(left), right);
53556 }
53557 
53558 namespace operators {
53559 
53560 template< typename category_name >
53561 inline
53562 bool
operator !=(::color::model<category_name> const & left,::color::model<category_name> const & right)53563 operator !=(::color::model< category_name > const& left, ::color::model< category_name > const& right) {
53564 	return ::color::compare::different(left, right);
53565 }
53566 
53567 template< typename tag_name, typename category_name >
53568 inline
53569 bool
operator !=(::color::constant::base<tag_name> const & left,::color::model<category_name> const & right)53570 operator !=(::color::constant::base< tag_name > const& left, ::color::model< category_name > const& right) {
53571 	return ::color::compare::different(left, right);
53572 }
53573 
53574 template< typename category_name, typename tag_name >
53575 inline
53576 bool
operator !=(::color::model<category_name> const & left,::color::constant::base<tag_name> const & right)53577 operator !=(::color::model< category_name > const& left, ::color::constant::base< tag_name > const& right) {
53578 	return ::color::compare::different(left, right);
53579 }
53580 
53581 }
53582 
53583 namespace functor {
53584 
53585 template< typename category_name >
53586 class different {
53587 public:
53588 	typedef ::color::model< category_name > value_type;
operator ()(value_type const & left,value_type const & right) const53589 	bool operator()(value_type const& left, value_type const& right)const {
53590 		return ::color::compare::different(left, right);
53591 	}
53592 };
53593 
53594 }
53595 
53596 }
53597 }
53598 
53599 namespace std {
53600 
53601 template< typename category_name >
53602 struct not_equal_to< ::color::model< category_name > > {
53603 private:
53604 	typedef ::color::model< category_name > value_type;
53605 public:
operator ()std::not_equal_to53606 	bool operator()(value_type const& left, value_type const& right)const {
53607 		return ::color::compare::different(left, right);
53608 	}
53609 };
53610 
53611 }
53612 
53613 namespace color {
53614 namespace compare {
53615 
53616 template < typename category_name >
great_or_equal(::color::model<category_name> const & left,::color::model<category_name> const & right)53617 bool great_or_equal
53618 (
53619 	::color::model< category_name > const& left
53620 	,::color::model< category_name > const& right
53621 ) {
53622 	return left.container() >= right.container();
53623 }
53624 
53625 template< typename tag_name, typename category_name >
great_or_equal(::color::constant::base<tag_name> const & left,::color::model<category_name> const & right)53626 bool great_or_equal
53627 (
53628 	::color::constant::base< tag_name > const& left
53629 	,::color::model< category_name > const& right
53630 ) {
53631 	return ::color::compare::great_or_equal< category_name >(::color::model< category_name >(left), right);
53632 }
53633 
53634 template < typename category_name, typename tag_name >
great_or_equal(::color::model<category_name> const & left,::color::constant::base<tag_name> const & right)53635 bool great_or_equal
53636 (
53637 	::color::model< category_name > const& left
53638 	,::color::constant::base< tag_name > const& right
53639 ) {
53640 	return ::color::compare::great_or_equal< category_name >(::color::model< category_name >(left), right);
53641 }
53642 
53643 namespace operators {
53644 
53645 template< typename category_name >
53646 inline
53647 bool
operator >=(::color::model<category_name> const & left,::color::model<category_name> const & right)53648 operator >=(::color::model< category_name > const& left, ::color::model< category_name > const& right) {
53649 	return ::color::compare::great_or_equal(left, right);
53650 }
53651 
53652 template< typename tag_name, typename category_name >
53653 inline
53654 bool
operator >=(::color::constant::base<tag_name> const & left,::color::model<category_name> const & right)53655 operator >=(::color::constant::base< tag_name > const& left, ::color::model< category_name > const& right) {
53656 	return ::color::compare::great_or_equal(left, right);
53657 }
53658 
53659 template< typename category_name, typename tag_name >
53660 inline
53661 bool
operator >=(::color::model<category_name> const & left,::color::constant::base<tag_name> const & right)53662 operator >=(::color::model< category_name > const& left, ::color::constant::base< tag_name > const& right) {
53663 	return ::color::compare::great_or_equal(left, right);
53664 }
53665 
53666 }
53667 
53668 namespace functor {
53669 
53670 template< typename category_name >
53671 class great_or_equal {
53672 public:
53673 	typedef ::color::model< category_name > value_type;
operator ()(value_type const & left,value_type const & right) const53674 	bool operator()(value_type const& left, value_type const& right)const {
53675 		return ::color::compare::great_or_equal(left, right);
53676 	}
53677 };
53678 
53679 }
53680 
53681 }
53682 }
53683 
53684 namespace std {
53685 
53686 template< typename category_name >
53687 struct greater_equal< ::color::model< category_name > > {
53688 private:
53689 	typedef ::color::model< category_name > value_type;
53690 public:
operator ()std::greater_equal53691 	bool operator()(value_type const& left, value_type const& right)const {
53692 		return ::color::compare::great_or_equal(left, right);
53693 	}
53694 };
53695 
53696 }
53697 namespace color {
53698 namespace compare {
53699 
53700 template < typename category_name >
great_strict(::color::model<category_name> const & left,::color::model<category_name> const & right)53701 inline bool great_strict
53702 (
53703 	::color::model< category_name > const& left
53704 	,::color::model< category_name > const& right
53705 ) {
53706 	return left.container() > right.container();
53707 }
53708 
53709 template< typename tag_name, typename category_name >
great_strict(::color::constant::base<tag_name> const & left,::color::model<category_name> const & right)53710 inline bool great_strict
53711 (
53712 	::color::constant::base< tag_name > const& left
53713 	,::color::model< category_name > const& right
53714 ) {
53715 	return ::color::compare::great_strict< category_name >(::color::model< category_name >(left), right);
53716 }
53717 
53718 template < typename category_name, typename tag_name >
great_strict(::color::model<category_name> const & left,::color::constant::base<tag_name> const & right)53719 inline bool great_strict
53720 (
53721 	::color::model< category_name > const& left
53722 	,::color::constant::base< tag_name > const& right
53723 ) {
53724 	return ::color::compare::great_strict< category_name >(left, ::color::model< category_name >(right));
53725 }
53726 
53727 namespace operators {
53728 
53729 template< typename category_name >
53730 inline
53731 bool
operator >(::color::model<category_name> const & left,::color::model<category_name> const & right)53732 operator > (::color::model< category_name > const& left, ::color::model< category_name > const& right) {
53733 	return ::color::compare::great_strict(left, right);
53734 }
53735 
53736 template< typename tag_name, typename category_name >
53737 inline
53738 bool
operator >(::color::constant::base<tag_name> const & left,::color::model<category_name> const & right)53739 operator >(::color::constant::base< tag_name > const& left, ::color::model< category_name > const& right) {
53740 	return ::color::compare::great_strict(left, right);
53741 }
53742 
53743 template< typename category_name, typename tag_name >
53744 inline
53745 bool
operator >(::color::model<category_name> const & left,::color::constant::base<tag_name> const & right)53746 operator >(::color::model< category_name > const& left, ::color::constant::base< tag_name > const& right) {
53747 	return ::color::compare::great_strict(left, right);
53748 }
53749 
53750 }
53751 
53752 namespace functor {
53753 
53754 template< typename category_name >
53755 class great_strict {
53756 public:
53757 	typedef ::color::model< category_name > value_type;
operator ()(value_type const & left,value_type const & right) const53758 	bool operator()(value_type const& left, value_type const& right)const {
53759 		return ::color::compare::great_strict(left,right);
53760 	}
53761 };
53762 
53763 }
53764 
53765 }
53766 }
53767 
53768 namespace std {
53769 
53770 template< typename category_name >
53771 struct greater< ::color::model< category_name > > {
53772 private:
53773 	typedef ::color::model< category_name > value_type;
53774 public:
operator ()std::greater53775 	bool operator()(value_type const& left, value_type const& right)const {
53776 		return ::color::compare::great_strict(left, right);
53777 	}
53778 };
53779 
53780 }
53781 namespace color {
53782 namespace compare {
53783 
53784 template < typename category_name >
less_or_equal(::color::model<category_name> const & left,::color::model<category_name> const & right)53785 bool less_or_equal
53786 (
53787 	::color::model< category_name > const& left
53788 	,::color::model< category_name > const& right
53789 ) {
53790 	return left.container() <= right.container();
53791 }
53792 
53793 template< typename tag_name, typename category_name >
less_or_equal(::color::constant::base<tag_name> const & left,::color::model<category_name> const & right)53794 bool less_or_equal
53795 (
53796 	::color::constant::base< tag_name > const& left
53797 	,::color::model< category_name > const& right
53798 ) {
53799 	return ::color::compare::less_or_equal< category_name >(::color::model< category_name >(left), right);
53800 }
53801 
53802 template < typename category_name, typename tag_name >
less_or_equal(::color::model<category_name> const & left,::color::constant::base<tag_name> const & right)53803 bool less_or_equal
53804 (
53805 	::color::model< category_name > const& left
53806 	,::color::constant::base< tag_name > const& right
53807 ) {
53808 	return ::color::compare::less_or_equal< category_name >(::color::model< category_name >(left), right);
53809 }
53810 
53811 namespace operators {
53812 
53813 template< typename category_name >
53814 inline
53815 bool
operator <=(::color::model<category_name> const & left,::color::model<category_name> const & right)53816 operator <=(::color::model< category_name > const& left, ::color::model< category_name > const& right) {
53817 	return ::color::compare::less_or_equal(left, right);
53818 }
53819 
53820 template< typename tag_name, typename category_name >
53821 inline
53822 bool
operator <=(::color::constant::base<tag_name> const & left,::color::model<category_name> const & right)53823 operator <=(::color::constant::base< tag_name > const& left, ::color::model< category_name > const& right) {
53824 	return ::color::compare::less_or_equal(left, right);
53825 }
53826 
53827 template< typename category_name, typename tag_name >
53828 inline
53829 bool
operator <=(::color::model<category_name> const & left,::color::constant::base<tag_name> const & right)53830 operator <=(::color::model< category_name > const& left, ::color::constant::base< tag_name > const& right) {
53831 	return ::color::compare::less_or_equal(left, right);
53832 }
53833 
53834 }
53835 
53836 namespace functor {
53837 
53838 template< typename category_name >
53839 class less_or_equal {
53840 public:
53841 	typedef ::color::model< category_name > value_type;
operator ()(value_type const & left,value_type const & right) const53842 	bool operator()(value_type const& left, value_type const& right)const {
53843 		return ::color::compare::less_or_equal(left, right);
53844 	}
53845 };
53846 
53847 }
53848 
53849 }
53850 }
53851 
53852 namespace std {
53853 
53854 template< typename category_name >
53855 struct less_equal< ::color::model< category_name > > {
53856 private:
53857 	typedef ::color::model< category_name > value_type;
53858 public:
operator ()std::less_equal53859 	bool operator()(value_type const& left, value_type const& right)const {
53860 		return ::color::compare::less_or_equal(left, right);
53861 	}
53862 };
53863 
53864 }
53865 namespace color {
53866 namespace compare {
53867 
53868 template < typename category_name >
less_strict(::color::model<category_name> const & left,::color::model<category_name> const & right)53869 bool less_strict
53870 (
53871 	::color::model< category_name > const& left
53872 	,::color::model< category_name > const& right
53873 ) {
53874 	return left.container() < right.container();
53875 }
53876 
53877 template< typename tag_name, typename category_name >
less_strict(::color::constant::base<tag_name> const & left,::color::model<category_name> const & right)53878 bool less_strict
53879 (
53880 	::color::constant::base< tag_name > const& left
53881 	,::color::model< category_name > const& right
53882 ) {
53883 	return ::color::compare::less_strict< category_name >(::color::model< category_name >(left), right);
53884 }
53885 
53886 template < typename category_name, typename tag_name >
less_strict(::color::model<category_name> const & left,::color::constant::base<tag_name> const & right)53887 bool less_strict
53888 (
53889 	::color::model< category_name > const& left
53890 	,::color::constant::base< tag_name > const& right
53891 ) {
53892 	return ::color::compare::less_strict< category_name >(left, ::color::model< category_name >(right));
53893 }
53894 
53895 namespace operators {
53896 
53897 template< typename category_name >
53898 inline
53899 bool
operator <(::color::model<category_name> const & left,::color::model<category_name> const & right)53900 operator < (::color::model< category_name > const& left, ::color::model< category_name > const& right) {
53901 	return ::color::compare::less_strict(left, right);
53902 }
53903 
53904 template< typename tag_name, typename category_name >
53905 inline
53906 bool
operator <(::color::constant::base<tag_name> const & left,::color::model<category_name> const & right)53907 operator <(::color::constant::base< tag_name > const& left, ::color::model< category_name > const& right) {
53908 	return ::color::compare::less_strict(left, right);
53909 }
53910 
53911 template< typename category_name, typename tag_name >
53912 inline
53913 bool
operator <(::color::model<category_name> const & left,::color::constant::base<tag_name> const & right)53914 operator <(::color::model< category_name > const& left, ::color::constant::base< tag_name > const& right) {
53915 	return ::color::compare::less_strict(left, right);
53916 }
53917 
53918 }
53919 
53920 namespace functor {
53921 
53922 template< typename category_name >
53923 class less_strict {
53924 public:
53925 	typedef ::color::model< category_name > value_type;
operator ()(value_type const & left,value_type const & right) const53926 	bool operator()(value_type const& left, value_type const& right)const {
53927 		return ::color::compare::less_strict(left, right);
53928 	}
53929 };
53930 
53931 }
53932 
53933 }
53934 }
53935 
53936 namespace std {
53937 
53938 template< typename category_name >
53939 struct less< ::color::model< category_name > > {
53940 private:
53941 	typedef ::color::model< category_name > value_type;
53942 public:
operator ()std::less53943 	bool operator()(value_type const& left, value_type const& right)const {
53944 		return ::color::compare::less_strict(left, right);
53945 	}
53946 };
53947 
53948 }
53949 
53950 namespace color {
53951 namespace compare {
53952 
53953 template < typename category_name >
darker(::color::model<category_name> const & left,::color::model<category_name> const & right)53954 bool darker
53955 (
53956 	::color::model< category_name > const& left
53957 	,::color::model< category_name > const& right
53958 ) {
53959 	typedef typename ::color::trait::scalar< category_name >::instance_type scalar_type;
53960 	return ::color::gray<scalar_type>(left).container() < ::color::gray<scalar_type>(right).container();
53961 }
53962 
53963 }
53964 }
53965 namespace color {
53966 namespace compare {
53967 
53968 template < typename category_name >
brighter(::color::model<category_name> const & left,::color::model<category_name> const & right)53969 bool brighter
53970 (
53971 	::color::model< category_name > const& left
53972 	,::color::model< category_name > const& right
53973 ) {
53974 	typedef typename ::color::trait::scalar< category_name >::instance_type scalar_type;
53975 	return ::color::gray<scalar_type>(left).container() > ::color::gray<scalar_type>(right).container();
53976 }
53977 
53978 }
53979 }
53980 
53981 namespace color {
53982 namespace constant {
53983 
53984 template< typename category_name >
53985 struct make< ::color::constant::black_t, category_name > {
53986 	typedef category_name category_type;
53987 
53988 	typedef ::color::model<category_type> model_type;
53989 	typedef ::color::rgb<std::uint8_t> rgb_type;
53990 	typedef ::color::constant::black_t constant_type;
53991 
53992 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
53993 
processcolor::constant::make53994 	inline static void process(container_output_type & container) {
53995 		static model_type s_model{ rgb_type{ 0x00, 0x00, 0x00 } };
53996 		container = s_model.container();
53997 	}
53998 };
53999 
54000 }
54001 }
54002 
54003 namespace color {
54004 namespace make {
54005 
54006 template< typename category_name >
gray(::color::model<category_name> & color_parameter,typename::color::trait::scalar<category_name>::model_type percent_param)54007 void gray
54008 (
54009 	::color::model< category_name > & color_parameter
54010 	,typename ::color::trait::scalar< category_name >::model_type percent_param
54011 ) {
54012 	typedef typename ::color::trait::scalar< category_name >::instance_type scalar_type;
54013 	typedef ::color::gray<scalar_type> gray_type;
54014 	color_parameter = gray_type({ static_cast<scalar_type>(percent_param / scalar_type(100)) });
54015 }
54016 
54017 template< typename category_name >
54018 ::color::model< category_name >
gray(typename::color::trait::scalar<category_name>::model_type percent_param)54019 gray
54020 (
54021 	typename ::color::trait::scalar< category_name >::model_type percent_param
54022 ) {
54023 	typedef ::color::model< category_name > model_type;
54024 	model_type color_return;
54025 	::color::make::gray(color_return, percent_param);
54026 	return color_return;
54027 }
54028 
54029 template< typename category_name >
54030 ::color::model< category_name >
gray(typename::color::trait::scalar<category_name>::model_type percent_param,category_name category_param)54031 gray
54032 (
54033 	typename ::color::trait::scalar< category_name >::model_type percent_param
54034 	, category_name category_param
54035 ) {
54036 	typedef ::color::model< category_name > model_type;
54037 	model_type color_return;
54038 	::color::make::gray(color_return, percent_param);
54039 	return color_return;
54040 }
54041 
54042 }
54043 
54044 namespace constant {
54045 
54046 template< typename category_name, std::uintmax_t black_number, std::uintmax_t white_number >
54047 struct make< ::color::constant::gray_t<black_number,white_number>, category_name > {
54048 	typedef category_name category_type;
54049 	typedef ::color::model<category_type> model_type;
54050 
54051 	typedef typename ::color::trait::scalar< typename model_type::category_type >::instance_type scalar_type;
54052 	typedef ::color::gray<scalar_type> gray_type;
54053 
54054 	typedef ::color::constant::gray_t<black_number,white_number> constant_type;
54055 
54056 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54057 
processcolor::constant::make54058 	inline static void process(container_output_type & container) {
54059 		static model_type s_model{ gray_type{ scalar_type(white_number)/scalar_type(black_number+white_number) } };
54060 		container = s_model.container();
54061 	}
54062 };
54063 
54064 }
54065 
54066 }
54067 
54068 namespace color {
54069 namespace constant {
54070 
54071 template< typename category_name >
54072 struct make< ::color::constant::white_t, category_name > {
54073 	typedef category_name category_type;
54074 
54075 	typedef ::color::model<category_type> model_type;
54076 	typedef ::color::rgb<double> rgb_type;
54077 	typedef ::color::constant::white_t constant_type;
54078 
54079 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54080 
processcolor::constant::make54081 	inline static void process(container_output_type & container) {
54082 		static model_type s_model{ rgb_type{ 1, 1, 1 } };
54083 		container = s_model.container();
54084 	}
54085 };
54086 
54087 }
54088 }
54089 
54090 namespace color {
54091 namespace constant {
54092 
54093 template< typename category_name >
54094 struct make< ::color::constant::red_t, category_name > {
54095 	typedef category_name category_type;
54096 
54097 	typedef ::color::model<category_type> model_type;
54098 	typedef ::color::rgb<double> rgb_type;
54099 	typedef ::color::constant::red_t constant_type;
54100 
54101 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54102 
processcolor::constant::make54103 	inline static void process(container_output_type & container) {
54104 		static model_type s_model{ rgb_type{ 1, 0, 0 } };
54105 		container = s_model.container();
54106 	}
54107 };
54108 
54109 }
54110 }
54111 
54112 namespace color {
54113 namespace constant {
54114 
54115 template< typename category_name >
54116 struct make< ::color::constant::green_t, category_name > {
54117 	typedef category_name category_type;
54118 	typedef ::color::model<category_type> model_type;
54119 	typedef ::color::rgb<double> rgb_type;
54120 	typedef ::color::constant::green_t constant_type;
54121 
54122 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54123 
processcolor::constant::make54124 	inline static void process(container_output_type & container) {
54125 		static model_type s_model{ rgb_type{ 0, 0.5, 0 } };
54126 		container = s_model.container();
54127 	}
54128 };
54129 
54130 template< typename category_name >
54131 struct make< ::color::constant::x11::green_t, category_name > {
54132 	typedef category_name category_type;
54133 	typedef ::color::model<category_type> model_type;
54134 	typedef ::color::rgb<double> rgb_type;
54135 	typedef ::color::constant::x11::green_t constant_type;
54136 
54137 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54138 
processcolor::constant::make54139 	inline static void process(container_output_type & container) {
54140 		static model_type s_model{ rgb_type{ 0, 1, 0 } };
54141 		container = s_model.container();
54142 	}
54143 };
54144 
54145 }
54146 }
54147 
54148 namespace color {
54149 namespace constant {
54150 
54151 template< typename category_name >
54152 struct make< ::color::constant::blue_t, category_name > {
54153 	typedef category_name category_type;
54154 
54155 	typedef ::color::model<category_type> model_type;
54156 	typedef ::color::rgb<double> rgb_type;
54157 	typedef ::color::constant::blue_t constant_type;
54158 
54159 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54160 
processcolor::constant::make54161 	inline static void process(container_output_type & container) {
54162 		static model_type s_model{ rgb_type{ 0, 0, 1 } };
54163 		container = s_model.container();
54164 	}
54165 };
54166 
54167 }
54168 }
54169 
54170 namespace color {
54171 namespace constant {
54172 
54173 template< typename category_name >
54174 struct make< ::color::constant::cyan_t, category_name > {
54175 	typedef category_name category_type;
54176 
54177 	typedef ::color::model<category_type> model_type;
54178 	typedef ::color::rgb<std::uint8_t> rgb_type;
54179 	typedef ::color::constant::cyan_t constant_type;
54180 
54181 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54182 
processcolor::constant::make54183 	inline static void process(container_output_type & container) {
54184 		static model_type s_model{ rgb_type{ 0x00, 0xFF, 0xFF } };
54185 		container = s_model.container();
54186 	}
54187 };
54188 
54189 }
54190 }
54191 
54192 namespace color {
54193 namespace constant {
54194 
54195 template< typename category_name >
54196 struct make< ::color::constant::magenta_t, category_name > {
54197 	typedef category_name category_type;
54198 
54199 	typedef ::color::model<category_type> model_type;
54200 	typedef ::color::rgb<double> rgb_type;
54201 	typedef ::color::constant::magenta_t constant_type;
54202 
54203 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54204 
processcolor::constant::make54205 	inline static void process(container_output_type & container) {
54206 		static model_type s_model{ rgb_type{ 1, 0, 1 } };
54207 		container = s_model.container();
54208 	}
54209 };
54210 
54211 }
54212 }
54213 
54214 namespace color {
54215 namespace constant {
54216 
54217 template< typename category_name >
54218 struct make< ::color::constant::yellow_t, category_name > {
54219 	typedef category_name category_type;
54220 
54221 	typedef ::color::model<category_type> model_type;
54222 	typedef ::color::rgb<double> rgb_type;
54223 	typedef ::color::constant::yellow_t constant_type;
54224 
54225 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54226 
processcolor::constant::make54227 	inline static void process(container_output_type & container) {
54228 		static model_type s_model{ rgb_type{ 1, 1, 0 } };
54229 		container = s_model.container();
54230 	}
54231 };
54232 
54233 }
54234 }
54235 
54236 namespace color {
54237 namespace constant {
54238 
54239 template< typename category_name >
54240 struct make< ::color::constant::aqua_t, category_name > {
54241 	typedef category_name category_type;
54242 
54243 	typedef ::color::model<category_type> model_type;
54244 	typedef ::color::rgb<double> rgb_type;
54245 	typedef ::color::constant::aqua_t constant_type;
54246 
54247 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54248 
processcolor::constant::make54249 	inline static void process(container_output_type & container) {
54250 		static model_type s_model{ rgb_type{ 0, 1, 1 } };
54251 		container = s_model.container();
54252 	}
54253 };
54254 
54255 }
54256 }
54257 
54258 namespace color {
54259 namespace constant {
54260 
54261 template< typename category_name >
54262 struct make< ::color::constant::fuchsia_t, category_name > {
54263 	typedef category_name category_type;
54264 
54265 	typedef ::color::model<category_type> model_type;
54266 	typedef ::color::rgb<double> rgb_type;
54267 	typedef ::color::constant::fuchsia_t constant_type;
54268 
54269 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54270 
processcolor::constant::make54271 	inline static void process(container_output_type & container) {
54272 		static model_type s_model{ rgb_type{ 1, 0, 1 } };
54273 		container = s_model.container();
54274 	}
54275 };
54276 
54277 }
54278 }
54279 
54280 namespace color {
54281 namespace constant {
54282 
54283 template< typename category_name >
54284 struct make< ::color::constant::lime_t, category_name > {
54285 	typedef category_name category_type;
54286 
54287 	typedef ::color::model<category_type> model_type;
54288 	typedef ::color::rgb<double> rgb_type;
54289 	typedef ::color::constant::lime_t constant_type;
54290 
54291 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54292 
processcolor::constant::make54293 	inline static void process(container_output_type & container) {
54294 		static model_type s_model{ rgb_type{ 0, 1, 0 } };
54295 		container = s_model.container();
54296 	}
54297 };
54298 
54299 }
54300 }
54301 
54302 namespace color {
54303 namespace constant {
54304 
54305 template< typename category_name >
54306 struct make< ::color::constant::maroon_t, category_name > {
54307 	typedef category_name category_type;
54308 	typedef ::color::model<category_type> model_type;
54309 	typedef ::color::rgb<double> rgb_type;
54310 	typedef ::color::constant::maroon_t constant_type;
54311 
54312 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54313 
processcolor::constant::make54314 	inline static void process(container_output_type & container) {
54315 		static model_type s_model{ rgb_type{ 0.5, 0, 0 } };
54316 		container = s_model.container();
54317 	}
54318 };
54319 
54320 template< typename category_name >
54321 struct make< ::color::constant::x11::maroon_t, category_name > {
54322 	typedef category_name category_type;
54323 	typedef ::color::model<category_type> model_type;
54324 	typedef ::color::rgb<double> rgb_type;
54325 	typedef ::color::constant::x11::maroon_t constant_type;
54326 
54327 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54328 
processcolor::constant::make54329 	inline static void process(container_output_type & container) {
54330 		static model_type s_model{ rgb_type{ 0.69, 0.19, 0.38 } };
54331 		container = s_model.container();
54332 	}
54333 };
54334 
54335 }
54336 }
54337 
54338 namespace color {
54339 namespace constant {
54340 
54341 template< typename category_name >
54342 struct make< ::color::constant::navy_t, category_name > {
54343 	typedef category_name category_type;
54344 
54345 	typedef ::color::model<category_type> model_type;
54346 	typedef ::color::rgb<double> rgb_type;
54347 	typedef ::color::constant::navy_t constant_type;
54348 
54349 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54350 
processcolor::constant::make54351 	inline static void process(container_output_type & container) {
54352 		static model_type s_model{ rgb_type{ 0, 0, 0.5 } };
54353 		container = s_model.container();
54354 	}
54355 };
54356 
54357 }
54358 }
54359 
54360 namespace color {
54361 namespace constant {
54362 
54363 template< typename category_name >
54364 struct make< ::color::constant::olive_t, category_name > {
54365 	typedef category_name category_type;
54366 
54367 	typedef ::color::model<category_type> model_type;
54368 	typedef ::color::rgb<double> rgb_type;
54369 	typedef ::color::constant::olive_t constant_type;
54370 
54371 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54372 
processcolor::constant::make54373 	inline static void process(container_output_type & container) {
54374 		static model_type s_model{ rgb_type{ 0.5, 0.5, 0 } };
54375 		container = s_model.container();
54376 	}
54377 };
54378 
54379 }
54380 }
54381 
54382 namespace color {
54383 namespace constant {
54384 
54385 template< typename category_name >
54386 struct make< ::color::constant::orange_t, category_name > {
54387 	typedef category_name category_type;
54388 
54389 	typedef ::color::model<category_type> model_type;
54390 	typedef ::color::rgb<double> rgb_type;
54391 	typedef ::color::constant::orange_t constant_type;
54392 
54393 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54394 
processcolor::constant::make54395 	inline static void process(container_output_type & container) {
54396 		static model_type s_model{ rgb_type{ 1, 0.65, 0 } };
54397 		container = s_model.container();
54398 	}
54399 };
54400 
54401 }
54402 }
54403 
54404 namespace color {
54405 namespace constant {
54406 
54407 template< typename category_name >
54408 struct make< ::color::constant::purple_t, category_name > {
54409 	typedef category_name category_type;
54410 	typedef ::color::model<category_type> model_type;
54411 	typedef ::color::rgb<double> rgb_type;
54412 	typedef ::color::constant::purple_t constant_type;
54413 
54414 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54415 
processcolor::constant::make54416 	inline static void process(container_output_type & container) {
54417 		static model_type s_model{ rgb_type{ 0.5, 0, 0.5 } };
54418 		container = s_model.container();
54419 	}
54420 };
54421 
54422 template< typename category_name >
54423 struct make< ::color::constant::x11::purple_t, category_name > {
54424 	typedef category_name category_type;
54425 	typedef ::color::model<category_type> model_type;
54426 	typedef ::color::rgb<double> rgb_type;
54427 	typedef ::color::constant::x11::purple_t constant_type;
54428 
54429 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54430 
processcolor::constant::make54431 	inline static void process(container_output_type & container) {
54432 		static model_type s_model{ rgb_type{ 0.63, 0.13, 0.94 } };
54433 		container = s_model.container();
54434 	}
54435 };
54436 
54437 }
54438 
54439 }
54440 
54441 namespace color {
54442 namespace constant {
54443 
54444 template< typename category_name >
54445 struct make< ::color::constant::silver_t, category_name > {
54446 	typedef category_name category_type;
54447 
54448 	typedef ::color::model<category_type> model_type;
54449 	typedef ::color::rgb<double> rgb_type;
54450 	typedef ::color::constant::silver_t constant_type;
54451 
54452 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54453 
processcolor::constant::make54454 	inline static void process(container_output_type & container) {
54455 		static model_type s_model{ rgb_type{ 0.75, 0.75, 0.75 } };
54456 		container = s_model.container();
54457 	}
54458 };
54459 
54460 }
54461 }
54462 
54463 namespace color {
54464 namespace constant {
54465 
54466 template< typename category_name >
54467 struct make< ::color::constant::teal_t, category_name > {
54468 	typedef category_name category_type;
54469 
54470 	typedef ::color::model<category_type> model_type;
54471 	typedef ::color::rgb<double> rgb_type;
54472 	typedef ::color::constant::teal_t constant_type;
54473 
54474 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54475 
processcolor::constant::make54476 	inline static void process(container_output_type & container) {
54477 		static model_type s_model{ rgb_type{ 0, 0.5, 0.5 } };
54478 		container = s_model.container();
54479 	}
54480 };
54481 
54482 }
54483 }
54484 
54485 namespace color {
54486 namespace constant {
54487 
54488 template< typename category_name >
54489 struct make< ::color::constant::violet_t, category_name > {
54490 	typedef category_name category_type;
54491 
54492 	typedef ::color::model<category_type> model_type;
54493 	typedef ::color::rgb< std::uint8_t > rgb_type;
54494 	typedef ::color::constant::violet_t constant_type;
54495 
54496 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54497 
processcolor::constant::make54498 	inline static void process(container_output_type & container) {
54499 		static model_type s_model{ rgb_type{ 0xEE, 0x82, 0xEE } };
54500 		container = s_model.container();
54501 	}
54502 };
54503 
54504 }
54505 }
54506 
54507 namespace color {
54508 namespace constant {
54509 
54510 template< typename category_name >
54511 struct make< ::color::constant::aquamarine_t, category_name > {
54512 	typedef category_name category_type;
54513 
54514 	typedef ::color::model<category_type> model_type;
54515 	typedef ::color::rgb<double> rgb_type;
54516 	typedef ::color::constant::aquamarine_t constant_type;
54517 
54518 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54519 
processcolor::constant::make54520 	inline static void process(container_output_type & container) {
54521 		static model_type s_model{ rgb_type{ 0.5, 1, 212.0/255.0 } };
54522 		container = s_model.container();
54523 	}
54524 };
54525 
54526 }
54527 }
54528 
54529 namespace color {
54530 namespace constant {
54531 
54532 template< typename category_name >
54533 struct make< ::color::constant::azure_t, category_name > {
54534 	typedef category_name category_type;
54535 
54536 	typedef ::color::model<category_type> model_type;
54537 	typedef ::color::rgb<double> rgb_type;
54538 	typedef ::color::constant::azure_t constant_type;
54539 
54540 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54541 
processcolor::constant::make54542 	inline static void process(container_output_type & container) {
54543 		static model_type s_model{ rgb_type{ 0.9375, 1, 1 } };
54544 		container = s_model.container();
54545 	}
54546 };
54547 
54548 }
54549 }
54550 
54551 namespace color {
54552 namespace constant {
54553 
54554 template< typename category_name >
54555 struct make< ::color::constant::beige_t, category_name > {
54556 	typedef category_name category_type;
54557 
54558 	typedef ::color::model<category_type> model_type;
54559 	typedef ::color::rgb<std::uint8_t> rgb_type;
54560 	typedef ::color::constant::beige_t constant_type;
54561 
54562 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54563 
processcolor::constant::make54564 	inline static void process(container_output_type & container) {
54565 		static model_type s_model{ rgb_type{ 0xF5, 0xF5, 0xDC } };
54566 		container = s_model.container();
54567 	}
54568 };
54569 
54570 }
54571 }
54572 
54573 namespace color {
54574 namespace constant {
54575 
54576 template< typename category_name >
54577 struct make< ::color::constant::bisque_t, category_name > {
54578 	typedef category_name category_type;
54579 
54580 	typedef ::color::model<category_type> model_type;
54581 	typedef ::color::rgb<double> rgb_type;
54582 	typedef ::color::constant::bisque_t constant_type;
54583 
54584 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54585 
processcolor::constant::make54586 	inline static void process(container_output_type & container) {
54587 		static model_type s_model{ rgb_type{ 1, 0.875, 0.75 } };
54588 		container = s_model.container();
54589 	}
54590 };
54591 
54592 }
54593 }
54594 
54595 namespace color {
54596 namespace constant {
54597 
54598 template< typename category_name >
54599 struct make< ::color::constant::brown_t, category_name > {
54600 	typedef category_name category_type;
54601 
54602 	typedef ::color::model<category_type> model_type;
54603 	typedef ::color::rgb<std::uint8_t> rgb_type;
54604 	typedef ::color::constant::brown_t constant_type;
54605 
54606 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54607 
processcolor::constant::make54608 	inline static void process(container_output_type & container) {
54609 		static model_type s_model{ rgb_type{ 0xA5, 0x2A, 0x2A } };
54610 		container = s_model.container();
54611 	}
54612 };
54613 
54614 }
54615 }
54616 
54617 namespace color {
54618 namespace constant {
54619 
54620 template< typename category_name >
54621 struct make< ::color::constant::chocolate_t, category_name > {
54622 	typedef category_name category_type;
54623 
54624 	typedef ::color::model<category_type> model_type;
54625 	typedef ::color::rgb<std::uint8_t> rgb_type;
54626 	typedef ::color::constant::chocolate_t constant_type;
54627 
54628 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54629 
processcolor::constant::make54630 	inline static void process(container_output_type & container) {
54631 		static model_type s_model{ rgb_type{ 0xD2, 0x69, 0x1E } };
54632 		container = s_model.container();
54633 	}
54634 };
54635 
54636 }
54637 }
54638 
54639 namespace color {
54640 namespace constant {
54641 
54642 template< typename category_name >
54643 struct make< ::color::constant::coral_t, category_name > {
54644 	typedef category_name category_type;
54645 
54646 	typedef ::color::model<category_type> model_type;
54647 	typedef ::color::rgb<double> rgb_type;
54648 	typedef ::color::constant::coral_t constant_type;
54649 
54650 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54651 
processcolor::constant::make54652 	inline static void process(container_output_type & container) {
54653 		static model_type s_model{ rgb_type{ 1, 0.5, 0.31 } };
54654 		container = s_model.container();
54655 	}
54656 };
54657 
54658 }
54659 }
54660 
54661 namespace color {
54662 namespace constant {
54663 
54664 template< typename category_name >
54665 struct make< ::color::constant::crimson_t, category_name > {
54666 	typedef category_name category_type;
54667 
54668 	typedef ::color::model<category_type> model_type;
54669 	typedef ::color::rgb<std::uint8_t> rgb_type;
54670 	typedef ::color::constant::crimson_t constant_type;
54671 
54672 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54673 
processcolor::constant::make54674 	inline static void process(container_output_type & container) {
54675 		static model_type s_model{ rgb_type{ 0xDC, 0x14, 0x3C } };
54676 		container = s_model.container();
54677 	}
54678 };
54679 
54680 }
54681 }
54682 
54683 namespace color {
54684 namespace constant {
54685 
54686 template< typename category_name >
54687 struct make< ::color::constant::gainsboro_t, category_name > {
54688 	typedef category_name category_type;
54689 
54690 	typedef ::color::model<category_type> model_type;
54691 	typedef ::color::rgb<std::uint8_t> rgb_type;
54692 	typedef ::color::constant::gainsboro_t constant_type;
54693 
54694 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54695 
processcolor::constant::make54696 	inline static void process(container_output_type & container) {
54697 		static model_type s_model{ rgb_type{ 0xDC, 0xDC, 0xDC } };
54698 		container = s_model.container();
54699 	}
54700 };
54701 
54702 }
54703 }
54704 
54705 namespace color {
54706 namespace constant {
54707 
54708 template< typename category_name >
54709 struct make< ::color::constant::gold_t, category_name > {
54710 	typedef category_name category_type;
54711 
54712 	typedef ::color::model<category_type> model_type;
54713 	typedef ::color::rgb<std::uint8_t> rgb_type;
54714 	typedef ::color::constant::gold_t constant_type;
54715 
54716 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54717 
processcolor::constant::make54718 	inline static void process(container_output_type & container) {
54719 		static model_type s_model{ rgb_type{ 0xFF, 0xD7, 0x00 } };
54720 		container = s_model.container();
54721 	}
54722 };
54723 
54724 }
54725 }
54726 
54727 namespace color {
54728 namespace constant {
54729 
54730 template< typename category_name >
54731 struct make< ::color::constant::indigo_t, category_name > {
54732 	typedef category_name category_type;
54733 
54734 	typedef ::color::model<category_type> model_type;
54735 	typedef ::color::rgb<std::uint8_t> rgb_type;
54736 	typedef ::color::constant::indigo_t constant_type;
54737 
54738 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54739 
processcolor::constant::make54740 	inline static void process(container_output_type & container) {
54741 		static model_type s_model{ rgb_type{ 0x4B, 0x00, 0x82 } };
54742 		container = s_model.container();
54743 	}
54744 };
54745 
54746 }
54747 }
54748 
54749 namespace color {
54750 namespace constant {
54751 
54752 template< typename category_name >
54753 struct make< ::color::constant::ivory_t, category_name > {
54754 	typedef category_name category_type;
54755 
54756 	typedef ::color::model<category_type> model_type;
54757 	typedef ::color::rgb<double> rgb_type;
54758 	typedef ::color::constant::ivory_t constant_type;
54759 
54760 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54761 
processcolor::constant::make54762 	inline static void process(container_output_type & container) {
54763 		static model_type s_model{ rgb_type{ 1, 1, 0.9375 } };
54764 		container = s_model.container();
54765 	}
54766 };
54767 
54768 }
54769 }
54770 
54771 namespace color {
54772 namespace constant {
54773 
54774 template< typename category_name >
54775 struct make< ::color::constant::khaki_t, category_name > {
54776 	typedef category_name category_type;
54777 
54778 	typedef ::color::model<category_type> model_type;
54779 	typedef ::color::rgb<double> rgb_type;
54780 	typedef ::color::constant::khaki_t constant_type;
54781 
54782 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54783 
processcolor::constant::make54784 	inline static void process(container_output_type & container) {
54785 		static model_type s_model{ rgb_type{ 0.9375, 0.9, 0.55 } };
54786 		container = s_model.container();
54787 	}
54788 };
54789 
54790 }
54791 }
54792 
54793 namespace color {
54794 namespace constant {
54795 
54796 template< typename category_name >
54797 struct make< ::color::constant::lavender_t, category_name > {
54798 	typedef category_name category_type;
54799 
54800 	typedef ::color::model<category_type> model_type;
54801 	typedef ::color::rgb<std::uint8_t> rgb_type;
54802 	typedef ::color::constant::lavender_t constant_type;
54803 
54804 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54805 
processcolor::constant::make54806 	inline static void process(container_output_type & container) {
54807 		static model_type s_model{ rgb_type{ 0xE6, 0xE6, 0xFA } };
54808 		container = s_model.container();
54809 	}
54810 };
54811 
54812 }
54813 }
54814 
54815 namespace color {
54816 namespace constant {
54817 
54818 template< typename category_name >
54819 struct make< ::color::constant::linen_t, category_name > {
54820 	typedef category_name category_type;
54821 
54822 	typedef ::color::model<category_type> model_type;
54823 	typedef ::color::rgb<double> rgb_type;
54824 	typedef ::color::constant::linen_t constant_type;
54825 
54826 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54827 
processcolor::constant::make54828 	inline static void process(container_output_type & container) {
54829 		static model_type s_model{ rgb_type{ 250.0/255.0, 0.9375, 0.9 } };
54830 		container = s_model.container();
54831 	}
54832 };
54833 
54834 }
54835 }
54836 
54837 namespace color {
54838 namespace constant {
54839 
54840 template< typename category_name >
54841 struct make< ::color::constant::moccasin_t, category_name > {
54842 	typedef category_name category_type;
54843 
54844 	typedef ::color::model<category_type> model_type;
54845 	typedef ::color::rgb<std::uint8_t> rgb_type;
54846 	typedef ::color::constant::moccasin_t constant_type;
54847 
54848 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54849 
processcolor::constant::make54850 	inline static void process(container_output_type & container) {
54851 		static model_type s_model{ rgb_type{ 0xFF, 0xE4, 0xB5 } };
54852 		container = s_model.container();
54853 	}
54854 };
54855 
54856 }
54857 }
54858 
54859 namespace color {
54860 namespace constant {
54861 
54862 template< typename category_name >
54863 struct make< ::color::constant::orchid_t, category_name > {
54864 	typedef category_name category_type;
54865 
54866 	typedef ::color::model<category_type> model_type;
54867 	typedef ::color::rgb<std::uint8_t> rgb_type;
54868 	typedef ::color::constant::orchid_t constant_type;
54869 
54870 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54871 
processcolor::constant::make54872 	inline static void process(container_output_type & container) {
54873 		static model_type s_model{ rgb_type{ 0xDA, 0x70, 0xD6 } };
54874 		container = s_model.container();
54875 	}
54876 };
54877 
54878 }
54879 }
54880 
54881 namespace color {
54882 namespace constant {
54883 
54884 template< typename category_name >
54885 struct make< ::color::constant::peru_t, category_name > {
54886 	typedef category_name category_type;
54887 
54888 	typedef ::color::model<category_type> model_type;
54889 	typedef ::color::rgb<double> rgb_type;
54890 	typedef ::color::constant::peru_t constant_type;
54891 
54892 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54893 
processcolor::constant::make54894 	inline static void process(container_output_type & container) {
54895 		static model_type s_model{ rgb_type{ 0.8, 0.52, 0.25 } };
54896 		container = s_model.container();
54897 	}
54898 };
54899 
54900 }
54901 }
54902 
54903 namespace color {
54904 namespace constant {
54905 
54906 template< typename category_name >
54907 struct make< ::color::constant::pink_t, category_name > {
54908 	typedef category_name category_type;
54909 
54910 	typedef ::color::model<category_type> model_type;
54911 	typedef ::color::rgb<double> rgb_type;
54912 	typedef ::color::constant::pink_t constant_type;
54913 
54914 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54915 
processcolor::constant::make54916 	inline static void process(container_output_type & container) {
54917 		static model_type s_model{ rgb_type{ 1, 0.75, 0.8 } };
54918 		container = s_model.container();
54919 	}
54920 };
54921 
54922 }
54923 }
54924 
54925 namespace color {
54926 namespace constant {
54927 
54928 template< typename category_name >
54929 struct make< ::color::constant::plum_t, category_name > {
54930 	typedef category_name category_type;
54931 
54932 	typedef ::color::model<category_type> model_type;
54933 	typedef ::color::rgb<std::uint8_t> rgb_type;
54934 	typedef ::color::constant::plum_t constant_type;
54935 
54936 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54937 
processcolor::constant::make54938 	inline static void process(container_output_type & container) {
54939 		static model_type s_model{ rgb_type{ 0xDD, 0xA0, 0xDD } };
54940 		container = s_model.container();
54941 	}
54942 };
54943 
54944 }
54945 }
54946 
54947 namespace color {
54948 namespace constant {
54949 
54950 template< typename category_name >
54951 struct make< ::color::constant::salmon_t, category_name > {
54952 	typedef category_name category_type;
54953 
54954 	typedef ::color::model<category_type> model_type;
54955 	typedef ::color::rgb<double> rgb_type;
54956 	typedef ::color::constant::salmon_t constant_type;
54957 
54958 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54959 
processcolor::constant::make54960 	inline static void process(container_output_type & container) {
54961 		static model_type s_model{ rgb_type{ 250/255.0, 0.5, 114/255.0 } };
54962 		container = s_model.container();
54963 	}
54964 };
54965 
54966 }
54967 }
54968 
54969 namespace color {
54970 namespace constant {
54971 
54972 template< typename category_name >
54973 struct make< ::color::constant::sienna_t, category_name > {
54974 	typedef category_name category_type;
54975 
54976 	typedef ::color::model<category_type> model_type;
54977 	typedef ::color::rgb<std::uint8_t> rgb_type;
54978 	typedef ::color::constant::sienna_t constant_type;
54979 
54980 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
54981 
processcolor::constant::make54982 	inline static void process(container_output_type & container) {
54983 		static model_type s_model{ rgb_type{ 0xA0, 0x52, 0x2D } };
54984 		container = s_model.container();
54985 	}
54986 };
54987 
54988 }
54989 }
54990 
54991 namespace color {
54992 namespace constant {
54993 
54994 template< typename category_name >
54995 struct make< ::color::constant::snow_t, category_name > {
54996 	typedef category_name category_type;
54997 
54998 	typedef ::color::model<category_type> model_type;
54999 	typedef ::color::rgb<std::uint8_t> rgb_type;
55000 	typedef ::color::constant::snow_t constant_type;
55001 
55002 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
55003 
processcolor::constant::make55004 	inline static void process(container_output_type & container) {
55005 		static model_type s_model{ rgb_type{ 0xFF, 0xFA, 0xFA } };
55006 		container = s_model.container();
55007 	}
55008 };
55009 
55010 }
55011 }
55012 
55013 namespace color {
55014 namespace constant {
55015 
55016 template< typename category_name >
55017 struct make< ::color::constant::tan_t, category_name > {
55018 	typedef category_name category_type;
55019 
55020 	typedef ::color::model<category_type> model_type;
55021 	typedef ::color::rgb<std::uint8_t> rgb_type;
55022 	typedef ::color::constant::tan_t constant_type;
55023 
55024 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
55025 
processcolor::constant::make55026 	inline static void process(container_output_type & container) {
55027 		static model_type s_model{ rgb_type{ 0xD2, 0xB4, 0x8C } };
55028 		container = s_model.container();
55029 	}
55030 };
55031 
55032 }
55033 }
55034 
55035 namespace color {
55036 namespace constant {
55037 
55038 template< typename category_name >
55039 struct make< ::color::constant::thistle_t, category_name > {
55040 	typedef category_name category_type;
55041 
55042 	typedef ::color::model<category_type> model_type;
55043 	typedef ::color::rgb<double> rgb_type;
55044 	typedef ::color::constant::thistle_t constant_type;
55045 
55046 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
55047 
processcolor::constant::make55048 	inline static void process(container_output_type & container) {
55049 		static model_type s_model{ rgb_type{ 0.85, 0.75, 0.85 } };
55050 		container = s_model.container();
55051 	}
55052 };
55053 
55054 }
55055 }
55056 
55057 namespace color {
55058 namespace constant {
55059 
55060 template< typename category_name >
55061 struct make< ::color::constant::tomato_t, category_name > {
55062 	typedef category_name category_type;
55063 
55064 	typedef ::color::model<category_type> model_type;
55065 	typedef ::color::rgb<std::uint8_t> rgb_type;
55066 	typedef ::color::constant::tomato_t constant_type;
55067 
55068 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
55069 
processcolor::constant::make55070 	inline static void process(container_output_type & container) {
55071 		static model_type s_model{ rgb_type{ 0xFF, 0x63, 0x47 } };
55072 		container = s_model.container();
55073 	}
55074 };
55075 
55076 }
55077 }
55078 
55079 namespace color {
55080 namespace constant {
55081 
55082 template< typename category_name >
55083 struct make< ::color::constant::turquoise_t, category_name > {
55084 	typedef category_name category_type;
55085 
55086 	typedef ::color::model<category_type> model_type;
55087 	typedef ::color::rgb<double> rgb_type;
55088 	typedef ::color::constant::turquoise_t constant_type;
55089 
55090 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
55091 
processcolor::constant::make55092 	inline static void process(container_output_type & container) {
55093 		static model_type s_model{ rgb_type{ 0.25, 0.875, 0.8125 } };
55094 		container = s_model.container();
55095 	}
55096 };
55097 
55098 }
55099 }
55100 
55101 namespace color {
55102 namespace constant {
55103 
55104 template< typename category_name >
55105 struct make< ::color::constant::wheat_t, category_name > {
55106 	typedef category_name category_type;
55107 
55108 	typedef ::color::model<category_type> model_type;
55109 	typedef ::color::rgb<std::uint8_t> rgb_type;
55110 	typedef ::color::constant::wheat_t constant_type;
55111 
55112 	typedef typename ::color::trait::container<category_type>::output_type container_output_type;
55113 
processcolor::constant::make55114 	inline static void process(container_output_type & container) {
55115 		static model_type s_model{ rgb_type{ 0xF5, 0xDE, 0xB3 } };
55116 		container = s_model.container();
55117 	}
55118 };
55119 
55120 }
55121 }
55122 
55123 using namespace ::color::operation::arithmetic;
55124 using namespace ::color::compare::operators;
55125