JP4188159B2 - Color scheme program - Google Patents

Color scheme program Download PDF

Info

Publication number
JP4188159B2
JP4188159B2 JP2003199661A JP2003199661A JP4188159B2 JP 4188159 B2 JP4188159 B2 JP 4188159B2 JP 2003199661 A JP2003199661 A JP 2003199661A JP 2003199661 A JP2003199661 A JP 2003199661A JP 4188159 B2 JP4188159 B2 JP 4188159B2
Authority
JP
Japan
Prior art keywords
color
additional
color data
data
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003199661A
Other languages
Japanese (ja)
Other versions
JP2005043942A (en
Inventor
高志 山内
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2003199661A priority Critical patent/JP4188159B2/en
Publication of JP2005043942A publication Critical patent/JP2005043942A/en
Application granted granted Critical
Publication of JP4188159B2 publication Critical patent/JP4188159B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Color Image Communication Systems (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、配色済みの色に、新たに色を追加する場合に、配色済みの色と見分けがつきやすい色を選択する配色プログラムに関するものである。
【0002】
【従来の技術】
従来、複数のオブジェクトを表示したグラフ等において、それぞれのオブジェクトがどれであるかを容易に把握する方法として、オブジェクトごとに色を割り当てて、各オブジェクトをその色で表示し、色の違いによって把握しやすくする方法がある。
【0003】
ところが、このような方法では、表示するオブジェクトの数が増えてくると、割り当てる色が増えてきて、新しく割り当てた色が配色済みの色の類似色となり、区別が付きにくくなってきてしまう。
【0004】
このため、図12に示すような色間を均等に配置する印刷装置がある(例えば、特許文献1参照)。この印刷装置は、印刷すべき色の数を指定する色指定手段と、印刷色を各色の色間の距離が均等になるように印刷色を決定する印刷色決定手段と、を備えたものである。
【0005】
この従来の印刷装置の印刷動作のフローチャートを、図13に示し、説明する。従来の印刷装置において、ユーザーによる色の数の指定が行われ、ホストコンピュータ1等より色数指定データが送られてくるとステップ5よりステップ6に進み、指定色数で全体を分割し、各指定色の距離を等距離とする。そして続くステップ7で印刷色を決定する。このようにして印刷色を決定し、ホストコンピュータ1よりの印刷指示があれば、印刷処理を実行する。
【0006】
このように、従来の印刷装置による配色方法は、全ての色を配色し直して、全ての色同士の差異を均等にしようとするものである。
【0007】
【特許文献1】
特開平04−72867号公報
【0008】
【発明が解決しようとする課題】
しかしながら、従来の印刷装置の配色方法では、全ての色が配色し直されてしまうため、配色済みの色をそのまま残して追加分のみの色を追加することができないという問題があった。
【0009】
そこで、本発明は、配色済みの色をそのまま残して、追加分の色のみを配色し、配色済みの色との識別も容易に行うことができる配色プログラムを提供することを課題とする。
【0010】
【課題を解決するための手段】
本発明の配色プログラムは、上記課題を解決するため、すでに配色された色を数値化した使用色データを入力する使用色入力ステップと、前記使用色データを値の順に整列する色値順整列ステップと、前記整列にしたがって隣り合う使用色データ同士の色差分値を全て算出する色差分値算出ステップと、前記色差分値が最大値となる最大色幅の位置を算出する最大色幅算出ステップと、前記最大色幅の間にあたる値を求め、追加色データを算出する追加色データ算出ステップと、前記算出された追加色データを前記配色された色に追加する色の色データ値として出力する追加色データ出力ステップと、を備えたことを特徴とするものである。
【0011】
これにより、配色済みの色の中で最も色同士の差異がある2つの色が選択され、この2色の間の色が追加する色として選択されるので、配色済みの色をそのままにして、配色済みの色と見分けのつきやすい色を追加色として選択することができることとなる。
【0012】
また、本発明の配色プログラムは、上記課題を解決するため、前記最大色幅算出ステップが、前記最大色幅の起点となる前記使用色データの値を算出し、前記追加色データ算出ステップが、前記最大色幅の起点となる使用色データの値に前記最大色幅の値の約1/2を加算したものを前記追加色データとすることを特徴とするものである。
【0013】
これにより、配色済みの色の中で最も色同士の差異がある2つの色の真ん中の色が追加する色として選択されるので、配色済みの色をそのままにして、最も既存の色との差異が大きい色を追加色として選択することができることとなる。
【0014】
また、本発明の配色プログラムは、上記課題を解決するため、前記色差分値算出ステップが、前記整列された使用色データの最大値と最小値との色差分値も色の差分に適した補正を行って算出することを特徴とするものである。
【0015】
これにより、整列された使用色データの最大値と最小値との色差分値も適正な補正を行って算出するので、色相環であらわされるような巡回状のデータであっても、全ての隣り合うデータについて色差分値を求めることができ、全ての配色済みのデータを対象にして最も識別しやすい追加色を選択することができることとなる。
【0016】
さらに、本発明の配色プログラムは、上記課題を解決するため、前記色値順整列ステップ、前記色差分値算出ステップ、前記最大色幅算出ステップおよび前記追加色データ算出ステップが取り扱う前記使用色データおよび前記追加色データは、色相をあらわすデータであることを特徴とするものである。
【0017】
これにより、追加色の決定においては色相を用いて決めるので、人間の識別能力が高い判断基準で追加色を決定することができ、決められる追加色を配色済みの色と最も識別を行いやすくすることができることとなる。
【0018】
さらに、本発明の配色プログラムは、上記課題を解決するため、前記使用色データのデータ形式を変換する使用色データ形式変換ステップと、前記追加色データのデータ形式を変換する追加色データ形式変換ステップと、を備え、
【0019】
前記使用色入力ステップが、RGB方式で数値化された前記使用色データを入力し、前記使用色データ形式変換ステップが、前記入力したRGB方式で数値化された使用色データをHSB方式で数値化した使用色データに変換し、前記色値順整列ステップが、前記HSB方式で数値化された使用色データの値の順に整列し、前記追加色データ算出ステップが、前記HSB方式で数値化した前記追加色データを算出し、前記追加色データ形式変換ステップが、前記算出した前記HSB方式で数値化された追加色データをRGB方式で数値化した追加色データに変換し、前記追加色データ出力ステップが、前記変換されたRGB方式で数値化された追加色データを出力することを特徴とするものである。
【0020】
これにより、データの入出力をRGB形式のデータで行い、追加色の決定をHSB形式のデータで行うので、多くのコンピュータ等で用いられるRGB方式でデータ入出力は行うことができるとともに、実際の追加色決定は識別しやすいHSB方式を用いることができ、データの取り扱いは一般的なデータで行いつつ、識別能力の高い追加色を決定することができることとなる。
【0021】
また、本発明の配色プログラムは、上記課題を解決するため、すでに配色された色に加え追加する色の色数を入力する追加色数入力ステップと、前記算出した追加色データを前記色値順整列ステップが整列する前記使用色データとして追加する使用色データ更新ステップと、前記使用色データ更新ステップ、前記色値順整列ステップ、前記色差分値算出ステップ、前記最大色幅算出ステップおよび前記追加色データ算出ステップを、前記追加する色の全ての追加色データが算出されるまで繰り返すデータ算出繰り返しステップと、を備え、前記追加色データ出力ステップが、前記算出された全ての追加色データを追加する色の色データ値として出力することを特徴とするものである。
【0022】
これにより、追加する色数を入力し、この追加色数分の追加色を決定するので、複数の色を追加する場合であっても、追加する色の数を入力するだけで簡単に複数の追加色を決定することができることとなる。
【0023】
【発明の実施の形態】
以下、本発明の実施の形態について添付図面を参照しつつ説明する。
【0024】
本発明に係る配色プログラムを実現するオブジェクト追加システムの構成図を、図1に示す。図1に示すように、オブジェクト追加システム100は、入力部110、出入力管理部120、追加色決定待ち受け部130、追加色相決定部140および出力部150を備えている。
【0025】
入力部110は、マウス、キーボード等の端末装置、あるいは、外部プログラム等であって、オブジェクトの追加を出入力管理部120に伝達するものである。このオブジェクト追加指定は、各端末装置からの直接命令であっても、外部プログラムからのオブジェクト追加指示であっても構わない。
【0026】
出入力管理部120は、入力部110からオブジェクトの追加指定を受け取り、追加色決定待ち受け部130に前記オブジェクトの追加色選択の依頼を行い、追加色データを受け取って、出力部150に対してこの追加色で追加オブジェクト表示指示を行うものである。
【0027】
追加色決定待ち受け部130は、出入力管理部120からの追加色選択依頼に基づいて、追加色を決定し、出入力管理部120に追加色データを出力するものである。また、追加色決定待ち受け部130は、追加色相の決定を追加色相決定部140に委ね、追加色相決定部140に使用済み色相データを送り、追加色相決定部140で決定した追加色相データを受け取るものである。
【0028】
追加色相決定部140は、追加色決定待ち受け部130から使用済み色相データを受け取り、使用している色相と区別しやすい色相である追加色相を決定し、追加色相データを返すものである。
【0029】
出力部150は、モニタや印刷装置等であり、出入力管理部120から追加色の決まった追加オブジェクト表示指示を受け、決定した追加色で追加オブジェクトを出力するものである。
【0030】
本発明に係る配色プログラムは、追加色決定待ち受け部130および追加色相決定部140によって実行される。
【0031】
このようなオブジェクト追加システム100において、図2に示すような3つのオブジェクトが、それぞれ、赤、青緑、緑でグラフ表示されており、新たにオブジェクトを追加する場合を考える。
【0032】
ここで、オブジェクト追加指示を行うと、図3に示すようなオブジェクト追加指示画面が表示される。
【0033】
オブジェクト追加指示画面では、画面左側にオブジェクトの一覧が表示され、選択済みのオブジェクトにチェックが入っている。また、ここで、追加するオブジェクトをユーザーがチェックする。ここでは、オブジェクト1からオブジェクト3がチェックされており、ユーザーが新たにオブジェクト5を追加チェックした表示となっている。
【0034】
また、オブジェクト追加指示画面の右側には、オブジェクトの追加に伴ってそれぞれの配色をどうするかの選択を行うようになっている。「自分で選択する」とは、ユーザーが自分で色を指定して選択する場合であり、「全体を配色しなおす」とは、すでに使われている色を無視して、追加したオブジェクトを含め全てのオブジェクトの色を変更するものである。「デフォルトの色を使う」とは、すでに配色済みのオブジェクトの色はそのままにして、追加オブジェクトに対してだけ新たに内部処理により決定される色を使うものであり、この場合が本発明の主旨である。
【0035】
以下、上記オブジェクト追加指示画面で、「デフォルトの色を使う」を選択した場合について、説明する。
【0036】
図4に、オブジェクト追加システムの各部間におけるデータの流れを示し、説明する。
【0037】
入力部110から追加オブジェクト指定がなされると、出入力管理部120に追加オブジェクト表示依頼が行われる。
【0038】
出入力管理部120では、入力部110から入力した追加オブジェクト表示依頼により、追加オブジェクトデータ作成が開始される。追加オブジェクトデータ作成では、出入力管理部120から追加色決定待ち受け部130および追加色相決定部140に対して、使用済みの色データとともに追加色データ要求が出される。
【0039】
追加色決定待ち受け部130および追加色相決定部140では、追加色データ要求が出入力管理部120から出されると、追加色決定処理を行い、追加色を決定し、決定した追加色データを出入力管理部120に応答する。
【0040】
出入力管理部120では、追加色決定待ち受け部130および追加色相決定部140から追加色データの応答があったら、追加オブジェクトデータが完成し、出力部150に追加オブジェクト表示依頼を行う。
【0041】
出力部150では、出入力管理部120から追加オブジェクト表示依頼を受け取り、追加オブジェクトを決定された追加色で表示する。
【0042】
このようなオブジェクト追加システム100において、本発明の配色処理を行う追加色決定待ち受け部130における追加色決定処理を図5に示し、説明する。
【0043】
図5に示すように、追加色決定待ち受け部130では、出入力管理部120から追加色データ要求を受け取ることにより、配色処理の追加色決定処理が開始される。また、この追加色データ要求の際には、追加を行う色の数である追加色数(N)と、すでに使用している色のデータである使用色データ(A[i])と、を受け取る。
【0044】
ここで、使用色データ(A[i])は、RGB方式によりデータ化されたデータとする。RGB方式とは、「赤(R:Red)」、「緑(G:Green)」、「青(B:Blue)」の光の三原色の混合比によって色を指定する方法である。ここでは、それぞれの値は、“0”から“255”までの範囲で1刻みに変化させることができるものとする。RGB方式は、現在の多くのパソコンで使用されており、値の“0”から“255”までは、16進数でいうと“00”から“FF”までである。
【0045】
したがって、(R,G,B)は、(0,0,0)から(255,255,255)までの整数値となる。また、iは、使用色データの何番目のデータであるかを示すパラメータであり、1≦i≦“使用色数”である。
【0046】
追加色決定待ち受け部130では、まず、出入力管理部120から追加色データ要求を受け取り、追加色決定処理が開始されると、「使用色数」と「決定済み色数」との和である使用済み色数を示すパラメータ:Mに上記“使用色数”を代入する(s110)。続いて、追加色数の何番目のデータであるかを示すパラメータ:kに“0”を代入する(s111)。次に、受け取った使用色データ(A[i])をRGB方式のデータからHSB方式のデータ(A’[i])に変換する(s112)。
【0047】
HSB方式(HSV方式ということもある)とは、色を「色相(H:Hue)」、「彩度(S:Saturation)」、「明度(B:BrightnessまたはV:Value)」の3つの要素によってあらわすものである。
【0048】
色相とは、色合い、色の種類をあらわすものであり、これによって色を分類することができる。可視光線の中で、最も長いものは赤であり、短くなるにしたがって橙、黄、緑、青となり、最も短いものが紫である。この赤、橙、黄、緑、青、紫に、赤紫を追加し、環状に配したものを、色相環という。
【0049】
図6に、色相環を主な12色の色名とともに示す。環になっていることからも分かるように、色相は、赤を基準に“0”から“360”度までの間で変化させることができる。
【0050】
また、彩度とは、色の鮮やかさのことで、色味が増すほどこの値が高くなる。また、明度とは、色の明るさのことで、黒が最小の値をとる。これらの値は、0から100%までの間で変化させることができる。
【0051】
したがって、(H,S,B)は、(0,0,0)から(359,100,100)までの整数値とする。色相の“360”は“0”となる。また、彩度および明度の値を低くすると、黒っぽくなってしまい、色の区別が付きにくくなるので、本実施の形態では、彩度および明度をともに“100”としたデータとする。逆に言えば、色相が色の識別を最も行いやすいので、色相を変化させることにより、追加色の選択を行うようにした。
【0052】
追加色決定処理の動作説明に戻り、RGB方式のデータ(A[i])からHSB方式のデータ(A’[i])の変換(s112)の後、パラメータkを“1”加算する(s121)。
【0053】
次に、HSB方式の使用色データ(A’[i])の色相(H)部分のみを抽出し、整列して、使用済み色相データ(B[i])を作成する(s122)。
【0054】
使用済み色相データ(B[i])が作成できたら、このB[i]とともに、追加色相決定部140に追加色相要求を出す。
【0055】
この追加色相要求に対して、追加色相決定部140において、追加色相決定処理を行い、追加色相の値(C)が求められ、追加色相応答が返される。この追加色相決定部140における追加色相決定処理については、後述する。
【0056】
追加色相要求に対して、追加色相決定部140から、追加色相応答として、追加色相の値(C)が返されたら、追加色データ(HSB)の格納処理を行う(s123)。この追加色データ格納処理では、HSB方式のデータの値をとる追加色データ(D’[k])に、追加色相決定部140で求められた追加色相の値(C)と、明度、彩度の値を“100”とした(C,100,100)を代入する。
【0057】
次に、パラメータkが追加色数(N)と等しくなったか否かを判定する(s124)。パラメータkが、追加色数(N)未満であれば、使用済み色数(M)を“1”加算し(s125)、上記追加色データ(D’[k])を、使用色データとして、(A’[M])に格納する。そして、パラメータkのインクリメント処理(s121)に戻り、上記処理を繰り返す。
【0058】
パラメータkと追加色数(N)との比較(s124)において、パラメータkが、追加色数(N)以上に(Nと等しく)なったときには、HSBからRGBへの変換処理(s131)を行う。RGBへの変換処理では、上記処理で求めたHSB方式の追加色データ(D’[j](1≦j≦N))を、RGB方式の追加色データ(D[j](1≦j≦N))へ変換する。
【0059】
以上の処理により、追加色決定待ち受け部130における追加色決定処理が終了し、追加色データ(D[j](1≦j≦N))が求められ、追加色決定待ち受け部130から出入力管理部120に、追加色データ(D[j])とともに、追加色データ応答が返される。
【0060】
次に、追加色相決定部140における追加色相決定処理を図7に示し、説明する。
【0061】
追加色相決定部140では、追加色決定待ち受け部130から追加色相要求を受け、追加色相決定処理を開始する。追加色相決定部140は、追加色決定待ち受け部130から追加色相要求とともに、使用済み色相データ(B[i](1≦i≦M:Mは「使用済み色数」=「使用色数」+「決定した追加色相数」))を受ける。
【0062】
まず、追加色相決定処理を開始すると、色相差分計算処理を行う(s210)。この色相差分計算処理では、色相環上で隣り合う使用色データ同士の色差分値を全て算出する。具体的には、使用済み色相データのi番目のデータ(B[i])とi+1番目のデータ(B[i+1])との差分値を色相差分値(S[i])に格納する(S[i]←B[i+1]−B[i])。また、色相差分値(S[i])の最後の値(S[M])は、B[i]の最後の値B[M]と、B[i]の最初の値B[1]と、の差であるので、B[1]に“360”を加えた値と、B[M]との差をとる(S[M]←360+B[1]−B[M])。
【0063】
続いて、色相差分値の何番目のデータであるかを示すパラメータ:mに“0”を代入し、色相差分値の最大値を格納するパラメータ:nに“0”を代入する(s211)。
【0064】
次に、パラメータmを“1”加算し(s221)、色相差分値の最大値(n)と、m番目の色相差分値(S[m])と、を比較する(s222)。ここで、m番目の色相差分値(S[m])が色相差分値の最大値(n)より大きければ、ここの色幅が現時点での最大色相幅にあたるので、色相差分値の最大値(n)に、m番目の色相差分値(S[m])を代入し、その最大色相幅の起点をあらわすパラメータ:pにmを代入する(s223)。色相差分値の最大値(n)と、m番目の色相差分値(S[m])と、の比較(s222)で、m番目の色相差分値(S[m])が色相差分値の最大値(n)より大きくなければ、何もせずに次の処理に移る。
【0065】
次に、パラメータmと、使用済み色数(M)と、を比較する(s224)。パラメータmが、使用済み色数(M)より小さければ、パラメータmのインクリメント処理(s221)に戻り、上記色相幅の比較処理を繰り返し、パラメータmが、使用済み色数(M)以上に(と等しく)なったら、次に処理に移る。
【0066】
次に、最大色幅の値(n)が偶数か否かを判定し(s231)、偶数でなければ、次に処理のために、最大色幅の値(n)に“1”を加算して偶数にする(s232)。
【0067】
次に、最大色幅の中点の算出処理を行い、追加色相の値(C)とする(s233)。最大色幅の中点の算出処理では、最大色幅の基点となる値(B[p])に、上記偶数にした最大色幅の値(n)の1/2を加算して、最大色幅の中点を算出し、追加色相の値(C:C←B[p]+n/2)とする。
【0068】
以上の処理により、追加色相決定部140における追加色相決定処理が終了し、追加色相の値(C)が求められ、追加色相決定部140から追加色決定待ち受け部130に、追加色相の値(C)とともに、追加色相応答が返される。
【0069】
以下に、上記追加色決定待ち受け部130および追加色相決定部140における追加色決定処理について、具体例で説明する。
【0070】
ここでは、前述のように、オブジェクト1が赤、オブジェクト2が青緑、オブジェクト3が緑で、すでに指定されたグラフが描かれていて、これに追加するオブジェクト5のグラフの色を決定する。
【0071】
ユーザーの追加指示により、追加色決定待ち受け部130では、出入力管理部120から追加色データ要求を受け取り、追加色決定処理が開始される。また、追加色データ要求にともなって、追加色数(N)およびRGBの使用色データ(A[i])を受け取る。
【0072】
追加色数(N)は、オブジェクト5のみの追加なので、N=1であり、使用色データ(A[i])は赤、青緑、緑なので、
A[1]=(255, 0, 0)、
A[2]=( 0,255,255)、
A[3]=( 0,255, 0)
となる。
【0073】
追加色決定待ち受け部130では、上記データを受け取ると、追加色決定処理が開始され、使用済み色数(M)に使用色数“3”を代入する(s110)。続いて、パラメータ:kに“0”を代入する(s111)。次に、受け取った上記使用色データ(A[i])をRGB方式のデータからHSB方式のデータ(A’[i])に変換する(s112)。
【0074】
RGB方式のデータからHSB方式のデータへの変換(s112)により、
A[1]=(255,0,0) →A’[1]=(0,100,100)
A[2]=(0,255,255)→A’[2]=(180,100,100)
A[3]=(0,255,0) →A’[3]=(120,100,100)
に、変換される。
【0075】
次に、パラメータ:kを“1”加算し(s121)、k=1とし、使用色データ(A’[i])の色相(H)部分のみの抽出により、それぞれ“0”,“180”,“120”を抽出し、整列により使用済み色相データ(B[i])を作成する(s122)。この整列処理により、
B[1]=(0)
B[2]=(120)
B[3]=(180)
が作成される。
【0076】
上記HSB変換、色相抽出、整列処理によるデータの変換を、図8に示す。
【0077】
使用済み色相データ(B[i](1≦i≦3))が作成できたら、このB[i]とともに、追加色相決定部140に追加色相要求を出す。
【0078】
追加色相決定部140では、追加色決定待ち受け部130から追加色相要求を受け、追加色相決定処理を開始する。追加色相決定部140は、追加色決定待ち受け部130から追加色相要求とともに、上記使用済み色相データ(B[i](1≦i≦3))を受ける。
【0079】
追加色相決定処理を開始すると、色相差分計算処理(s210)により、色相差分値(S[i])を計算する。この色相差分計算処理(s210)により、
S[1]= B[2]−B[1]= 120− 0=120
S[2]= B[3]−B[2]= 180−120= 60
S[3]=360+B[1]−B[3]=360+0−180=180
が、算出される。
【0080】
続いて、パラメータmに“0”を、色相差分値の最大値を格納するパラメータnに“0”を代入する(s211)。
【0081】
次に、パラメータmを“1”加算し、m=1とする(s221)。続いて、色相差分値の最大値n=0と、色相差分値S[1]=120と、を比較する(s222)。ここでは、色相差分値S[1]の方が大きいので、色相差分値の最大値nに、色相差分値S[1]=120を代入し、その起点pに“1”を代入する(s223)。
【0082】
次に、パラメータm=1と、使用済み色数M=3と、を比較し(s224)、パラメータmの方が小さいので、パラメータmのインクリメント処理に戻り、パラメータmを“1”加算し、m=2とする(s221)。続いて、色相差分値の最大値n=120と、色相差分値S[2]=60と、を比較する(s222)。ここでは、色相差分値S[2]の方が小さいので、何もせずに次の処理に移る。
【0083】
次に、パラメータm=2と、使用済み色数M=3と、を比較し(s224)、パラメータmの方が小さいので、パラメータmのインクリメント処理に戻り、パラメータmを“1”加算し、m=3とする(s221)。続いて、色相差分値の最大値n=120と、色相差分値S[3]=180と、を比較する(s222)。ここでは、色相差分値S[3]の方が大きいので、色相差分値の最大値nに、色相差分値S[3]=180を代入し、その起点pに“3”を代入する(s223)。
【0084】
次に、パラメータm=3と、使用済み色数M=3と、を比較し(s224)、パラメータmと使用済み色数Mとが等しくなったので、次に移行し、nが偶数か否かを判断する(s231)。n=180は偶数なので、次に、最大色幅の中点の算出処理を行い、追加色相の値(C)に代入する(s233)。この最大色幅中点算出処理(s233)により、
C=B[p]+n/2=B[3]+180/2=180+180/2=270
が算出される。
【0085】
上記色相差分計算、最大色幅選択、最大色幅の中点算出処理によるデータ算出を、図9に示す。
【0086】
以上の処理により、追加色相決定部140における追加色相決定処理が終了し、追加色相の値C=270が求められ、追加色相決定部140から追加色決定待ち受け部130に、追加色相の値C=270とともに、追加色相応答が返される。
【0087】
追加色決定待ち受け部130では、追加色相要求に対して、追加色相決定部140から追加色相応答が、追加色相の値C=270として返されると、追加色データ(HSB)の格納処理を行う(s123)。この追加色データ格納処理により、追加色データD’[1]に、(C,100,100)=(270,100,100)が代入される。
【0088】
次に、パラメータk=1と、追加色数N=1と、の比較が行われ(s124)、等しいので、HSBからRGBへの変換処理(s131)を行う。
【0089】
追加色数Nが複数の場合には、使用済み色数Mを“1”加算し(s125)、追加色データD’[k]を、使用色データとして、A’[M]に代入する(s126)。そして、パラメータkのインクリメント処理(s121)に戻り、上記追加色相決定処理を繰り返す。
【0090】
RGBへの変換処理(s131)では、上記処理で求めたHSB方式の追加色データD’[1]を、RGB方式の追加色データD[1]に変換する。この変換により、
D’[1]=(270,100,100)→D[1]=(130,0,255)
となる。
【0091】
上記RGB変換処理によるデータの変換を、図10に示す。
【0092】
以上の処理により、追加色決定待ち受け部130および追加色相決定部140における追加色決定処理が終了し、追加色データD[1]=(130,0,255)が求められ、追加色決定待ち受け部130から出入力管理部120に、追加色データ応答として、追加色データD[1]=(130,0,255)が返される。
【0093】
出入力管理部120では、追加色決定待ち受け部130から追加色データD[1]=(130,0,255)を受け取り、追加されたオブジェクト=オブジェクト5のグラフを描画し、追加色データD[1]=(130,0,255)=“青紫”で追加オブジェクトを表示するように、出力部150に命令する。出力部150では、この命令に従い、オブジェクト5のグラフを“青紫”で描画する。このオブジェクトの追加が行われた表示画面例を、図11に示す。
【0094】
以上のように、本発明によれば、既存の指定された色を残したままで、新たに追加するオブジェクトの色を、既存の色と識別が付きやすい色を選択することができ、追加分が分かりやすくかつ元のデータとの識別も容易に行うことができる。
【0095】
さらに、本発明に関して以下を付記する。
【0096】
(付記1)
すでに配色された色を数値化した使用色データを入力する使用色入力ステップと、
前記使用色データを値の順に整列する色値順整列ステップと、
前記整列にしたがって隣り合う使用色データ同士の色差分値を全て算出する色差分値算出ステップと、
前記色差分値が最大値となる最大色幅の位置を算出する最大色幅算出ステップと、
前記最大色幅の間にあたる値を求め、追加色データを算出する追加色データ算出ステップと、
前記算出された追加色データを前記配色された色に追加する色の色データ値として出力する追加色データ出力ステップと、
を備えたことを特徴とする配色プログラム。
【0097】
(付記2)
付記1に記載の配色プログラムにおいて、
前記最大色幅算出ステップが、前記最大色幅の起点となる前記使用色データの値を算出し、
前記追加色データ算出ステップが、前記最大色幅の起点となる使用色データの値に前記最大色幅の値の約1/2を加算したものを前記追加色データとすることを特徴とする配色プログラム。
【0098】
(付記3)
付記1または付記2に記載の配色プログラムにおいて、
前記色差分値算出ステップが、前記整列された使用色データの最大値と最小値との色差分値も色の差分に適した補正を行って算出することを特徴とする配色プログラム。
【0099】
(付記4)
付記3に記載の配色プログラムにおいて、
前記色値順整列ステップ、前記色差分値算出ステップ、前記最大色幅算出ステップおよび前記追加色データ算出ステップが取り扱う前記使用色データおよび前記追加色データは、色相をあらわすデータであることを特徴とする配色プログラム。
【0100】
(付記5)
付記4に記載の配色プログラムにおいて、
前記使用色データのデータ形式を変換する使用色データ形式変換ステップと、
前記追加色データのデータ形式を変換する追加色データ形式変換ステップと、を備え、
前記使用色入力ステップが、RGB方式で数値化された前記使用色データを入力し、
前記使用色データ形式変換ステップが、前記使用色入力ステップで入力したRGB方式で数値化された使用色データを、HSB方式で数値化した使用色データに変換し、
前記色値順整列ステップが、前記HSB方式で数値化された使用色データの値の順に整列し、
前記追加色データ算出ステップが、前記HSB方式で数値化した前記追加色データを算出し、
前記追加色データ形式変換ステップが、前記追加色データ算出ステップで算出した前記HSB方式で数値化された追加色データを、RGB方式で数値化した追加色データに変換し、
前記追加色データ出力ステップが、前記追加色データ形式変換ステップで変換されたRGB方式で数値化された追加色データを出力することを特徴とする配色プログラム。
【0101】
(付記6)
付記1から付記5のいずれか1項に記載の配色プログラムにおいて、
すでに配色された色に加え追加する色の色数を入力する追加色数入力ステップと、
前記追加色データ算出ステップで算出した追加色データを、前記色値順整列ステップが整列する前記使用色データとして追加する使用色データ更新ステップと、
前記使用色データ更新ステップ、前記色値順整列ステップ、前記色差分値算出ステップ、前記最大色幅算出ステップおよび前記追加色データ算出ステップを、前記追加する色の全ての追加色データが算出されるまで繰り返すデータ算出繰り返しステップと、を備え、
前記追加色データ出力ステップが、前記算出された全ての追加色データを追加する色の色データ値として出力することを特徴とする配色プログラム。
【0102】
【発明の効果】
本発明によれば、すでに配色された色を数値化した使用色データを入力し、前記使用色データを値の順に整列し、前記整列にしたがって隣り合う使用色データ同士の色差分値を全て算出し、前記色差分値が最大値となる最大色幅の間にあたる値を求め、追加色データを算出し、追加する色の色データ値として出力するので、配色済みの色の中で最も色同士の差異がある2つの色が選択され、この2色の間の色が追加する色として選択することができ、配色済みの色をそのままにして、配色済みの色と見分けのつきやすい色を追加色として選択することができる。
【0103】
また、本発明によれば、前記最大色幅の起点となる前記使用色データの値を算出し、前記最大色幅の起点となる使用色データの値に前記最大色幅の値の約1/2を加算したものを前記追加色データとするので、配色済みの色の中で最も色同士の差異がある2つの色の真ん中の色が追加する色として選択することができ、配色済みの色をそのままにして、最も既存の色との差異が大きい色を追加色として選択することができる。
【0104】
また、本発明によれば、整列された使用色データの最大値と最小値との色差分値も適正な補正を行って算出するので、色相環であらわされるような巡回状のデータであっても、全ての隣り合うデータについて色差分値を求めることができ、全ての配色済みのデータを対象にして最も識別しやすい追加色を選択することができる。
【0105】
さらに、本発明によれば、追加色の決定においては色相を用いて決めるので、人間の識別能力が高い判断基準で追加色を決定することができ、決められる追加色を配色済みの色と最も識別を行いやすくすることができる。
【0106】
さらに、本発明によれば、RGB方式で数値化された前記使用色データを入力し、入力したRGB方式で数値化された使用色データをHSB方式で数値化した使用色データに変換し、前記HSB方式で数値化された使用色データの値の順に整列し、前記HSB方式で数値化した前記追加色データを算出し、前記HSB方式で数値化された追加色データをRGB方式で数値化した追加色データに変換し、RGB方式で数値化された追加色データを出力するので、データの入出力をRGB形式のデータで行い、追加色の決定をHSB形式のデータで行うことができ、データの取り扱いは多くのコンピュータ等で用いられる一般的なデータで行いつつ、実際の追加色決定はHSB方式で識別能力の高い追加色を決定することができる。
【0107】
また、本発明によれば、追加する色数を入力し、この追加色数分の処理を繰り返し、追加色を決定するので、複数の色を追加する場合であっても、追加する色の数を入力するだけで簡単に複数の追加色を決定することができる。
【図面の簡単な説明】
【図1】本発明に係る配色プログラムを実現するオブジェクト追加システムを示す構成図である。
【図2】オブジェクト追加前の表示画面例である。
【図3】オブジェクト追加指示画面例である。
【図4】オブジェクト追加システムの各部間におけるデータの流れを示す図である。
【図5】追加色決定待ち受け部における追加色決定処理を示すフローチャートである。
【図6】色相環と主な色名を示す図である。
【図7】追加色相決定部における追加色相決定処理を示すフローチャートである。
【図8】HSB変換、色相抽出、整列処理によるデータ変換を示す図である。
【図9】色相差分計算、最大色幅選択、最大色幅の中点算出処理によるデータ算出を示す図である。
【図10】RGB変換処理によるデータの変換を示す図である。
【図11】オブジェクト追加後の表示画面例である。
【図12】従来の印刷装置を示すブロック構成図である。
【図13】従来の印刷装置の印刷動作を示すフローチャートである。
【符号の説明】
1 ホストコンピュータ
2 受信バッファ
3 プログラムROM
4 CPU
5 出力部
6 RAM
10 多色印刷装置本体
100 オブジェクト追加システム
110 入力部
120 出入力管理部
130 追加色決定待ち受け部
140 追加色相決定部
150 出力部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a color arrangement program that selects a color that is easily distinguishable from a color that has already been colored when a new color is added to the color that has already been colored.
[0002]
[Prior art]
Conventionally, as a method of easily grasping each object in a graph or the like displaying a plurality of objects, a color is assigned to each object, and each object is displayed in that color. There is a way to make it easier.
[0003]
However, in such a method, when the number of objects to be displayed increases, the number of colors to be assigned increases, and the newly assigned color becomes a similar color to the already-arranged color, making it difficult to distinguish.
[0004]
For this reason, there is a printing apparatus that uniformly arranges colors as shown in FIG. 12 (see, for example, Patent Document 1). The printing apparatus includes color specifying means for specifying the number of colors to be printed, and print color determining means for determining the print colors so that the distances between the colors of the print colors are equal. is there.
[0005]
A flowchart of the printing operation of this conventional printing apparatus will be described with reference to FIG. In the conventional printing apparatus, when the number of colors is designated by the user and color number designation data is sent from the host computer 1 or the like, the process proceeds from step 5 to step 6 and the whole is divided by the designated number of colors. The distance of the specified color is the same distance. In the subsequent step 7, the printing color is determined. In this way, the print color is determined, and if there is a print instruction from the host computer 1, print processing is executed.
[0006]
As described above, the color arrangement method by the conventional printing apparatus tries to equalize the difference between all the colors by re-arranging all the colors.
[0007]
[Patent Document 1]
Japanese Patent Laid-Open No. 04-72867
[0008]
[Problems to be solved by the invention]
However, in the conventional color arrangement method of the printing apparatus, all the colors are re-arranged, so that there is a problem that it is not possible to add only the added color while leaving the already-colored colors as they are.
[0009]
SUMMARY OF THE INVENTION An object of the present invention is to provide a color arrangement program that can leave an already-colored color as it is, color only an additional color, and easily distinguish it from the already-colored color.
[0010]
[Means for Solving the Problems]
In order to solve the above problems, a color arrangement program according to the present invention inputs a use color data in which used color data are digitized, and a color value order alignment step in which the use color data is arranged in order of values. And a color difference value calculating step for calculating all color difference values between adjacent use color data according to the alignment, and a maximum color width calculating step for calculating the position of the maximum color width at which the color difference value is a maximum value; An additional color data calculating step for obtaining a value corresponding to the maximum color width and calculating additional color data; and an addition for outputting the calculated additional color data as a color data value of a color to be added to the color arrangement And a color data output step.
[0011]
As a result, the two colors having the most difference between colors are selected from among the already-colored colors, and the color between the two colors is selected as the color to be added. As a result, it is possible to select a color that can be easily distinguished from the already-colored color as an additional color.
[0012]
Further, in order to solve the above problem, the color arrangement program of the present invention calculates the value of the color data used as a starting point of the maximum color width, and the additional color data calculation step includes: The additional color data is obtained by adding about ½ of the value of the maximum color width to the value of the used color data serving as the starting point of the maximum color width.
[0013]
As a result, the middle color of the two colors that have the most color difference among the already-colored colors is selected as the color to be added, so the color difference is the same as the most existing color. A color having a large value can be selected as an additional color.
[0014]
In order to solve the above-described problem, the color difference program according to the present invention is configured such that the color difference value calculating step corrects the color difference value between the maximum value and the minimum value of the arranged use color data suitable for the color difference. It is characterized by calculating by performing.
[0015]
As a result, the color difference value between the maximum value and the minimum value of the arranged use color data is also calculated by performing appropriate correction, so even if the cyclic data is represented by a hue circle, A color difference value can be obtained for the matching data, and an additional color that can be most easily identified can be selected for all the already-colored data.
[0016]
Furthermore, in order to solve the above-described problem, the color arrangement program of the present invention includes the use color data handled by the color value order alignment step, the color difference value calculation step, the maximum color width calculation step, and the additional color data calculation step. The additional color data is data representing a hue.
[0017]
As a result, since the hue is used to determine the additional color, the additional color can be determined based on a judgment criterion with high human identification ability, and the determined additional color can be most easily distinguished from the already-colored color. Will be able to.
[0018]
Furthermore, in order to solve the above-described problem, the color arrangement program of the present invention includes a use color data format conversion step for converting the data format of the use color data, and an additional color data format conversion step for converting the data format of the additional color data. And comprising
[0019]
The used color input step inputs the used color data digitized by the RGB method, and the used color data format conversion step digitizes the inputted used color data digitized by the RGB method by the HSB method. The used color data is converted into the used color data, the color value order arranging step is arranged in the order of the used color data values digitized by the HSB method, and the additional color data calculating step is digitized by the HSB method. Additional color data is calculated, and the additional color data format conversion step converts the calculated additional color data quantified by the HSB method into additional color data quantified by the RGB method, and the additional color data output step. Is characterized in that the additional color data digitized by the converted RGB system is output.
[0020]
As a result, data input / output is performed in RGB format data, and additional colors are determined in HSB format data. Therefore, data input / output can be performed in the RGB system used in many computers and the like. The additional color can be determined by using an HSB method that is easy to identify, and it is possible to determine an additional color with high identification ability while handling data with general data.
[0021]
In order to solve the above problem, the color arrangement program of the present invention includes an additional color number input step of inputting the number of colors to be added in addition to the already arranged colors, and the calculated additional color data in the color value order. A use color data update step to be added as the use color data to be arranged in the alignment step; the use color data update step; the color value order alignment step; the color difference value calculation step; the maximum color width calculation step; A data calculation repeating step for repeating the data calculation step until all the additional color data of the color to be added are calculated, and the additional color data output step adds all the calculated additional color data It outputs as a color data value of a color.
[0022]
As a result, the number of colors to be added is input and the number of additional colors is determined, so even if a plurality of colors are to be added, simply entering the number of colors to be added allows a plurality of colors to be easily added. An additional color can be determined.
[0023]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.
[0024]
FIG. 1 shows a configuration diagram of an object addition system for realizing a color arrangement program according to the present invention. As illustrated in FIG. 1, the object addition system 100 includes an input unit 110, an input / output management unit 120, an additional color determination standby unit 130, an additional hue determination unit 140, and an output unit 150.
[0025]
The input unit 110 is a terminal device such as a mouse or a keyboard, or an external program, and transmits an object addition to the input / output management unit 120. This object addition designation may be a direct instruction from each terminal device or an object addition instruction from an external program.
[0026]
The input / output management unit 120 receives the object addition designation from the input unit 110, requests the additional color determination waiting unit 130 to select the additional color of the object, receives the additional color data, and sends the additional color data to the output unit 150. The additional object display instruction is performed with the additional color.
[0027]
The additional color determination standby unit 130 determines an additional color based on an additional color selection request from the input / output management unit 120 and outputs the additional color data to the input / output management unit 120. The additional color determination waiting unit 130 entrusts the additional hue determination to the additional hue determination unit 140, sends used hue data to the additional hue determination unit 140, and receives the additional hue data determined by the additional hue determination unit 140. It is.
[0028]
The additional hue determination unit 140 receives the used hue data from the additional color determination waiting unit 130, determines an additional hue that is easily distinguishable from the used hue, and returns additional hue data.
[0029]
The output unit 150 is a monitor, a printing apparatus, or the like, and receives an additional object display instruction with an additional color determined from the input / output management unit 120, and outputs an additional object with the determined additional color.
[0030]
The color arrangement program according to the present invention is executed by the additional color determination waiting unit 130 and the additional hue determination unit 140.
[0031]
In such an object addition system 100, three objects as shown in FIG. 2 are displayed as graphs in red, blue-green, and green, respectively, and a case where a new object is added is considered.
[0032]
Here, when an object addition instruction is given, an object addition instruction screen as shown in FIG. 3 is displayed.
[0033]
In the object addition instruction screen, a list of objects is displayed on the left side of the screen, and the selected object is checked. Here, the user checks the object to be added. Here, the objects 1 to 3 are checked, and the user newly checks the addition of the object 5.
[0034]
In addition, on the right side of the object addition instruction screen, the selection of each color scheme with the addition of an object is selected. “Select by yourself” means that the user selects a color by himself, and “Recolor entire” means that the existing color is ignored and the added object is included. It changes the color of all objects. “Use default color” means that a color determined by internal processing is newly used only for an additional object while keeping the color of an already colored object as it is. This case is the gist of the present invention. It is.
[0035]
Hereinafter, a case where “use default color” is selected on the object addition instruction screen will be described.
[0036]
FIG. 4 shows and describes the flow of data between each part of the object addition system.
[0037]
When an additional object is designated from the input unit 110, an additional object display request is made to the input / output management unit 120.
[0038]
In the input / output management unit 120, creation of additional object data is started in response to an additional object display request input from the input unit 110. In creating additional object data, an additional color data request is sent from the input / output management unit 120 to the additional color determination standby unit 130 and the additional hue determination unit 140 together with the used color data.
[0039]
When an additional color data request is issued from the input / output management unit 120, the additional color determination standby unit 130 and the additional hue determination unit 140 perform an additional color determination process, determine additional colors, and input / output the determined additional color data. Responds to the management unit 120.
[0040]
In the input / output management unit 120, when there is a response of additional color data from the additional color determination standby unit 130 and the additional hue determination unit 140, the additional object data is completed, and an additional object display request is made to the output unit 150.
[0041]
The output unit 150 receives an additional object display request from the input / output management unit 120 and displays the additional object in the determined additional color.
[0042]
In such an object addition system 100, the additional color determination processing in the additional color determination waiting unit 130 for performing the color arrangement processing of the present invention is shown in FIG.
[0043]
As shown in FIG. 5, the additional color determination waiting unit 130 receives the additional color data request from the input / output management unit 120 and starts the additional color determination process of the color arrangement process. When this additional color data request is made, the number of additional colors (N) that is the number of colors to be added and the used color data (A [i]) that is already used color data are receive.
[0044]
Here, it is assumed that the use color data (A [i]) is data converted into data by the RGB method. The RGB method is a method of designating a color by a mixing ratio of three primary colors of “red (R: Red)”, “green (G: Green)”, and “blue (B: Blue)”. Here, it is assumed that each value can be changed in increments of “0” to “255”. The RGB method is currently used in many personal computers, and values “0” to “255” are “00” to “FF” in hexadecimal.
[0045]
Therefore, (R, G, B) is an integer value from (0, 0, 0) to (255, 255, 255). Further, i is a parameter indicating the number of used color data, and 1 ≦ i ≦ “number of used colors”.
[0046]
The additional color determination waiting unit 130 first receives an additional color data request from the input / output management unit 120, and when the additional color determination process is started, it is the sum of “number of used colors” and “number of determined colors”. The above-mentioned “number of used colors” is substituted into a parameter: M indicating the number of used colors (s110). Subsequently, “0” is substituted into a parameter: k indicating the number of additional color data (s111). Next, the received use color data (A [i]) is converted from RGB data to HSB data (A ′ [i]) (s112).
[0047]
The HSB method (sometimes referred to as the HSV method) has three colors: “hue (H: Hue)”, “saturation (S: Saturation)”, and “brightness (B: Brightness or V: Value)”. It is what is expressed by.
[0048]
Hue represents the hue and the type of color, and the color can be classified by this. Among visible rays, the longest is red, and as it becomes shorter, it becomes orange, yellow, green, and blue, and the shortest is purple. This red, orange, yellow, green, blue, purple and red purple are added and arranged in a ring shape is called a hue circle.
[0049]
FIG. 6 shows the hue circle together with the names of the main 12 colors. As can be seen from the ring shape, the hue can be changed between “0” and “360” degrees with respect to red.
[0050]
Saturation is the vividness of the color, and this value increases as the color tone increases. The brightness is the brightness of the color, and black takes the minimum value. These values can vary between 0 and 100%.
[0051]
Therefore, (H, S, B) is an integer value from (0, 0, 0) to (359, 100, 100). The hue “360” is “0”. Further, if the values of saturation and brightness are lowered, the color becomes dark and it becomes difficult to distinguish between colors. Therefore, in this embodiment, data with both saturation and brightness set to “100” is used. In other words, since the hue is the easiest to identify the color, the additional color is selected by changing the hue.
[0052]
Returning to the explanation of the operation of the additional color determination process, after conversion of RGB data (A [i]) to HSB data (A ′ [i]) (s112), the parameter k is incremented by “1” (s121). ).
[0053]
Next, only the hue (H) portion of the used color data (A ′ [i]) of the HSB method is extracted and aligned to create used hue data (B [i]) (s122).
[0054]
When the used hue data (B [i]) can be created, an additional hue request is issued to the additional hue determination unit 140 together with this B [i].
[0055]
In response to this additional hue request, the additional hue determination unit 140 performs additional hue determination processing, obtains an additional hue value (C), and returns an additional hue response. The additional hue determination process in the additional hue determination unit 140 will be described later.
[0056]
In response to the additional hue request, when the additional hue value (C) is returned from the additional hue determination unit 140 as an additional hue response, the additional color data (HSB) is stored (s123). In this additional color data storage processing, the additional color data (D ′ [k]) taking the value of the HSB method data is added to the additional hue value (C) obtained by the additional hue determination unit 140, the brightness, and the saturation. (C, 100, 100) is substituted with the value of “100” as “100”.
[0057]
Next, it is determined whether or not the parameter k is equal to the number of additional colors (N) (s124). If the parameter k is less than the number of additional colors (N), “1” is added to the number of used colors (M) (s125), and the additional color data (D ′ [k]) is used as used color data. (A '[M]). Then, the process returns to the parameter k increment process (s121) and the above process is repeated.
[0058]
In the comparison between the parameter k and the number of additional colors (N) (s124), when the parameter k is greater than or equal to the number of additional colors (N) (equal to N), the conversion process from HSB to RGB (s131) is performed. . In the conversion process to RGB, the additional color data (D ′ [j] (1 ≦ j ≦ N)) of the HSB method obtained in the above process is converted into the additional color data (D [j] (1 ≦ j ≦ N) of the RGB method. N)).
[0059]
With the above processing, the additional color determination process in the additional color determination standby unit 130 is completed, additional color data (D [j] (1 ≦ j ≦ N)) is obtained, and input / output management is performed from the additional color determination standby unit 130. The additional color data response is returned to the unit 120 together with the additional color data (D [j]).
[0060]
Next, an additional hue determination process in the additional hue determination unit 140 will be described with reference to FIG.
[0061]
The additional hue determination unit 140 receives an additional hue request from the additional color determination standby unit 130 and starts an additional hue determination process. The additional hue determination unit 140, together with the additional hue request from the additional color determination standby unit 130, uses used hue data (B [i] (1 ≦ i ≦ M: M is “number of used colors” = “number of used colors” + "Determined number of additional hues")).
[0062]
First, when the additional hue determination process is started, a hue difference calculation process is performed (s210). In this hue difference calculation process, all the color difference values between the used color data adjacent on the hue ring are calculated. Specifically, the difference value between the i-th data (B [i]) of the used hue data and the i + 1-th data (B [i + 1]) is stored in the hue difference value (S [i]) (S [I] ← B [i + 1] −B [i]). The last value (S [M]) of the hue difference value (S [i]) is the last value B [M] of B [i] and the first value B [1] of B [i]. , The difference between B [1] and “B [M]” is obtained (S [M] ← 360 + B [1] −B [M]).
[0063]
Subsequently, “0” is substituted for the parameter: m indicating the hue difference value data, and “0” is substituted for the parameter: n for storing the maximum hue difference value (s211).
[0064]
Next, the parameter m is incremented by “1” (s221), and the maximum value (n) of the hue difference value is compared with the m-th hue difference value (S [m]) (s222). Here, if the mth hue difference value (S [m]) is larger than the maximum value (n) of the hue difference value, the color width here corresponds to the current maximum hue width, and therefore the maximum value of the hue difference value ( The mth hue difference value (S [m]) is substituted for n), and m is substituted for the parameter p indicating the starting point of the maximum hue width (s223). In the comparison (s222) between the maximum value (n) of the hue difference values and the mth hue difference value (S [m]), the mth hue difference value (S [m]) is the maximum of the hue difference values. If it is not larger than the value (n), the next processing is performed without doing anything.
[0065]
Next, the parameter m is compared with the number of used colors (M) (s224). If the parameter m is smaller than the number of used colors (M), the process returns to the parameter m increment process (s221), the above hue width comparison process is repeated, and the parameter m exceeds the number of used colors (M) ( If it is equal), the process proceeds to the next step.
[0066]
Next, it is determined whether or not the maximum color width value (n) is an even number (s231). If it is not an even number, “1” is added to the maximum color width value (n) for the next processing. To an even number (s232).
[0067]
Next, the midpoint of the maximum color width is calculated to obtain an additional hue value (C) (s233). In the calculation process of the midpoint of the maximum color width, 1/2 of the maximum color width value (n) set to the even number is added to the value (B [p]) serving as the base point of the maximum color width to obtain the maximum color width. The midpoint of the width is calculated and set as an additional hue value (C: C ← B [p] + n / 2).
[0068]
With the above processing, the additional hue determination process in the additional hue determination unit 140 ends, the additional hue value (C) is obtained, and the additional hue determination unit 140 sends the additional hue value (C ) And an additional hue response is returned.
[0069]
Hereinafter, the additional color determination process in the additional color determination standby unit 130 and the additional hue determination unit 140 will be described with a specific example.
[0070]
Here, as described above, the object 1 is red, the object 2 is blue-green, and the object 3 is green, and an already designated graph is drawn, and the color of the graph of the object 5 to be added is determined.
[0071]
In response to a user's addition instruction, the additional color determination waiting unit 130 receives an additional color data request from the input / output management unit 120 and starts an additional color determination process. In response to the request for additional color data, the number of additional colors (N) and the used color data for RGB (A [i]) are received.
[0072]
Since the number of additional colors (N) is the addition of only the object 5, N = 1, and the use color data (A [i]) is red, blue-green, and green.
A [1] = (255, 0, 0),
A [2] = (0,255,255),
A [3] = (0,255, 0)
It becomes.
[0073]
Upon receipt of the data, the additional color determination waiting unit 130 starts an additional color determination process, and substitutes the number of used colors “3” for the number of used colors (M) (s110). Subsequently, “0” is substituted for the parameter k (s111). Next, the received use color data (A [i]) is converted from RGB data to HSB data (A ′ [i]) (s112).
[0074]
By converting RGB data to HSB data (s112),
A [1] = (255, 0, 0) → A ′ [1] = (0, 100, 100)
A [2] = (0, 255, 255) → A ′ [2] = (180, 100, 100)
A [3] = (0,255,0) → A ′ [3] = (120,100,100)
Is converted to
[0075]
Next, the parameter: k is incremented by “1” (s121), k = 1, and only “0” and “180” are extracted by extracting only the hue (H) portion of the used color data (A ′ [i]). , “120” are extracted, and used hue data (B [i]) is created by alignment (s122). With this alignment process,
B [1] = (0)
B [2] = (120)
B [3] = (180)
Is created.
[0076]
FIG. 8 shows data conversion by the HSB conversion, hue extraction, and alignment processing.
[0077]
When the used hue data (B [i] (1 ≦ i ≦ 3)) can be created, an additional hue request is issued to the additional hue determination unit 140 together with this B [i].
[0078]
The additional hue determination unit 140 receives an additional hue request from the additional color determination standby unit 130 and starts an additional hue determination process. The additional hue determining unit 140 receives the used hue data (B [i] (1 ≦ i ≦ 3)) from the additional color determination waiting unit 130 together with the additional hue request.
[0079]
When the additional hue determination process is started, the hue difference value (S [i]) is calculated by the hue difference calculation process (s210). By this hue difference calculation process (s210),
S [1] = B [2] −B [1] = 120−0 = 120
S [2] = B [3] -B [2] = 180-120 = 60
S [3] = 360 + B [1] -B [3] = 360 + 0-180 = 180
Is calculated.
[0080]
Subsequently, “0” is substituted for the parameter m, and “0” is substituted for the parameter n for storing the maximum hue difference value (s211).
[0081]
Next, the parameter m is incremented by “1” and m = 1 is set (s221). Subsequently, the maximum hue difference value n = 0 is compared with the hue difference value S [1] = 120 (s222). Here, since the hue difference value S [1] is larger, the hue difference value S [1] = 120 is substituted for the maximum value n of the hue difference value, and “1” is substituted for the starting point p (s223). ).
[0082]
Next, the parameter m = 1 is compared with the number of used colors M = 3 (s224). Since the parameter m is smaller, the process returns to the parameter m increment process, and the parameter m is incremented by “1”. m = 2 is set (s221). Subsequently, the maximum value n = 120 of the hue difference value is compared with the hue difference value S [2] = 60 (s222). Here, since the hue difference value S [2] is smaller, the process proceeds to the next process without doing anything.
[0083]
Next, the parameter m = 2 is compared with the number of used colors M = 3 (s224). Since the parameter m is smaller, the process returns to the parameter m increment process, and the parameter m is incremented by “1”. m = 3 is set (s221). Subsequently, the maximum hue difference value n = 120 is compared with the hue difference value S [3] = 180 (s222). Here, since the hue difference value S [3] is larger, the hue difference value S [3] = 180 is substituted for the maximum value n of the hue difference value, and “3” is substituted for the starting point p (s223). ).
[0084]
Next, the parameter m = 3 is compared with the number of used colors M = 3 (s224). Since the parameter m is equal to the number of used colors M, the process proceeds to the next and whether n is an even number or not. Is determined (s231). Since n = 180 is an even number, the midpoint of the maximum color width is calculated and substituted for the additional hue value (C) (s233). By this maximum color width midpoint calculation process (s233),
C = B [p] + n / 2 = B [3] + 180/2 = 180 + 180/2 = 270
Is calculated.
[0085]
FIG. 9 shows data calculation by the hue difference calculation, maximum color width selection, and midpoint calculation processing of the maximum color width.
[0086]
With the above processing, the additional hue determination process in the additional hue determination unit 140 is completed, and an additional hue value C = 270 is obtained. The additional hue determination unit 140 sends the additional hue value C = Along with 270, an additional hue response is returned.
[0087]
When the additional hue response is returned as an additional hue value C = 270 from the additional hue determining section 140 in response to the additional hue request, the additional color determination waiting section 130 performs processing for storing additional color data (HSB) ( s123). By this additional color data storage processing, (C, 100, 100) = (270, 100, 100) is substituted into the additional color data D ′ [1].
[0088]
Next, the parameter k = 1 is compared with the number of additional colors N = 1 (s124). Since they are equal, the HSB to RGB conversion process (s131) is performed.
[0089]
When the number of additional colors N is plural, the used color number M is incremented by “1” (s125), and the additional color data D ′ [k] is substituted into A ′ [M] as used color data ( s126). Then, the process returns to the parameter k increment process (s121), and the additional hue determination process is repeated.
[0090]
In the RGB conversion process (s131), the HSB additional color data D ′ [1] obtained in the above process is converted into RGB additional color data D [1]. This conversion
D ′ [1] = (270, 100, 100) → D [1] = (130, 0, 255)
It becomes.
[0091]
The data conversion by the RGB conversion process is shown in FIG.
[0092]
With the above processing, the additional color determination processing in the additional color determination standby unit 130 and the additional hue determination unit 140 is completed, and additional color data D [1] = (130, 0, 255) is obtained, and the additional color determination standby unit. Additional color data D [1] = (130, 0, 255) is returned from 130 to the input / output management unit 120 as an additional color data response.
[0093]
The input / output management unit 120 receives the additional color data D [1] = (130, 0, 255) from the additional color determination waiting unit 130, draws a graph of the added object = object 5, and adds the additional color data D [ 1] = instructs the output unit 150 to display the additional object with (130, 0, 255) = “blue purple”. In accordance with this instruction, the output unit 150 draws the graph of the object 5 in “blue purple”. An example of a display screen on which this object has been added is shown in FIG.
[0094]
As described above, according to the present invention, it is possible to select a color of an object to be newly added, which can be easily distinguished from the existing color, while keeping the existing designated color. It is easy to understand and can be easily distinguished from the original data.
[0095]
Furthermore, the following is added to the present invention.
[0096]
(Appendix 1)
A used color input step for inputting used color data obtained by quantifying the already arranged colors;
A color value order arranging step for arranging the used color data in order of values;
A color difference value calculating step for calculating all the color difference values between adjacent use color data according to the alignment;
A maximum color width calculating step for calculating a position of a maximum color width at which the color difference value is a maximum value;
An additional color data calculating step for obtaining a value corresponding to the maximum color width and calculating additional color data;
An additional color data output step of outputting the calculated additional color data as a color data value of a color to be added to the color arrangement;
A color scheme program characterized by comprising:
[0097]
(Appendix 2)
In the color scheme program described in Appendix 1,
The maximum color width calculating step calculates a value of the use color data which is a starting point of the maximum color width;
In the additional color data calculating step, the additional color data is obtained by adding approximately ½ of the maximum color width value to the value of the used color data serving as the starting point of the maximum color width. program.
[0098]
(Appendix 3)
In the color scheme program described in appendix 1 or appendix 2,
A color arrangement program characterized in that the color difference value calculating step calculates the color difference value between the maximum value and the minimum value of the arranged use color data by performing correction suitable for the color difference.
[0099]
(Appendix 4)
In the color scheme program described in Appendix 3,
The use color data and the additional color data handled by the color value order arranging step, the color difference value calculating step, the maximum color width calculating step, and the additional color data calculating step are data representing hues. Color scheme program to do.
[0100]
(Appendix 5)
In the color scheme program described in Appendix 4,
A used color data format conversion step for converting the data format of the used color data;
An additional color data format conversion step for converting the data format of the additional color data,
In the use color input step, the use color data digitized by the RGB method is input,
The use color data format conversion step converts the use color data digitized by the RGB method input in the use color input step into use color data digitized by the HSB method,
The color value order arranging step arranges the values of the used color data digitized by the HSB method,
The additional color data calculating step calculates the additional color data quantified by the HSB method,
The additional color data format conversion step converts the additional color data quantified by the HSB method calculated in the additional color data calculation step into additional color data quantified by the RGB method,
The color arrangement program characterized in that the additional color data output step outputs the additional color data digitized by the RGB method converted by the additional color data format conversion step.
[0101]
(Appendix 6)
In the color scheme program according to any one of appendix 1 to appendix 5,
An additional color number input step for inputting the number of colors to be added in addition to the already arranged colors;
A use color data update step of adding the additional color data calculated in the additional color data calculation step as the use color data aligned in the color value order alignment step;
In the use color data update step, the color value order alignment step, the color difference value calculation step, the maximum color width calculation step, and the additional color data calculation step, all the additional color data of the color to be added are calculated. A data calculation repetition step that repeats until
The additional color data output step outputs the calculated additional color data as a color data value of a color to be added.
[0102]
【The invention's effect】
According to the present invention, used color data obtained by digitizing already arranged colors is input, the used color data are arranged in order of values, and all color difference values between adjacent used color data are calculated according to the alignment. Then, a value corresponding to the maximum color width where the color difference value is the maximum value is obtained, additional color data is calculated, and output as the color data value of the color to be added. Two colors with a difference in color are selected, and the color between these two colors can be selected as the color to be added, and the color that has already been colored is left as it is, and a color that is easily distinguishable from the color that has been colored is added Can be selected as color.
[0103]
Further, according to the present invention, the value of the used color data that is the starting point of the maximum color width is calculated, and the value of the used color data that is the starting point of the maximum color width is approximately 1 / of the value of the maximum color width. Since the additional color data is obtained by adding 2 to the color, it can be selected as the color to be added by the middle color of the two colors having the most difference between the colors. The color having the largest difference from the existing color can be selected as the additional color.
[0104]
In addition, according to the present invention, the color difference value between the maximum value and the minimum value of the arranged use color data is also calculated with appropriate correction, so that the cyclic data as represented by the hue circle is obtained. In addition, color difference values can be obtained for all adjacent data, and an additional color that is most easily identified can be selected for all data that have already been colored.
[0105]
Furthermore, according to the present invention, since the additional color is determined using the hue, the additional color can be determined based on a criterion with high human identification ability. Identification can be facilitated.
[0106]
Further, according to the present invention, the use color data quantified by the RGB method is input, the input use color data quantified by the RGB method is converted into use color data quantified by the HSB method, Arranged in order of values of used color data digitized by the HSB method, calculated the additional color data digitized by the HSB method, and digitized the additional color data digitized by the HSB method by the RGB method Since it converts to additional color data and outputs additional color data digitized in RGB format, data can be input / output using RGB format data, and additional colors can be determined using HSB format data. In the actual addition color determination, an additional color having high identification ability can be determined by the HSB method, while handling is performed by general data used in many computers and the like.
[0107]
In addition, according to the present invention, the number of colors to be added is input, and the process for the number of additional colors is repeated to determine additional colors. Therefore, even when a plurality of colors are added, the number of colors to be added Multiple additional colors can be easily determined by simply entering.
[Brief description of the drawings]
FIG. 1 is a configuration diagram showing an object addition system for realizing a color arrangement program according to the present invention.
FIG. 2 is an example of a display screen before an object is added.
FIG. 3 is an example of an object addition instruction screen.
FIG. 4 is a diagram illustrating a data flow between each unit of the object addition system.
FIG. 5 is a flowchart showing an additional color determination process in an additional color determination standby unit.
FIG. 6 is a diagram showing a hue circle and main color names.
FIG. 7 is a flowchart showing an additional hue determination process in an additional hue determination unit.
FIG. 8 is a diagram illustrating data conversion by HSB conversion, hue extraction, and alignment processing.
FIG. 9 is a diagram illustrating data calculation by hue difference calculation, maximum color width selection, and maximum color width midpoint calculation processing.
FIG. 10 is a diagram illustrating data conversion by RGB conversion processing.
FIG. 11 is an example of a display screen after adding an object.
FIG. 12 is a block diagram illustrating a conventional printing apparatus.
FIG. 13 is a flowchart illustrating a printing operation of a conventional printing apparatus.
[Explanation of symbols]
1 Host computer
2 Receive buffer
3 Program ROM
4 CPU
5 Output section
6 RAM
10 Multicolor printing device
100 object addition system
110 Input section
120 I / O management department
130 Additional color decision waiting section
140 Additional hue determination unit
150 output section

Claims (3)

すでに配色された色を数値化した使用色データを入力する使用色入力ステップと、
前記使用色データを値の順に整列する色値順整列ステップと、
前記整列にしたがって隣り合う使用色データ同士の色差分値を全て算出する色差分値算出ステップと、
前記色差分値が最大値となる最大色幅の起点となる前記使用色データの値を算出する最大色幅算出ステップと、
前記最大色幅の起点となる使用色データの値に前記最大色幅の値の約1/2を加算したものを追加色データとして算出する追加色データ算出ステップと、
前記算出された追加色データを前記配色された色に追加する色の色データ値として出力する追加色データ出力ステップと、
を備えたことを特徴とする配色プログラム。
A used color input step for inputting used color data obtained by quantifying the already arranged colors;
A color value order arranging step for arranging the used color data in order of values;
A color difference value calculating step for calculating all the color difference values between adjacent use color data according to the alignment;
A maximum color width calculating step of calculating a value of the used color data that is a starting point of a maximum color width at which the color difference value is a maximum value;
An additional color data calculation step of calculating, as additional color data, a value obtained by adding approximately ½ of the maximum color width value to the value of the used color data serving as the starting point of the maximum color width;
An additional color data output step of outputting the calculated additional color data as a color data value of a color to be added to the color arrangement;
A color scheme program characterized by comprising:
請求項1に記載の配色プログラムにおいて、
前記色差分値算出ステップが、前記整列された使用色データの最大値と最小値との色差分値も色の差分に適した補正を行って算出し、
前記色値順整列ステップ、前記色差分値算出ステップ、前記最大色幅算出ステップおよび前記追加色データ算出ステップが取り扱う前記使用色データおよび前記追加色データは、色相をあらわすデータであることを特徴とする配色プログラム。
In the color scheme program according to claim 1,
The color difference value calculation step calculates the color difference value between the maximum value and the minimum value of the arranged use color data by performing correction suitable for the color difference,
The use color data and the additional color data handled by the color value order arranging step, the color difference value calculating step, the maximum color width calculating step, and the additional color data calculating step are data representing hues. Color scheme program to do.
請求項2に記載の配色プログラムにおいて、
前記使用色データのデータ形式を変換する使用色データ形式変換ステップと、前記追加色データのデータ形式を変換する追加色データ形式変換ステップと、を備え、
前記使用色入力ステップが、RGB方式で数値化された前記使用色データを入力し、
前記使用色データ形式変換ステップが、前記使用色入力ステップで入力したRGB方式で数値化された使用色データを、HSB方式で数値化した使用色データに変換し、
前記色値順整列ステップが、前記HSB方式で数値化された使用色データの値の順に整列し、
前記追加色データ算出ステップが、前記HSB方式で数値化した前記追加色データを算出し、
前記追加色データ形式変換ステップが、前記追加色データ算出ステップで算出した前記HSB方式で数値化された追加色データを、RGB方式で数値化した追加色データに変換し、
前記追加色データ出力ステップが、前記追加色データ形式変換ステップで変換されたRGB方式で数値化された追加色データを出力することを特徴とする配色プログラム。
In the color scheme program according to claim 2,
A use color data format conversion step for converting a data format of the use color data; and an additional color data format conversion step for converting a data format of the additional color data.
In the use color input step, the use color data digitized by the RGB method is input,
The use color data format conversion step converts the use color data digitized by the RGB method input in the use color input step into use color data digitized by the HSB method,
The color value order arranging step arranges the values of the used color data digitized by the HSB method,
The additional color data calculating step calculates the additional color data quantified by the HSB method,
The additional color data format conversion step converts the additional color data quantified by the HSB method calculated in the additional color data calculation step into additional color data quantified by the RGB method,
The color arrangement program characterized in that the additional color data output step outputs the additional color data digitized by the RGB method converted by the additional color data format conversion step.
JP2003199661A 2003-07-22 2003-07-22 Color scheme program Expired - Fee Related JP4188159B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003199661A JP4188159B2 (en) 2003-07-22 2003-07-22 Color scheme program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003199661A JP4188159B2 (en) 2003-07-22 2003-07-22 Color scheme program

Publications (2)

Publication Number Publication Date
JP2005043942A JP2005043942A (en) 2005-02-17
JP4188159B2 true JP4188159B2 (en) 2008-11-26

Family

ID=34260354

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003199661A Expired - Fee Related JP4188159B2 (en) 2003-07-22 2003-07-22 Color scheme program

Country Status (1)

Country Link
JP (1) JP4188159B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4662256B2 (en) * 2005-08-03 2011-03-30 サミー株式会社 Display device and display program
JP4971768B2 (en) 2006-12-07 2012-07-11 キヤノン株式会社 Editing apparatus, editing method, and program
JP5741080B2 (en) * 2011-03-09 2015-07-01 富士通株式会社 Display program, display method, and display device

Also Published As

Publication number Publication date
JP2005043942A (en) 2005-02-17

Similar Documents

Publication Publication Date Title
US7061503B2 (en) In-gamut color picker
US7515744B2 (en) Image processing apparatus, method and program that identifies a color space of image data based on a recognized object
JP5700012B2 (en) Calibration apparatus for image forming apparatus, program for calibration apparatus, computer-readable recording medium on which program for calibration apparatus is recorded, and calibration method for image forming apparatus
JP2010262650A (en) Method for highlighting topic element in chart having a plurality of contrast elements composed of a plurality of colors, and system thereof
US9443175B2 (en) Color converting apparatus and a color converting method
JP2006013836A (en) Image data processing for processing color image data of color image
US11489977B1 (en) Information processing apparatus and non-transitory computer readable medium
EP1427185A2 (en) Incremental color transform creation
JP4188159B2 (en) Color scheme program
US20060170995A1 (en) Color image correction processing apparatus and color image correction processing method
US7397947B2 (en) Image processing apparatus, method and program able to infer the color space of image data
JP5023036B2 (en) Profile generation apparatus, profile generation program, profile generation method, image processing apparatus, image processing program, and image processing method
JP2008042711A (en) Color converter, color converting method, color conversion program, color conversion coefficient creating apparatus, color conversion coefficient creating method, and color conversion coefficient creation program
JP2007257409A (en) Digital content editing device and program
US7679782B2 (en) System and method for extracting grayscale data in accordance with a prescribed tolerance function
JP2006048420A (en) Method for preparing color conversion table, and image processor
JP4974030B2 (en) Image processing apparatus and image processing method
JP2006019956A (en) Device and method for color processing
CN113395407A (en) Image processing apparatus, image processing method, and computer readable medium
JP2009218928A (en) Image processing apparatus, image processing method, image processing program and image processing storage medium
JP4641959B2 (en) Image processing device
JP2010062921A (en) Image processing apparatus and method, program, and recording medium
US20230098695A1 (en) Systems for Generating Accessible Color Themes
JP2001144976A (en) Profile generating method and profile generator
JP2983579B2 (en) Display control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060612

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080909

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080910

R150 Certificate of patent or registration of utility model

Ref document number: 4188159

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110919

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120919

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120919

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130919

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees