aboutsummaryrefslogtreecommitdiffstats
path: root/src/blind-colour-ciexyz.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-07-12 03:40:51 +0200
committerMattias Andrée <maandree@kth.se>2017-07-12 03:40:51 +0200
commit1fdf6986e7bc23e2bdf4b2b7973652a2cb2dd3b7 (patch)
tree89e8bb27cfcbb121ce59949b6ca2a05ebb27ef1c /src/blind-colour-ciexyz.c
parentAdd blind-get-colours (diff)
downloadblind-1fdf6986e7bc23e2bdf4b2b7973652a2cb2dd3b7.tar.gz
blind-1fdf6986e7bc23e2bdf4b2b7973652a2cb2dd3b7.tar.bz2
blind-1fdf6986e7bc23e2bdf4b2b7973652a2cb2dd3b7.tar.xz
Add blind-apply-palette and blind-colour-ciexyz always outputs all three parameters
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/blind-colour-ciexyz.c')
-rw-r--r--src/blind-colour-ciexyz.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/blind-colour-ciexyz.c b/src/blind-colour-ciexyz.c
index 763cae8..64f48c5 100644
--- a/src/blind-colour-ciexyz.c
+++ b/src/blind-colour-ciexyz.c
@@ -6,14 +6,20 @@ USAGE("(X Y Z | Y)")
int
main(int argc, char *argv[])
{
+ double X, Y, Z;
+
UNOFLAGS(0);
- if (argc == 1)
- printf("%s\n", argv[0]);
- else if (argc == 3)
+ if (argc == 1) {
+ Y = etolf_arg("the Y value", argv[0]);
+ X = Y * D65_XYZ_X;
+ Z = Y * D65_XYZ_Z;
+ printf("%lf %lf %lf\n", X, Y, Z);
+ } else if (argc == 3) {
printf("%s %s %s\n", argv[0], argv[1], argv[2]);
- else
+ } else {
usage();
+ }
efshut(stdout, "<stdout>");
return 0;