@jjlmoya/utils-developer 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +64 -0
- package/src/category/i18n/en.ts +34 -0
- package/src/category/i18n/es.ts +34 -0
- package/src/category/i18n/fr.ts +34 -0
- package/src/category/index.ts +31 -0
- package/src/category/seo.astro +15 -0
- package/src/components/PreviewNavSidebar.astro +116 -0
- package/src/components/PreviewToolbar.astro +143 -0
- package/src/data.ts +11 -0
- package/src/env.d.ts +5 -0
- package/src/index.ts +78 -0
- package/src/layouts/PreviewLayout.astro +117 -0
- package/src/pages/[locale]/[slug].astro +146 -0
- package/src/pages/[locale].astro +251 -0
- package/src/pages/index.astro +4 -0
- package/src/tests/css_specificity_logic.test.ts +39 -0
- package/src/tests/faq_count.test.ts +19 -0
- package/src/tests/locale_completeness.test.ts +42 -0
- package/src/tests/mocks/astro_mock.js +2 -0
- package/src/tests/no_h1_in_components.test.ts +48 -0
- package/src/tests/schemas_fulfillment.test.ts +23 -0
- package/src/tests/seo_length.test.ts +22 -0
- package/src/tests/title_quality.test.ts +55 -0
- package/src/tests/tool_validation.test.ts +17 -0
- package/src/tool/aspectRatio/bibliography.astro +14 -0
- package/src/tool/aspectRatio/component.astro +468 -0
- package/src/tool/aspectRatio/i18n/en.ts +177 -0
- package/src/tool/aspectRatio/i18n/es.ts +177 -0
- package/src/tool/aspectRatio/i18n/fr.ts +177 -0
- package/src/tool/aspectRatio/index.ts +34 -0
- package/src/tool/aspectRatio/seo.astro +14 -0
- package/src/tool/aspectRatio/ui.ts +12 -0
- package/src/tool/calculadoraTiempoDatos/bibliography.astro +14 -0
- package/src/tool/calculadoraTiempoDatos/component.astro +829 -0
- package/src/tool/calculadoraTiempoDatos/i18n/en.ts +150 -0
- package/src/tool/calculadoraTiempoDatos/i18n/es.ts +163 -0
- package/src/tool/calculadoraTiempoDatos/i18n/fr.ts +150 -0
- package/src/tool/calculadoraTiempoDatos/index.ts +33 -0
- package/src/tool/calculadoraTiempoDatos/seo.astro +14 -0
- package/src/tool/calculadoraTiempoDatos/ui.ts +24 -0
- package/src/tool/colorConverter/bibliography.astro +14 -0
- package/src/tool/colorConverter/component.astro +504 -0
- package/src/tool/colorConverter/i18n/en.ts +126 -0
- package/src/tool/colorConverter/i18n/es.ts +126 -0
- package/src/tool/colorConverter/i18n/fr.ts +126 -0
- package/src/tool/colorConverter/index.ts +33 -0
- package/src/tool/colorConverter/seo.astro +14 -0
- package/src/tool/colorConverter/ui.ts +16 -0
- package/src/tool/conversorExcelCsvHtml/bibliography.astro +14 -0
- package/src/tool/conversorExcelCsvHtml/component.astro +595 -0
- package/src/tool/conversorExcelCsvHtml/i18n/en.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/i18n/es.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/i18n/fr.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/index.ts +33 -0
- package/src/tool/conversorExcelCsvHtml/seo.astro +14 -0
- package/src/tool/conversorExcelCsvHtml/ui.ts +14 -0
- package/src/tool/cronGenerator/bibliography.astro +14 -0
- package/src/tool/cronGenerator/component.astro +667 -0
- package/src/tool/cronGenerator/i18n/en.ts +191 -0
- package/src/tool/cronGenerator/i18n/es.ts +191 -0
- package/src/tool/cronGenerator/i18n/fr.ts +191 -0
- package/src/tool/cronGenerator/index.ts +34 -0
- package/src/tool/cronGenerator/seo.astro +14 -0
- package/src/tool/cronGenerator/ui.ts +45 -0
- package/src/tool/cssSpecificityCalculator/bibliography.astro +14 -0
- package/src/tool/cssSpecificityCalculator/component.astro +292 -0
- package/src/tool/cssSpecificityCalculator/i18n/en.ts +168 -0
- package/src/tool/cssSpecificityCalculator/i18n/es.ts +168 -0
- package/src/tool/cssSpecificityCalculator/i18n/fr.ts +168 -0
- package/src/tool/cssSpecificityCalculator/index.ts +34 -0
- package/src/tool/cssSpecificityCalculator/logic.ts +100 -0
- package/src/tool/cssSpecificityCalculator/seo.astro +14 -0
- package/src/tool/cssSpecificityCalculator/ui-controller.ts +57 -0
- package/src/tool/cssSpecificityCalculator/ui.ts +11 -0
- package/src/tool/cssToInlineConverter/bibliography.astro +14 -0
- package/src/tool/cssToInlineConverter/component.astro +308 -0
- package/src/tool/cssToInlineConverter/i18n/en.ts +160 -0
- package/src/tool/cssToInlineConverter/i18n/es.ts +160 -0
- package/src/tool/cssToInlineConverter/i18n/fr.ts +160 -0
- package/src/tool/cssToInlineConverter/index.ts +34 -0
- package/src/tool/cssToInlineConverter/seo.astro +14 -0
- package/src/tool/cssToInlineConverter/ui.ts +12 -0
- package/src/tool/duplicateCssRemover/bibliography.astro +14 -0
- package/src/tool/duplicateCssRemover/component.astro +353 -0
- package/src/tool/duplicateCssRemover/i18n/en.ts +167 -0
- package/src/tool/duplicateCssRemover/i18n/es.ts +167 -0
- package/src/tool/duplicateCssRemover/i18n/fr.ts +167 -0
- package/src/tool/duplicateCssRemover/index.ts +34 -0
- package/src/tool/duplicateCssRemover/seo.astro +14 -0
- package/src/tool/duplicateCssRemover/ui.ts +12 -0
- package/src/tool/generadorSecurityTxt/bibliography.astro +14 -0
- package/src/tool/generadorSecurityTxt/component.astro +473 -0
- package/src/tool/generadorSecurityTxt/i18n/en.ts +173 -0
- package/src/tool/generadorSecurityTxt/i18n/es.ts +173 -0
- package/src/tool/generadorSecurityTxt/i18n/fr.ts +173 -0
- package/src/tool/generadorSecurityTxt/index.ts +33 -0
- package/src/tool/generadorSecurityTxt/seo.astro +14 -0
- package/src/tool/generadorSecurityTxt/ui.ts +27 -0
- package/src/tool/hashGenerator/bibliography.astro +14 -0
- package/src/tool/hashGenerator/component.astro +367 -0
- package/src/tool/hashGenerator/i18n/en.ts +118 -0
- package/src/tool/hashGenerator/i18n/es.ts +118 -0
- package/src/tool/hashGenerator/i18n/fr.ts +118 -0
- package/src/tool/hashGenerator/index.ts +33 -0
- package/src/tool/hashGenerator/md5.ts +138 -0
- package/src/tool/hashGenerator/seo.astro +14 -0
- package/src/tool/hashGenerator/ui.ts +11 -0
- package/src/tool/inspectorCertificadosSsl/bibliography.astro +14 -0
- package/src/tool/inspectorCertificadosSsl/component.astro +580 -0
- package/src/tool/inspectorCertificadosSsl/i18n/en.ts +214 -0
- package/src/tool/inspectorCertificadosSsl/i18n/es.ts +214 -0
- package/src/tool/inspectorCertificadosSsl/i18n/fr.ts +214 -0
- package/src/tool/inspectorCertificadosSsl/index.ts +33 -0
- package/src/tool/inspectorCertificadosSsl/seo.astro +14 -0
- package/src/tool/inspectorCertificadosSsl/ui.ts +29 -0
- package/src/tool/jsonFormatter/bibliography.astro +14 -0
- package/src/tool/jsonFormatter/component.astro +590 -0
- package/src/tool/jsonFormatter/i18n/en.ts +156 -0
- package/src/tool/jsonFormatter/i18n/es.ts +156 -0
- package/src/tool/jsonFormatter/i18n/fr.ts +156 -0
- package/src/tool/jsonFormatter/index.ts +34 -0
- package/src/tool/jsonFormatter/seo.astro +14 -0
- package/src/tool/jsonFormatter/ui.ts +15 -0
- package/src/tool/keycode/bibliography.astro +14 -0
- package/src/tool/keycode/component.astro +540 -0
- package/src/tool/keycode/i18n/en.ts +160 -0
- package/src/tool/keycode/i18n/es.ts +160 -0
- package/src/tool/keycode/i18n/fr.ts +160 -0
- package/src/tool/keycode/index.ts +34 -0
- package/src/tool/keycode/seo.astro +14 -0
- package/src/tool/keycode/ui.ts +10 -0
- package/src/tool/llmCostCalculator/bibliography.astro +14 -0
- package/src/tool/llmCostCalculator/component.astro +488 -0
- package/src/tool/llmCostCalculator/data.ts +99 -0
- package/src/tool/llmCostCalculator/i18n/en.ts +165 -0
- package/src/tool/llmCostCalculator/i18n/es.ts +165 -0
- package/src/tool/llmCostCalculator/i18n/fr.ts +165 -0
- package/src/tool/llmCostCalculator/index.ts +34 -0
- package/src/tool/llmCostCalculator/seo.astro +14 -0
- package/src/tool/llmCostCalculator/ui.ts +11 -0
- package/src/tool/mobileMockupGenerator/app.ts +614 -0
- package/src/tool/mobileMockupGenerator/bibliography.astro +14 -0
- package/src/tool/mobileMockupGenerator/component.astro +1044 -0
- package/src/tool/mobileMockupGenerator/constants.ts +48 -0
- package/src/tool/mobileMockupGenerator/i18n/en.ts +121 -0
- package/src/tool/mobileMockupGenerator/i18n/es.ts +121 -0
- package/src/tool/mobileMockupGenerator/i18n/fr.ts +121 -0
- package/src/tool/mobileMockupGenerator/index.ts +33 -0
- package/src/tool/mobileMockupGenerator/rendering.ts +189 -0
- package/src/tool/mobileMockupGenerator/seo.astro +14 -0
- package/src/tool/mobileMockupGenerator/store.ts +145 -0
- package/src/tool/mobileMockupGenerator/types.ts +41 -0
- package/src/tool/mobileMockupGenerator/ui.ts +48 -0
- package/src/tool/musicalTypography/bibliography.astro +14 -0
- package/src/tool/musicalTypography/component.astro +480 -0
- package/src/tool/musicalTypography/i18n/en.ts +179 -0
- package/src/tool/musicalTypography/i18n/es.ts +179 -0
- package/src/tool/musicalTypography/i18n/fr.ts +179 -0
- package/src/tool/musicalTypography/index.ts +33 -0
- package/src/tool/musicalTypography/seo.astro +14 -0
- package/src/tool/musicalTypography/ui.ts +25 -0
- package/src/tool/placeholderGenerator/bibliography.astro +14 -0
- package/src/tool/placeholderGenerator/component.astro +499 -0
- package/src/tool/placeholderGenerator/i18n/en.ts +176 -0
- package/src/tool/placeholderGenerator/i18n/es.ts +176 -0
- package/src/tool/placeholderGenerator/i18n/fr.ts +176 -0
- package/src/tool/placeholderGenerator/index.ts +34 -0
- package/src/tool/placeholderGenerator/seo.astro +14 -0
- package/src/tool/placeholderGenerator/ui.ts +14 -0
- package/src/tool/promptLibrary/bibliography.astro +14 -0
- package/src/tool/promptLibrary/component.astro +1131 -0
- package/src/tool/promptLibrary/controller.ts +49 -0
- package/src/tool/promptLibrary/i18n/en.ts +131 -0
- package/src/tool/promptLibrary/i18n/es.ts +131 -0
- package/src/tool/promptLibrary/i18n/fr.ts +126 -0
- package/src/tool/promptLibrary/index.ts +33 -0
- package/src/tool/promptLibrary/seo.astro +14 -0
- package/src/tool/promptLibrary/ui.ts +29 -0
- package/src/tool/readabilityCalculator/bibliography.astro +14 -0
- package/src/tool/readabilityCalculator/component.astro +534 -0
- package/src/tool/readabilityCalculator/i18n/en.ts +133 -0
- package/src/tool/readabilityCalculator/i18n/es.ts +133 -0
- package/src/tool/readabilityCalculator/i18n/fr.ts +133 -0
- package/src/tool/readabilityCalculator/index.ts +33 -0
- package/src/tool/readabilityCalculator/seo.astro +14 -0
- package/src/tool/readabilityCalculator/ui.ts +27 -0
- package/src/tool/svgSanitizer/bibliography.astro +14 -0
- package/src/tool/svgSanitizer/component.astro +554 -0
- package/src/tool/svgSanitizer/i18n/en.ts +125 -0
- package/src/tool/svgSanitizer/i18n/es.ts +125 -0
- package/src/tool/svgSanitizer/i18n/fr.ts +125 -0
- package/src/tool/svgSanitizer/index.ts +33 -0
- package/src/tool/svgSanitizer/seo.astro +14 -0
- package/src/tool/svgSanitizer/ui.ts +18 -0
- package/src/tool/svgToCss/bibliography.astro +14 -0
- package/src/tool/svgToCss/component.astro +381 -0
- package/src/tool/svgToCss/i18n/en.ts +174 -0
- package/src/tool/svgToCss/i18n/es.ts +174 -0
- package/src/tool/svgToCss/i18n/fr.ts +174 -0
- package/src/tool/svgToCss/index.ts +34 -0
- package/src/tool/svgToCss/seo.astro +14 -0
- package/src/tool/svgToCss/ui.ts +13 -0
- package/src/tool/urlCleaner/bibliography.astro +14 -0
- package/src/tool/urlCleaner/component.astro +458 -0
- package/src/tool/urlCleaner/i18n/en.ts +116 -0
- package/src/tool/urlCleaner/i18n/es.ts +116 -0
- package/src/tool/urlCleaner/i18n/fr.ts +116 -0
- package/src/tool/urlCleaner/index.ts +33 -0
- package/src/tool/urlCleaner/seo.astro +14 -0
- package/src/tool/urlCleaner/ui.ts +12 -0
- package/src/tool/urlEncoderDecoder/bibliography.astro +14 -0
- package/src/tool/urlEncoderDecoder/component.astro +291 -0
- package/src/tool/urlEncoderDecoder/i18n/en.ts +162 -0
- package/src/tool/urlEncoderDecoder/i18n/es.ts +162 -0
- package/src/tool/urlEncoderDecoder/i18n/fr.ts +162 -0
- package/src/tool/urlEncoderDecoder/index.ts +34 -0
- package/src/tool/urlEncoderDecoder/seo.astro +14 -0
- package/src/tool/urlEncoderDecoder/ui.ts +11 -0
- package/src/tool/utmGenerator/bibliography.astro +14 -0
- package/src/tool/utmGenerator/component.astro +270 -0
- package/src/tool/utmGenerator/i18n/en.ts +117 -0
- package/src/tool/utmGenerator/i18n/es.ts +117 -0
- package/src/tool/utmGenerator/i18n/fr.ts +117 -0
- package/src/tool/utmGenerator/index.ts +33 -0
- package/src/tool/utmGenerator/seo.astro +14 -0
- package/src/tool/utmGenerator/ui.ts +13 -0
- package/src/tools.ts +27 -0
- package/src/types.ts +72 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { ColorConverterUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'conversor-color-rgb-hex-hsl';
|
|
6
|
+
const title = 'Conversor de Color RGB HEX y HSL';
|
|
7
|
+
const description = 'Convierte colores entre RGB, HEX y HSL al instante. Genera armonías complementarias y analiza el contraste WCAG. Herramienta 100% client-side y privada.';
|
|
8
|
+
|
|
9
|
+
const faqData = [
|
|
10
|
+
{
|
|
11
|
+
question: '\u00bfC\u00f3mo funciona el conversor de colores RGB a HEX y HSL?',
|
|
12
|
+
answer: 'La herramienta toma valores de Rojo, Verde y Azul (RGB) y utiliza algoritmos matem\u00e1ticos para convertirlos a su equivalente hexadecimal (HEX) o en valores de tono, saturaci\u00f3n y luminosidad (HSL). Tambi\u00e9n funciona a la inversa.',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
question: '\u00bfPor qu\u00e9 usar HSL en lugar de HEX en mis dise\u00f1os?',
|
|
16
|
+
answer: 'El formato HSL es mucho m\u00e1s intuitivo. Permite modificar la saturaci\u00f3n o la luminosidad sin cambiar la tonalidad, lo que facilita la creaci\u00f3n de paletas arm\u00f3nicas y estados de botones (hover, disabled).',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
question: '\u00bfQu\u00e9 es el valor de contraste relativo?',
|
|
20
|
+
answer: 'Es una m\u00e9trica que indica la legibilidad de un texto sobre un fondo basada en su luminancia. Un contraste alto asegura que personas con dificultades visuales puedan leer el contenido, siguiendo las pautas WCAG.',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
question: '\u00bfEs seguro usar este conversor de color online?',
|
|
24
|
+
answer: 'Totalmente. Al ser 100% client-side, los datos de color nunca salen de tu ordenador. Todo el proceso ocurre directamente en tu navegador, garantizando privacidad y rapidez instant\u00e1nea.',
|
|
25
|
+
},
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const howToData = [
|
|
29
|
+
{ name: 'Seleccionar Color', text: 'Usa los sliders de Rojo, Verde y Azul o escribe directamente el c\u00f3digo HEX en el campo de texto.' },
|
|
30
|
+
{ name: 'Ajustar Canales RGB', text: 'Mueve los sliders para cambiar la intensidad de cada canal y ver la actualizaci\u00f3n en tiempo real.' },
|
|
31
|
+
{ name: 'Copiar el Formato', text: 'Haz clic en el bot\u00f3n Copiar junto al formato HEX, RGB o HSL que necesites.' },
|
|
32
|
+
{ name: 'Explorar Armon\u00edas', text: 'Haz clic en los colores de armon\u00eda (complementario, an\u00e1logos, tr\u00edada) para copiarlos al portapapeles.' },
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
36
|
+
'@context': 'https://schema.org',
|
|
37
|
+
'@type': 'FAQPage',
|
|
38
|
+
mainEntity: faqData.map((item) => ({
|
|
39
|
+
'@type': 'Question',
|
|
40
|
+
name: item.question,
|
|
41
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
42
|
+
})),
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const howToSchema: WithContext<HowToThing> = {
|
|
46
|
+
'@context': 'https://schema.org',
|
|
47
|
+
'@type': 'HowTo',
|
|
48
|
+
name: title,
|
|
49
|
+
description,
|
|
50
|
+
step: howToData.map((s, i) => ({ '@type': 'HowToStep', position: i + 1, name: s.name, text: s.text })),
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
54
|
+
'@context': 'https://schema.org',
|
|
55
|
+
'@type': 'SoftwareApplication',
|
|
56
|
+
name: title,
|
|
57
|
+
description,
|
|
58
|
+
applicationCategory: 'UtilityApplication',
|
|
59
|
+
operatingSystem: 'All',
|
|
60
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
61
|
+
inLanguage: 'es',
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const ui: ColorConverterUI = {
|
|
65
|
+
labelPreview: 'Vista Previa (clic para copiar HEX)',
|
|
66
|
+
labelHarmonies: 'Armon\u00edas de Color',
|
|
67
|
+
labelR: 'Rojo',
|
|
68
|
+
labelG: 'Verde',
|
|
69
|
+
labelB: 'Azul',
|
|
70
|
+
labelComp: 'Comp.',
|
|
71
|
+
labelAna1: 'An\u00e1logo 1',
|
|
72
|
+
labelAna2: 'An\u00e1logo 2',
|
|
73
|
+
labelTri1: 'Tr\u00edada 1',
|
|
74
|
+
labelTri2: 'Tr\u00edada 2',
|
|
75
|
+
btnCopy: 'Copiar',
|
|
76
|
+
btnCopied: 'Copiado',
|
|
77
|
+
contrastLabel: 'Contraste',
|
|
78
|
+
clickToCopy: 'Clic para copiar',
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const content: ToolLocaleContent<ColorConverterUI> = {
|
|
82
|
+
slug,
|
|
83
|
+
title,
|
|
84
|
+
description,
|
|
85
|
+
ui,
|
|
86
|
+
faqTitle: 'Preguntas Frecuentes',
|
|
87
|
+
faq: faqData,
|
|
88
|
+
bibliographyTitle: 'Recursos de Color y Dise\u00f1o Web',
|
|
89
|
+
bibliography: [
|
|
90
|
+
{ name: 'W3C: Documentaci\u00f3n de Colores en CSS', url: 'https://www.w3.org/TR/css-color-4/' },
|
|
91
|
+
{ name: 'MDN: Gu\u00eda del Modelo de Color HSL', url: 'https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl' },
|
|
92
|
+
{ name: 'WebAIM: Gu\u00eda de Contraste y Accesibilidad', url: 'https://webaim.org/resources/contrastchecker/' },
|
|
93
|
+
],
|
|
94
|
+
howTo: howToData,
|
|
95
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
96
|
+
seo: [
|
|
97
|
+
{ type: 'title', text: 'Conversor de Color RGB a HEX y HSL para Desarrolladores', level: 2 },
|
|
98
|
+
{
|
|
99
|
+
type: 'paragraph',
|
|
100
|
+
html: 'En el mundo del <strong>desarrollo frontend</strong> y el <strong>dise\u00f1o UI/UX</strong>, el manejo de colores es una tarea constante. Nuestro <strong>conversor de color online</strong> te permite transformar valores entre <strong>HEX, RGB y HSL</strong> de forma instant\u00e1nea y con precisi\u00f3n matem\u00e1tica.',
|
|
101
|
+
},
|
|
102
|
+
{ type: 'title', text: 'Formatos de Color: HEX, RGB y HSL', level: 3 },
|
|
103
|
+
{
|
|
104
|
+
type: 'list',
|
|
105
|
+
items: [
|
|
106
|
+
'<strong>HEX (Hexadecimal):</strong> El est\u00e1ndar de facto para CSS. Compacto y f\u00e1cil de compartir en el c\u00f3digo.',
|
|
107
|
+
'<strong>RGB (Red, Green, Blue):</strong> Basado en el sistema aditivo de luz. Ideal para manipular canales directamente o aplicar transparencia con RGBA.',
|
|
108
|
+
'<strong>HSL (Hue, Saturation, Lightness):</strong> El formato m\u00e1s intuitivo. Permite ajustar tono, saturaci\u00f3n y luminosidad para crear paletas arm\u00f3nicas.',
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
{ type: 'title', text: 'Contraste y Accesibilidad WCAG', level: 3 },
|
|
112
|
+
{
|
|
113
|
+
type: 'paragraph',
|
|
114
|
+
html: 'La calculadora incluye una medici\u00f3n de <strong>contraste relativo</strong> basada en la luminancia. Esto te ayuda a cumplir con las pautas <strong>WCAG</strong>, asegurando que tus textos sean legibles sobre los fondos seleccionados.',
|
|
115
|
+
},
|
|
116
|
+
{ type: 'title', text: 'Armon\u00edas Autom\u00e1ticas de Color', level: 3 },
|
|
117
|
+
{
|
|
118
|
+
type: 'list',
|
|
119
|
+
items: [
|
|
120
|
+
'<strong>Complementario:</strong> El color opuesto en la rueda crom\u00e1tica, ideal para contraste m\u00e1ximo.',
|
|
121
|
+
'<strong>An\u00e1logos:</strong> Colores adyacentes que crean transiciones suaves y arm\u00f3nicas.',
|
|
122
|
+
'<strong>Tr\u00edada:</strong> Tres colores equidistantes para composiciones vibrantes y equilibradas.',
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { ColorConverterUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'convertisseur-couleur-rgb-hex-hsl';
|
|
6
|
+
const title = 'Convertisseur de Couleur RGB HEX et HSL';
|
|
7
|
+
const description = 'Convertissez des couleurs entre RGB, HEX et HSL instantan\u00e9ment. G\u00e9n\u00e9rez des harmonies de couleurs et analysez le contraste WCAG. 100% client-side et priv\u00e9.';
|
|
8
|
+
|
|
9
|
+
const faqData = [
|
|
10
|
+
{
|
|
11
|
+
question: 'Comment fonctionne le convertisseur de couleurs RGB en HEX et HSL?',
|
|
12
|
+
answer: 'L\'outil prend les valeurs Rouge, Vert et Bleu (RGB) et utilise des algorithmes math\u00e9matiques pour les convertir en leur \u00e9quivalent hexad\u00e9cimal (HEX) ou en valeurs de teinte, saturation et luminosit\u00e9 (HSL). Cela fonctionne aussi en sens inverse.',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
question: 'Pourquoi utiliser HSL plut\u00f4t que HEX dans mes designs?',
|
|
16
|
+
answer: 'Le format HSL est beaucoup plus intuitif. Il permet de modifier la saturation ou la luminosit\u00e9 sans changer la teinte, facilitant la cr\u00e9ation de palettes harmonieuses et d\u2019\u00e9tats de boutons (hover, disabled).',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
question: 'Qu\'est-ce que la valeur de contraste relatif?',
|
|
20
|
+
answer: 'C\'est une m\u00e9trique indiquant la lisibilit\u00e9 d\'un texte sur un fond bas\u00e9e sur sa luminance. Un contraste \u00e9lev\u00e9 assure que les personnes malvoyantes peuvent lire le contenu, conform\u00e9ment aux directives WCAG.',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
question: 'Est-il s\u00fbr d\'utiliser ce convertisseur de couleur en ligne?',
|
|
24
|
+
answer: 'Absolument. \u00c9tant 100% client-side, vos donn\u00e9es de couleur ne quittent jamais votre ordinateur. Tout le traitement se fait directement dans votre navigateur, garantissant confidentialit\u00e9 et rapidit\u00e9 instantan\u00e9e.',
|
|
25
|
+
},
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const howToData = [
|
|
29
|
+
{ name: 'S\u00e9lectionner une Couleur', text: 'Utilisez les curseurs Rouge, Vert et Bleu ou saisissez directement un code HEX dans le champ de texte.' },
|
|
30
|
+
{ name: 'Ajuster les Canaux RGB', text: 'D\u00e9placez les curseurs pour modifier l\'intensit\u00e9 de chaque canal et voir la mise \u00e0 jour en temps r\u00e9el.' },
|
|
31
|
+
{ name: 'Copier le Format', text: 'Cliquez sur le bouton Copier \u00e0 c\u00f4t\u00e9 du format HEX, RGB ou HSL dont vous avez besoin.' },
|
|
32
|
+
{ name: 'Explorer les Harmonies', text: 'Cliquez sur les couleurs d\'harmonie (compl\u00e9mentaire, analogues, triade) pour les copier dans le presse-papiers.' },
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
36
|
+
'@context': 'https://schema.org',
|
|
37
|
+
'@type': 'FAQPage',
|
|
38
|
+
mainEntity: faqData.map((item) => ({
|
|
39
|
+
'@type': 'Question',
|
|
40
|
+
name: item.question,
|
|
41
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
42
|
+
})),
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const howToSchema: WithContext<HowToThing> = {
|
|
46
|
+
'@context': 'https://schema.org',
|
|
47
|
+
'@type': 'HowTo',
|
|
48
|
+
name: title,
|
|
49
|
+
description,
|
|
50
|
+
step: howToData.map((s, i) => ({ '@type': 'HowToStep', position: i + 1, name: s.name, text: s.text })),
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
54
|
+
'@context': 'https://schema.org',
|
|
55
|
+
'@type': 'SoftwareApplication',
|
|
56
|
+
name: title,
|
|
57
|
+
description,
|
|
58
|
+
applicationCategory: 'UtilityApplication',
|
|
59
|
+
operatingSystem: 'All',
|
|
60
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
61
|
+
inLanguage: 'fr',
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const ui: ColorConverterUI = {
|
|
65
|
+
labelPreview: 'Aper\u00e7u (clic pour copier HEX)',
|
|
66
|
+
labelHarmonies: 'Harmonies de Couleur',
|
|
67
|
+
labelR: 'Rouge',
|
|
68
|
+
labelG: 'Vert',
|
|
69
|
+
labelB: 'Bleu',
|
|
70
|
+
labelComp: 'Comp.',
|
|
71
|
+
labelAna1: 'Analogue 1',
|
|
72
|
+
labelAna2: 'Analogue 2',
|
|
73
|
+
labelTri1: 'Triade 1',
|
|
74
|
+
labelTri2: 'Triade 2',
|
|
75
|
+
btnCopy: 'Copier',
|
|
76
|
+
btnCopied: 'Copi\u00e9',
|
|
77
|
+
contrastLabel: 'Contraste',
|
|
78
|
+
clickToCopy: 'Cliquer pour copier',
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const content: ToolLocaleContent<ColorConverterUI> = {
|
|
82
|
+
slug,
|
|
83
|
+
title,
|
|
84
|
+
description,
|
|
85
|
+
ui,
|
|
86
|
+
faqTitle: 'Questions Fr\u00e9quentes',
|
|
87
|
+
faq: faqData,
|
|
88
|
+
bibliographyTitle: 'Ressources sur les Couleurs et le Design Web',
|
|
89
|
+
bibliography: [
|
|
90
|
+
{ name: 'W3C: Documentation des Couleurs CSS', url: 'https://www.w3.org/TR/css-color-4/' },
|
|
91
|
+
{ name: 'MDN: Guide du Mod\u00e8le de Couleur HSL', url: 'https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl' },
|
|
92
|
+
{ name: 'WebAIM: Guide de Contraste et Accessibilit\u00e9', url: 'https://webaim.org/resources/contrastchecker/' },
|
|
93
|
+
],
|
|
94
|
+
howTo: howToData,
|
|
95
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
96
|
+
seo: [
|
|
97
|
+
{ type: 'title', text: 'Convertisseur de Couleur RGB en HEX et HSL pour D\u00e9veloppeurs', level: 2 },
|
|
98
|
+
{
|
|
99
|
+
type: 'paragraph',
|
|
100
|
+
html: 'Dans le monde du <strong>d\u00e9veloppement frontend</strong> et du <strong>design UI/UX</strong>, la gestion des couleurs est une t\u00e2che constante. Notre <strong>convertisseur de couleur en ligne</strong> vous permet de transformer des valeurs entre <strong>HEX, RGB et HSL</strong> instantan\u00e9ment.',
|
|
101
|
+
},
|
|
102
|
+
{ type: 'title', text: 'Formats de Couleur: HEX, RGB et HSL', level: 3 },
|
|
103
|
+
{
|
|
104
|
+
type: 'list',
|
|
105
|
+
items: [
|
|
106
|
+
'<strong>HEX (Hexad\u00e9cimal):</strong> Le standard de facto pour CSS. Compact et facile \u00e0 partager dans le code.',
|
|
107
|
+
'<strong>RGB (Rouge, Vert, Bleu):</strong> Bas\u00e9 sur le syst\u00e8me additif de lumi\u00e8re. Id\u00e9al pour manipuler les canaux directement ou appliquer la transparence avec RGBA.',
|
|
108
|
+
'<strong>HSL (Teinte, Saturation, Luminosit\u00e9):</strong> Le format le plus intuitif pour cr\u00e9er des palettes harmonieuses.',
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
{ type: 'title', text: 'Contraste et Accessibilit\u00e9 WCAG', level: 3 },
|
|
112
|
+
{
|
|
113
|
+
type: 'paragraph',
|
|
114
|
+
html: 'La calculatrice inclut une mesure de <strong>contraste relatif</strong> bas\u00e9e sur la luminance. Cela vous aide \u00e0 respecter les directives <strong>WCAG</strong>, assurant que vos textes sont lisibles sur les fonds s\u00e9lectionn\u00e9s.',
|
|
115
|
+
},
|
|
116
|
+
{ type: 'title', text: 'Harmonies de Couleur Automatiques', level: 3 },
|
|
117
|
+
{
|
|
118
|
+
type: 'list',
|
|
119
|
+
items: [
|
|
120
|
+
'<strong>Compl\u00e9mentaire:</strong> La couleur oppos\u00e9e sur la roue chromatique, id\u00e9ale pour un contraste maximum.',
|
|
121
|
+
'<strong>Analogues:</strong> Couleurs adjacentes qui cr\u00e9ent des transitions douces et harmonieuses.',
|
|
122
|
+
'<strong>Triade:</strong> Trois couleurs \u00e9quidistantes pour des compositions vibrantes et \u00e9quilibr\u00e9es.',
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DeveloperToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
+
import ColorConverterComponent from './component.astro';
|
|
3
|
+
import ColorConverterSEO from './seo.astro';
|
|
4
|
+
import ColorConverterBibliography from './bibliography.astro';
|
|
5
|
+
import type { ColorConverterUI } from './ui';
|
|
6
|
+
|
|
7
|
+
export type ColorConverterLocaleContent = ToolLocaleContent<ColorConverterUI>;
|
|
8
|
+
|
|
9
|
+
import { content as es } from './i18n/es';
|
|
10
|
+
import { content as en } from './i18n/en';
|
|
11
|
+
import { content as fr } from './i18n/fr';
|
|
12
|
+
|
|
13
|
+
export const colorConverter: DeveloperToolEntry<ColorConverterUI> = {
|
|
14
|
+
id: 'color-converter',
|
|
15
|
+
icons: {
|
|
16
|
+
bg: 'mdi:palette',
|
|
17
|
+
fg: 'mdi:eyedropper',
|
|
18
|
+
},
|
|
19
|
+
i18n: {
|
|
20
|
+
es: async () => es,
|
|
21
|
+
en: async () => en,
|
|
22
|
+
fr: async () => fr,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { ColorConverterComponent, ColorConverterSEO, ColorConverterBibliography };
|
|
27
|
+
|
|
28
|
+
export const COLOR_CONVERTER_TOOL: ToolDefinition = {
|
|
29
|
+
entry: colorConverter,
|
|
30
|
+
Component: ColorConverterComponent,
|
|
31
|
+
SEOComponent: ColorConverterSEO,
|
|
32
|
+
BibliographyComponent: ColorConverterBibliography,
|
|
33
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { colorConverter } from './index';
|
|
4
|
+
import type { KnownLocale } from '../../types';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
locale?: KnownLocale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { locale = 'es' } = Astro.props;
|
|
11
|
+
const content = await colorConverter.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <SEORenderer content={{ locale, sections: content.seo }} />}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ColorConverterUI extends Record<string, string> {
|
|
2
|
+
labelPreview: string;
|
|
3
|
+
labelHarmonies: string;
|
|
4
|
+
labelR: string;
|
|
5
|
+
labelG: string;
|
|
6
|
+
labelB: string;
|
|
7
|
+
labelComp: string;
|
|
8
|
+
labelAna1: string;
|
|
9
|
+
labelAna2: string;
|
|
10
|
+
labelTri1: string;
|
|
11
|
+
labelTri2: string;
|
|
12
|
+
btnCopy: string;
|
|
13
|
+
btnCopied: string;
|
|
14
|
+
contrastLabel: string;
|
|
15
|
+
clickToCopy: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { conversorExcelCsvHtml } from './index';
|
|
4
|
+
import type { KnownLocale } from '../../types';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
locale?: KnownLocale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { locale = 'es' } = Astro.props;
|
|
11
|
+
const content = await conversorExcelCsvHtml.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <SharedBibliography links={content.bibliography} />}
|