CN109117135B - Method and device for determining color scheme - Google Patents

Method and device for determining color scheme Download PDF

Info

Publication number
CN109117135B
CN109117135B CN201810816651.6A CN201810816651A CN109117135B CN 109117135 B CN109117135 B CN 109117135B CN 201810816651 A CN201810816651 A CN 201810816651A CN 109117135 B CN109117135 B CN 109117135B
Authority
CN
China
Prior art keywords
color
target
colors
attribute
determining
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.)
Active
Application number
CN201810816651.6A
Other languages
Chinese (zh)
Other versions
CN109117135A (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.)
China National Petroleum Corp
BGP Inc
Original Assignee
China National Petroleum Corp
BGP Inc
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 China National Petroleum Corp, BGP Inc filed Critical China National Petroleum Corp
Priority to CN201810816651.6A priority Critical patent/CN109117135B/en
Publication of CN109117135A publication Critical patent/CN109117135A/en
Application granted granted Critical
Publication of CN109117135B publication Critical patent/CN109117135B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Abstract

The embodiment of the application discloses a method and a device for determining a color scheme. The method comprises the following steps: generating a target color circle based on the reference color; the color ring comprises colors of a first preset color type; the colors in the color ring correspond to the color positions one by one; determining a plurality of target colors from the target color ring, and using a set formed by the plurality of target colors as a target color set, so that the attribute difference between the target color in the target color set and a reference color in the reference color set is greater than or equal to a preset difference threshold, and the attribute difference between two target colors in the target color set is greater than or equal to the preset difference threshold; and taking the color combination formed by the target colors in the target color set as a target color matching scheme. According to the technical scheme, the coordination of color collocation of the views in the geophysical prospecting software can be improved, and different types of data in the views can be highlighted.

Description

Method and device for determining color scheme
Technical Field
The application relates to the technical field of petroleum geophysical exploration, in particular to a method and a device for determining a color matching scheme.
Background
The geophysical prospecting for petroleum mainly refers to a method for deducing the nature and the form of an underground rock stratum by observing and analyzing the propagation rule of seismic waves generated by artificial earthquake in the underground by utilizing the difference of the elasticity and the density of an underground medium. Geophysical exploration software meets large data and calculation requirements brought by geophysical exploration production by means of a high-performance computer and an information technology, generally comprises geophysical exploration acquisition software, processing and interpreting software, oil reservoir software and the like, is applied to various production links such as field acquisition production quality monitoring, forward modeling illumination, mass data volume pre-stack migration processing, oil reservoir interpretation and the like, plays a great role, and improves production efficiency. However, at present, geophysical prospecting software pays attention to function development, and meanwhile, the attractiveness and the overall harmony of software display are often ignored.
However, the main reasons for the lack of aesthetic appearance are the inconsistent color matching of the views and the poor contrast of the images. The color of the geophysical prospecting software is selected mainly according to personal preference, so that on one hand, the software view display attractiveness is not friendly, on the other hand, the overall display style of the software is not uniform, and inconvenience is brought to the use of a user. Therefore, there is a need to develop a method for determining color matching to improve the coordination of color matching of views in geophysical software and to highlight different types of data in the views.
Disclosure of Invention
The embodiment of the application aims to provide a method and a device for determining a color scheme, so as to improve the coordination of color matching of views in geophysical exploration software and highlight different types of data in the views.
In order to solve the above technical problem, an embodiment of the present application provides a method and an apparatus for determining a color scheme, which are implemented as follows:
a method of determining a color scheme provides a plurality of reference colors and a reference color set; wherein the reference color set comprises at least one reference color; the method comprises the following steps:
generating a target color circle based on the reference color; the color ring comprises colors of a first preset color type; the colors in the color ring correspond to the color positions one by one;
determining a plurality of target colors from the target color ring, and using a set formed by the plurality of target colors as a target color set, so that the attribute difference degree between a target color in the target color set and a reference color in the reference color set is greater than or equal to a preset difference degree threshold value, and the attribute difference degree between two target colors in the target color set is greater than or equal to the preset difference degree threshold value; the type of the color in the target color set is greater than or equal to a second preset color type; the attribute difference degree is determined according to the attribute values of the two colors;
and taking the color combination formed by the target colors in the target color set as a target color matching scheme.
In a preferred embodiment, generating a color circle based on the reference color includes:
circularly arranging a plurality of reference colors to obtain an initial color ring;
performing interpolation processing based on the attribute values of two adjacent reference colors in the initial color ring to obtain a plurality of discrete attribute values and colors corresponding to the discrete attribute values; the types of the colors corresponding to the discrete attribute values are equal to the first preset color type;
and circularly arranging the colors corresponding to the discrete attribute values to obtain the target color circle.
In a preferred embodiment, the attribute values of the reference color include three color component values; the interpolation processing is performed using the following formula:
Figure BDA0001740479640000021
Figure BDA0001740479640000022
Figure BDA0001740479640000023
wherein c1 and c2 represent two adjacent groups in the primary color ringA first reference color and a second reference color of the quasi-colors; rc1And Rc2A first color component value representing said first reference color and said second reference color, respectively; gc1And Gc2A second color component value representing said first reference color and said second reference color, respectively; b isc1And Bc2A third color component value representing a first reference color and said second reference color, respectively; cn represents the number of a plurality of discrete attribute values obtained after interpolation processing is performed on the basis of the first reference color and the second reference color; rci、GciAnd BciThe first color component value, the second color component value, and the third color component value in the ith attribute value among the plurality of discrete attribute values obtained by interpolation processing based on the first reference color and the second reference color, respectively.
In a preferred embodiment, the target color set is determined according to the following steps:
determining a first color and a color position of the first color from the color circle, determining a first attribute difference degree between the first color and a reference color in the reference color set, and judging whether the first attribute difference degree is greater than or equal to a preset difference degree threshold value; if the color is larger than or equal to the target color set, taking a set formed by the first colors as the target color set;
determining a second color from the color ring according to the color position of the first color; wherein a color position of the second color is different from a color position of the first color;
determining a second attribute difference degree between the second color and a reference color in the reference color set and a third attribute difference degree between the second color and a target color in the target color set, and judging whether the second attribute difference degree and the third attribute difference degree are both greater than or equal to the preset difference degree threshold value; if the color values are larger than or equal to the first color value, adding the second color value into the target color set to obtain a new target color set;
and repeatedly determining a new second color from the color ring, determining a new second attribute difference between the new second color and the reference color in the reference color set and a new third attribute difference between the new second color and the target color in the new target color set, judging whether the new second attribute difference and the new third attribute difference are both greater than or equal to the preset difference threshold value, and if so, adding the new second color into the new target color set until the type of the color in the new target color set is greater than or equal to a second preset color type.
In a preferred embodiment, determining the second color from the color circle comprises:
respectively determining three initial colors from the color circle according to the color position of the first color; sequentially connecting the color position of the first color and the color position of each initial color to obtain a square with the center same as the color circle;
taking the initial color as the second color.
In a preferred embodiment, determining the second color from the color ring further includes:
rotating the square around the center of the color ring by a specified angle to obtain a rotated square;
and in the color ring, the color corresponding to the four vertexes of the rotated square is taken as the second color.
In a preferred embodiment, the attribute difference between the target color in the target color set and the reference color in the reference color set is determined according to the following formula:
DF=ΔR2+ΔG2+ΔB2
ΔR=|Rk-Rm|
ΔG=|Gk-Gm|
ΔB=|Bk-Bm|
wherein DF represents a degree of attribute dissimilarity between a kth target color in the set of target colors and an mth reference color in the set of reference colors; rkAnd RmA first color component value representing a kth target color in the set of target colors and an mth reference color in the set of reference colors, respectively; gkAnd GmA second color component value representing a kth target color in the set of target colors and an mth reference color in the set of reference colors, respectively; b iskAnd BmA third color component value representing a kth target color in the set of target colors and an mth reference color in the set of reference colors, respectively.
In a preferred scheme, the value range of the preset difference threshold value comprises 25-40.
An apparatus for determining a color scheme, the apparatus providing a plurality of reference colors and reference color sets; wherein the reference color set comprises at least one reference color; the device comprises: the system comprises a color circle generating module, a target color set determining module and a color scheme determining module; wherein the content of the first and second substances,
the color circle generating module is used for generating a target color circle based on the reference color; the color ring comprises colors of a first preset color type; the colors in the color ring correspond to the color positions one by one;
the target color set determining module is configured to determine multiple target colors from the target color ring, and use a set formed by the multiple target colors as a target color set, so that an attribute difference degree between a target color in the target color set and a reference color in the reference color set is greater than or equal to a preset difference degree threshold, and an attribute difference degree between two target colors in the target color set is greater than or equal to the preset difference degree threshold; the type of the color in the target color set is greater than or equal to a second preset color type; the attribute difference degree is determined according to the attribute values of the two colors;
and the color scheme determining module is used for taking the color combination formed by the target colors in the target color set as the target color scheme.
An apparatus for determining a color scheme comprising a memory, a processor, and a computer program stored on the memory, the memory storing a plurality of reference colors and reference color sets; wherein the reference color set comprises at least one reference color; the computer program when executed by the processor performs the steps of:
generating a target color circle based on the reference color; the color ring comprises colors of a first preset color type; the colors in the color ring correspond to the color positions one by one;
determining a plurality of target colors from the target color ring, and using a set formed by the plurality of target colors as a target color set, so that the attribute difference degree between a target color in the target color set and a reference color in the reference color set is greater than or equal to a preset difference degree threshold value, and the attribute difference degree between two target colors in the target color set is greater than or equal to the preset difference degree threshold value; the type of the color in the target color set is greater than or equal to a second preset color type; the attribute difference degree is determined according to the attribute values of the two colors;
and taking the color combination formed by the target colors in the target color set as a target color matching scheme.
As can be seen from the technical solutions provided in the embodiments of the present application, the embodiments of the present application provide a method and an apparatus for determining a color scheme, and first, a target color circle may be generated based on the reference color; the color ring comprises colors of a first preset color type; the colors in the color ring correspond to the color positions one by one; then, a plurality of target colors can be determined from the target color ring, and a set of the plurality of target colors is used as a target color set, so that the attribute difference degree between a target color in the target color set and a reference color in the reference color set is greater than or equal to a preset difference degree threshold value, and the attribute difference degree between two target colors in the target color set is greater than or equal to the preset difference degree threshold value; the type of the color in the target color set is greater than or equal to a second preset color type; the attribute difference degree is determined according to the attribute values of the two colors; finally, the color combinations made up of the target colors in the target color set may be used as the target color scheme. Therefore, a group of strong-contrast color schemes suitable for geophysical prospecting software display can be provided by the method, different types of data in the view can be highlighted, and accordingly harmony and attractiveness of geophysical prospecting software window display are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a flow diagram of an embodiment of a method for determining color schemes according to the present application;
FIG. 2 is a schematic view of a color wheel in an embodiment of the present application;
FIG. 3 is a schematic diagram of color selection by squares in a color wheel in an embodiment of the present application;
FIG. 4 is a schematic diagram of color selection by a rotated square in a color wheel in an embodiment of the present application;
FIG. 5 is a block diagram of the components of one embodiment of the apparatus for determining color schemes of the present application;
FIG. 6 is a block diagram illustrating the components of another embodiment of an apparatus for determining color schemes according to the present application.
Detailed Description
The embodiment of the application provides a method and a device for determining a color scheme.
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a method for determining a color scheme. The method of determining a color scheme may be provided with a plurality of reference colors and reference color sets; wherein the reference color set comprises at least one reference color.
In this embodiment, the reference color may be a chromatic color. For example, the reference color may be red, yellow, green, cyan, or blue. The attribute values of these reference colors may be represented by RGB, including R, G and B three color component values, respectively. Wherein, the RGB attribute values of red, yellow, green, cyan and blue can be characterized by hexadecimal color codes, and the hexadecimal color codes corresponding to these colors are "OXFF 0000", "OXFF 00", "OX 00FF 00", "OX 00 FFFF", "OX 0000 FF", respectively.
In this embodiment, the reference color set may include at least one reference color. For example, the reference color may be black or white, or may be set according to the user's own needs. In general, black or white is usually used as the reference color to avoid using a combination of colors close to black or white as a color scheme in the subsequent determination of the color scheme, since black has a heavier color, is displayed in a less harmonious manner, and white has a color too light to easily coincide with a white background in a view, so that a user may not see clearly.
FIG. 1 is a flow chart of an embodiment of a method for determining color schemes according to the present application. As shown in fig. 1, the method for determining color schemes includes the following steps.
Step S101: generating a target color circle based on the reference color; the color ring comprises colors of a first preset color type; and colors in the color ring correspond to color positions one by one.
In this embodiment, generating the target color circle based on the reference color may specifically include annularly arranging a plurality of types of the reference colors to obtain an initial color circle. Interpolation processing can be carried out on the basis of the attribute values of two adjacent reference colors in the initial color ring to obtain a plurality of discrete attribute values and colors corresponding to the discrete attribute values; the types of the colors corresponding to the discrete attribute values are equal to the first preset color type. The colors corresponding to the discrete attribute values can be arranged in a ring shape to obtain the target color circle. And the colors in the color ring correspond to the color positions one by one. For example, the reference colors are 5 kinds, which are red, yellow, green, cyan, and blue, respectively. These reference colors can be arranged circularly to obtain an initial color circle. At this time, if the first preset color type is 128, interpolation processing needs to be performed based on the attribute values of two adjacent reference colors in the initial color ring to obtain 128 discrete attribute values and colors corresponding to the discrete attribute values. Since the reference colors are 5 in kind, the initial color wheel may include 5 combinations of two adjacent reference colors, such as a combination of adjacent red and yellow, a combination of adjacent yellow and green, a combination of adjacent green and cyan, a combination of adjacent cyan and blue, and a combination of adjacent blue and red, respectively. Then, the first predetermined color type may be divided by the reference color type, i.e., 128 divided by 5, which is a value of 24 to 3. In this way, interpolation processing can be performed based on the attribute values of the combinations of the adjacent reference colors, respectively, to obtain discrete attribute values of 24, 25, and 25, respectively, and obtain a total number of discrete attribute values of 128. Therefore, the colors corresponding to the discrete attribute values can be circularly and uniformly arranged to obtain the target color circle, and the target color circle can include 128 different colors. For example, fig. 2 is a schematic diagram of a color wheel in an embodiment of the present application. As shown in fig. 2, the colors in the color ring are uniformly arranged annularly. The color in each cell in the color wheel in fig. 2 may be a different color obtained by difference.
In this embodiment, the attribute value of the reference color includes three color component values. The interpolation process can be performed using the following equation:
Figure BDA0001740479640000061
Figure BDA0001740479640000062
Figure BDA0001740479640000063
wherein c1 and c2 represent a first reference color and a second reference color of two adjacent reference colors in the initial color ring; rc1And Rc2A first color component value representing said first reference color and said second reference color, respectively; gc1And Gc2A second color component value representing said first reference color and said second reference color, respectively; b isc1And Bc2A third color component value representing a first reference color and said second reference color, respectively; cn represents the number of a plurality of discrete attribute values obtained after interpolation processing is performed on the basis of the first reference color and the second reference color; rci、GciAnd BciThe first color component value, the second color component value, and the third color component value in the ith attribute value among the plurality of discrete attribute values obtained by interpolation processing based on the first reference color and the second reference color, respectively.
Step S102: determining a plurality of target colors from the target color ring, and using a set formed by the plurality of target colors as a target color set, so that the attribute difference degree between a target color in the target color set and a reference color in the reference color set is greater than or equal to a preset difference degree threshold value, and the attribute difference degree between two target colors in the target color set is greater than or equal to the preset difference degree threshold value; the type of the color in the target color set is greater than or equal to a second preset color type; the attribute difference degree is determined according to the attribute values of the two colors.
In this embodiment, a plurality of target colors may be determined from the target color ring, and a set of the plurality of target colors may be used as a target color set, such that a degree of attribute difference between a target color in the target color set and a reference color in the reference color set is greater than or equal to a preset degree of difference threshold, and a degree of attribute difference between two target colors in the target color set is greater than or equal to the preset degree of difference threshold; and the type of the color in the target color set is greater than or equal to a second preset color type. Specifically, the following steps may be included.
Step S21: determining a first color and a color position of the first color from the color circle, determining a first attribute difference degree between the first color and a reference color in the reference color set, and judging whether the first attribute difference degree is greater than or equal to a preset difference degree threshold value; and if the color is larger than or equal to the target color set, taking the set formed by the first colors as the target color set.
In this embodiment, the first color may be randomly determined from the color ring by a method of monte carlo simulation. For example, as shown in fig. 3, the color at color position a is randomly chosen as the first color in the color wheel in fig. 2. A first attribute difference between the first color and each reference color in the reference color set can be calculated, and whether the first attribute difference is greater than or equal to a preset difference threshold value can be judged; if the color is greater than or equal to the target color set, the set of the first colors may be used as the target color set. Thus, the target color set includes the corresponding color at color position A in FIG. 3. If the difference is smaller than the preset difference threshold, the first color can be determined from the color ring at random again until the obtained difference of the first attribute is larger than or equal to the preset difference threshold. The value range of the preset difference threshold value can include 25-40. The value of the preset difference threshold may be specifically set according to a display condition of a view in the actual geophysical prospecting software, and is not limited here.
Step S22: determining a second color from the color ring according to the color position of the first color; wherein a color position of the second color is different from a color position of the first color.
In this embodiment, determining the second color from the color ring according to the color position of the first color may specifically include determining three initial colors from the color ring respectively according to the color position of the first color; and sequentially connecting the color position of the first color and the color positions of the initial colors to obtain a square with the center same as the color circle. The initial color may be the second color. For example, as shown in fig. 3, in the color wheel in fig. 2, the color corresponding to the color position B opposite to the color position a may be first used as an initial color, then a straight line passing through the center of the color wheel and perpendicular to the line connecting the color positions a and B may be drawn, the intersection points of the straight line and the color wheel are color positions C and D, respectively, and the colors corresponding to the color positions C and D, respectively, are used as the other two initial colors. At this point, color positions A, B, C and D are connected in sequence, resulting in a square ABCD with the same center as the color circle. Thus, any one of the colors corresponding to color locations B, C and D, respectively, may be used as the second color as a preselected color in the subsequent determination of the color scheme.
In this embodiment, the square may be rotated by a predetermined angle around the center of the color wheel, so as to obtain a rotated square. And in the color ring, the color corresponding to the four vertexes of the rotated square is taken as the second color. The specified angle may be set according to actual conditions, or may be set randomly by a monte carlo simulation method. For example, as shown in fig. 4, the specified angle is 45 degrees, the square ABCD in fig. 3 may be rotated clockwise by 45 degrees to obtain a rotated square, i.e., the square a 'B' C 'D' in fig. 4, so that any one of the colors respectively corresponding to the four vertices in the square a 'B' C 'D' may be used as the second color to be used as the preselected color in the subsequent determination of the color scheme.
Step S23: determining a second attribute difference degree between the second color and a reference color in the reference color set and a third attribute difference degree between the second color and a target color in the target color set, and judging whether the second attribute difference degree and the third attribute difference degree are both greater than or equal to the preset difference degree threshold value; and if the color values are larger than or equal to the target color set, adding the second color into the target color set to obtain a new target color set.
In this embodiment, a second attribute difference between the second color and a reference color in the reference color set and a third attribute difference between the second color and a target color in the target color set may be determined, and it may be determined whether both the second attribute difference and the third attribute difference are greater than or equal to the preset difference threshold; and if the color values are larger than or equal to the target color set, adding the second color into the target color set to obtain a new target color set. For example, in a case that the target color set includes the color corresponding to the color position a in fig. 3, after obtaining the colors corresponding to the color positions B, C and D, the color corresponding to the color position B may be first used as the second color, and if the second attribute difference between the color corresponding to the color position B and each reference color in the reference color set is greater than or equal to the preset difference threshold and the third attribute difference between the color corresponding to the target color set, that is, the color position a, is greater than or equal to the preset difference threshold, the color corresponding to the color position B may be added to the target color set to obtain a new target color set. In this way, the new target color set may include the corresponding colors at color positions A and B, respectively. And if the color corresponding to the color position B does not meet the conditions, taking the color corresponding to the color position C as the second color, and sequentially judging until the selected color is taken as the second color, so that the conditions can be met.
Step S24: and repeatedly determining a new second color from the color ring, determining a new second attribute difference between the new second color and a reference color in the reference color set, determining a new third attribute difference between the new second color and a target color in the new target color set, judging whether the new second attribute difference and the new third attribute difference are both greater than or equal to the preset difference threshold value, and if so, adding the new second color into the new target color set until the type of the color in the new target color set is greater than or equal to a second preset color type.
In this embodiment, the determining of the new second color from the color ring, the determining of the new second attribute difference between the new second color and the reference color in the reference color set, and the determining of the new third attribute difference between the new second color and the target color in the new target color set may be repeated, and whether the new second attribute difference and the new third attribute difference are both greater than or equal to the preset difference threshold value is determined, and if both are greater than or equal to the preset difference threshold value, the new second color is added to the new target color set until the type of the color in the new target color set is greater than or equal to the second preset color type. For example, in a case that the new target color set includes colors respectively corresponding to color positions a and B in fig. 3, the color corresponding to color position C may be continuously used as the new second color, and a new second attribute difference between the new second color and each of the reference colors in the reference color set and a new third attribute difference between the new second color and each of the target colors in the new target color set, that is, a new third attribute difference between the color respectively corresponding to color position a and the color position B. And if the new second attribute difference degree and the new third attribute difference degree are both greater than or equal to the preset difference degree threshold value, adding the new second color into the new target color set until the type of the color in the new target color set is greater than or equal to a second preset color type.
Similarly, the square may be rotated by a predetermined angle around the center of the color wheel, so as to obtain a rotated square. And in the color ring, taking the color corresponding to the four vertexes of the rotated square as the new second color. For example, as shown in fig. 4, the specified angle is 45 degrees, and the square ABCD in fig. 3 may be rotated clockwise by 45 degrees to obtain a rotated square, that is, the square a 'B' C 'D' in fig. 4, so that any one of the colors corresponding to the four vertices of the square a 'B' C 'D' may be used as the new second color. In this way, after the color corresponding to the color position A, B, C, D is screened, any one of the colors corresponding to the four vertices of the square a 'B' C 'D' may be used as the new second color, and the screening may be continued.
In this embodiment, the second predetermined color type is smaller than the first predetermined color type. Specifically, the second preset color category is determined according to the category of the data type displayed by the view in the actual geophysical prospecting software. For example, if there are 6 types of data displayed in the view in the actual geophysical prospecting software, the second predetermined color category is 6 types.
In this embodiment, the attribute difference between the target color in the target color set and the reference color in the reference color set may be determined according to the following formula:
DF=ΔR2+ΔG2+ΔB2
ΔR=|Rk-Rm|
ΔG=|Gk-Gm|
ΔB=|Bk-Bm|
wherein DF represents a degree of attribute dissimilarity between a kth target color in the set of target colors and an mth reference color in the set of reference colors; rkAnd RmA first color component value representing a kth target color in the set of target colors and an mth reference color in the set of reference colors, respectively; gkAnd GmRespectively representing a k-th target color in the set of target colors and an m-th target color in the set of reference colorsA second color component value of the reference color; bkAnd BmA third color component value representing a kth target color in the set of target colors and an mth reference color in the set of reference colors, respectively.
In this embodiment, the attribute difference between two target colors in the target color set may be determined according to the following formula:
DF=ΔR2+ΔG2+ΔB2
ΔR=|Ri-Rj|
ΔG=|Gi-Gj|
ΔB=|Bi-Bj|
wherein DF represents the attribute difference degree between the ith target color and the jth target color in the target color set; r isiAnd RjA first color component value representing an ith object color and a jth object color, respectively, of the set of object colors; giAnd GjA second color component value representing an ith object color and a jth object color, respectively, of the set of object colors; b isiAnd BjA third color component value representing an ith object color and a jth object color, respectively, of the set of object colors.
Similarly, the attribute difference between any two colors can be determined according to the above formula.
Step S103: and taking the color combination formed by the target colors in the target color set as a target color matching scheme.
In the present embodiment, a color combination of the target colors in the target color set may be used as the target color scheme. Specifically, when the color type in the target color set is equal to the second preset color type, the color combination formed by the target color set may be used as the target color scheme. When the color type in the target color set is greater than the second preset color type, a color combination formed by the target colors of the second preset color type in the target color set may be used as the target color scheme.
In the method for determining color schemes, first, a target color circle may be generated based on the reference color; the color ring comprises colors of a first preset color type; the colors in the color ring correspond to the color positions one by one; then, a plurality of target colors can be determined from the target color ring, and a set of the plurality of target colors is used as a target color set, so that the attribute difference degree between a target color in the target color set and a reference color in the reference color set is greater than or equal to a preset difference degree threshold value, and the attribute difference degree between two target colors in the target color set is greater than or equal to the preset difference degree threshold value; the type of the color in the target color set is greater than or equal to a second preset color type; the attribute difference degree is determined according to the attribute values of the two colors; finally, the color combinations made up of the target colors in the target color set may be used as the target color scheme. Therefore, a group of strong-contrast color schemes suitable for geophysical prospecting software display can be provided by the method, different types of data in the view can be highlighted, and accordingly harmony and attractiveness of geophysical prospecting software window display are improved.
FIG. 5 is a block diagram illustrating the components of one embodiment of an apparatus for determining color schemes according to the present application. The device for determining the color scheme provides a plurality of reference colors and reference color sets; wherein the reference color set comprises at least one reference color. As shown in fig. 5, the apparatus for determining a color scheme may include: a color wheel generation module 100, a target color set determination module 200, and a color scheme determination module 300.
The color circle generating module 100 may be configured to generate a target color circle based on the reference color; the color ring comprises colors of a first preset color type; the colors in the color ring correspond to the color positions one by one;
the target color set determining module 200 may be configured to determine multiple target colors from the target color ring, and use a set of the multiple target colors as a target color set, so that a difference degree of an attribute between a target color in the target color set and a reference color in the reference color set is greater than or equal to a preset difference degree threshold, and a difference degree of an attribute between two target colors in the target color set is greater than or equal to the preset difference degree threshold; the type of the color in the target color set is greater than or equal to a second preset color type; the attribute difference degree is determined according to the attribute values of the two colors.
The color scheme determination module 300 may be configured to use a color combination of the target colors in the target color set as the target color scheme.
FIG. 6 is a block diagram of the components of another embodiment of the apparatus for determining color schemes of the present application. As shown in fig. 6, the apparatus for determining color schemes includes a memory, a processor, and a computer program stored on the memory, the memory storing a plurality of reference colors and reference color sets; wherein the reference color set comprises at least one reference color; the computer program when executed by the processor performs the steps of:
step S101: generating a target color circle based on the reference color; the color ring comprises colors of a first preset color type; the colors in the color ring correspond to the color positions one by one;
step S102: determining a plurality of target colors from the target color ring, and using a set formed by the plurality of target colors as a target color set, so that the attribute difference degree between a target color in the target color set and a reference color in the reference color set is greater than or equal to a preset difference degree threshold value, and the attribute difference degree between two target colors in the target color set is greater than or equal to the preset difference degree threshold value; the type of the color in the target color set is greater than or equal to a second preset color type; the attribute difference degree is determined according to the attribute values of the two colors;
step S103: and taking the color combination formed by the target colors in the target color set as a target color matching scheme.
The embodiment of the apparatus for determining color schemes corresponds to the embodiment of the method for determining color schemes, so that the technical scheme of the embodiment of the color schemes can be determined, and the technical effect of the embodiment of the method can be achieved.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to the software compiler used in program development, but the original code before compiling is also written in a specific Programming Language, which is called Hardware Description Language (HDL), and the HDL is not only one kind but many kinds, such as abel (advanced boot Expression Language), ahdl (alternate Language Description Language), communication, CUPL (computer universal Programming Language), HDCal (Java Hardware Description Language), langa, Lola, mylar, HDL, PALASM, rhyddl (software Description Language), vhjhdh (Hardware Description Language), vhul, vhal, vhigh, vhygl, vhyg, and vhyg-2. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The apparatuses and modules illustrated in the above embodiments may be specifically implemented by a computer chip or an entity, or implemented by a product with certain functions.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, the functionality of the various modules may be implemented in the same one or more software and/or hardware implementations as the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. With this understanding in mind, the present solution, or portions thereof that contribute to the prior art, may be embodied in the form of a software product, which in a typical configuration includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The computer software product may include instructions for causing a computing device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in the various embodiments or portions of embodiments of the present application. The computer software product may be stored in a memory, which may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transient media), such as modulated data signals and carrier waves.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
While the present application has been described with examples, those of ordinary skill in the art will appreciate that there are numerous variations and permutations of the present application without departing from the spirit of the application, and it is intended that the appended claims encompass such variations and permutations without departing from the spirit of the application.

Claims (9)

1. A method of determining a color scheme, wherein a plurality of reference colors and reference color sets are provided; wherein the reference color set comprises at least one reference color; the method comprises the following steps:
generating a target color circle based on the reference color; the color ring comprises colors of a first preset color type; the colors in the color ring correspond to the color positions one by one;
determining a plurality of target colors from the target color ring, and using a set formed by the plurality of target colors as a target color set, so that the attribute difference degree between a target color in the target color set and a reference color in the reference color set is greater than or equal to a preset difference degree threshold value, and the attribute difference degree between two target colors in the target color set is greater than or equal to the preset difference degree threshold value; the type of the color in the target color set is greater than or equal to a second preset color type; the attribute difference degree is determined according to the attribute values of the two colors;
taking a color combination formed by the target colors in the target color set as a target color matching scheme;
wherein generating a color circle based on the reference color comprises:
circularly arranging a plurality of reference colors to obtain an initial color ring;
performing interpolation processing based on the attribute values of two adjacent reference colors in the initial color ring to obtain a plurality of discrete attribute values and colors corresponding to the discrete attribute values; the types of the colors corresponding to the discrete attribute values are equal to the first preset color type;
and circularly arranging the colors corresponding to the discrete attribute values to obtain the target color circle.
2. The method according to claim 1, wherein the attribute values of the reference color comprise three color component values; the interpolation process is performed using the following formula:
Figure FDA0003438234330000011
Figure FDA0003438234330000012
Figure FDA0003438234330000013
wherein c1 and c2 represent a first reference color and a second reference color of two adjacent reference colors in the initial color ring; rc1And Rc2A first color component value representing said first reference color and said second reference color, respectively; gc1And Gc2A second color component value representing said first reference color and said second reference color, respectively; b isc1And Bc2A third color component value representing a first reference color and said second reference color, respectively; cn represents the number of a plurality of discrete attribute values obtained after interpolation processing is performed on the basis of the first reference color and the second reference color; rci、GciAnd BciRespectively representing a first color component value and a second color component in the ith attribute value of a plurality of discrete attribute values obtained by interpolation processing based on the first reference color and the second reference colorA value and a third color component value.
3. The method of claim 1, wherein the set of target colors is determined by:
determining a first color and a color position of the first color from the color circle, determining a first attribute difference degree between the first color and a reference color in the reference color set, and judging whether the first attribute difference degree is greater than or equal to a preset difference degree threshold value; if the color is larger than or equal to the target color set, taking a set formed by the first colors as the target color set;
determining a second color from the color ring according to the color position of the first color; wherein a color position of the second color is different from a color position of the first color;
determining a second attribute difference degree between the second color and a reference color in the reference color set and a third attribute difference degree between the second color and a target color in the target color set, and judging whether the second attribute difference degree and the third attribute difference degree are both greater than or equal to the preset difference degree threshold value; if the color values are larger than or equal to the first color value, adding the second color value into the target color set to obtain a new target color set;
and repeatedly determining a new second color from the color ring, determining a new second attribute difference between the new second color and a reference color in the reference color set, determining a new third attribute difference between the new second color and a target color in the new target color set, judging whether the new second attribute difference and the new third attribute difference are both greater than or equal to the preset difference threshold value, and if so, adding the new second color into the new target color set until the type of the color in the new target color set is greater than or equal to a second preset color type.
4. The method of claim 3, wherein determining a second color from the color ring comprises:
respectively determining three initial colors from the color circle according to the color position of the first color; sequentially connecting the color position of the first color and the color position of each initial color to obtain a square with the center same as the color circle;
taking the initial color as the second color.
5. The method of claim 4, wherein determining a second color from the color ring, further comprises:
rotating the square around the center of the color circle by a specified angle to obtain a rotated square;
and in the color ring, the color corresponding to the four vertexes of the rotated square is taken as the second color.
6. The method of claim 1, wherein the degree of attribute dissimilarity between the target colors in the set of target colors and the reference colors in the set of reference colors is determined according to the following formula:
DF=ΔR2+ΔG2+ΔB2
ΔR=|Rk-Rm|
ΔG=|Gk-Gm|
ΔB=|Bk-Bm|
wherein DF represents a degree of attribute difference between a kth target color in the target color set and an mth reference color in the reference color set; rkAnd RmA first color component value representing a kth target color in the set of target colors and an mth reference color in the set of reference colors, respectively; gkAnd GmA second color component value representing a kth target color in the set of target colors and an mth reference color in the set of reference colors, respectively; b iskAnd BmRespectively representing a k-th target color of the set of target colors and the parameterA third color component value of an mth reference color in the set of colors is referenced.
7. The method according to claim 1, wherein the preset difference threshold value ranges from 25 to 40.
8. An apparatus for determining a color scheme, the apparatus providing a plurality of reference colors and reference color sets; wherein the reference color set comprises at least one reference color; the device comprises: the system comprises a color circle generating module, a target color set determining module and a color scheme determining module; wherein, the first and the second end of the pipe are connected with each other,
the color circle generating module is used for generating a target color circle based on the reference color; the color ring comprises colors of a first preset color type; the colors in the color ring correspond to the color positions one by one;
the target color set determining module is used for determining a plurality of target colors from the target color ring and using a set formed by the plurality of target colors as a target color set, so that the attribute difference degree between a target color in the target color set and a reference color in the reference color set is greater than or equal to a preset difference degree threshold value, and the attribute difference degree between two target colors in the target color set is greater than or equal to the preset difference degree threshold value; the type of the color in the target color set is greater than or equal to a second preset color type; the attribute difference degree is determined according to the attribute values of the two colors;
the color scheme determination module is used for taking color combinations formed by the target colors in the target color set as target color schemes;
the color wheel generation module is specifically configured to:
circularly arranging a plurality of reference colors to obtain an initial color ring;
performing interpolation processing based on the attribute values of two adjacent reference colors in the initial color ring to obtain a plurality of discrete attribute values and colors corresponding to the discrete attribute values; the types of the colors respectively corresponding to the plurality of discrete attribute values are equal to the first preset color type;
and circularly arranging the colors corresponding to the discrete attribute values to obtain the target color circle.
9. An apparatus for determining a color scheme, comprising a memory, a processor, and a computer program stored on the memory, wherein the memory stores a plurality of reference colors and reference color sets; wherein the reference color set comprises at least one reference color; the computer program when executed by the processor performs the steps of:
generating a target color wheel based on the reference color; the color ring comprises colors of a first preset color type; the colors in the color ring correspond to the color positions one by one;
determining a plurality of target colors from the target color ring, and using a set formed by the plurality of target colors as a target color set, so that the attribute difference degree between a target color in the target color set and a reference color in the reference color set is greater than or equal to a preset difference degree threshold value, and the attribute difference degree between two target colors in the target color set is greater than or equal to the preset difference degree threshold value; the type of the color in the target color set is greater than or equal to a second preset color type; the attribute difference degree is determined according to the attribute values of the two colors;
taking a color combination formed by the target colors in the target color set as a target color matching scheme;
wherein generating a color circle based on the reference color comprises:
circularly arranging a plurality of reference colors to obtain an initial color ring;
performing interpolation processing based on the attribute values of two adjacent reference colors in the initial color ring to obtain a plurality of discrete attribute values and colors corresponding to the discrete attribute values; the types of the colors corresponding to the discrete attribute values are equal to the first preset color type;
and circularly arranging the colors corresponding to the plurality of discrete attribute values respectively to obtain the target color circle.
CN201810816651.6A 2018-07-24 2018-07-24 Method and device for determining color scheme Active CN109117135B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810816651.6A CN109117135B (en) 2018-07-24 2018-07-24 Method and device for determining color scheme

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810816651.6A CN109117135B (en) 2018-07-24 2018-07-24 Method and device for determining color scheme

Publications (2)

Publication Number Publication Date
CN109117135A CN109117135A (en) 2019-01-01
CN109117135B true CN109117135B (en) 2022-06-03

Family

ID=64862411

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810816651.6A Active CN109117135B (en) 2018-07-24 2018-07-24 Method and device for determining color scheme

Country Status (1)

Country Link
CN (1) CN109117135B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568688B (en) * 2020-04-29 2023-06-06 RealMe重庆移动通信有限公司 View switching method and device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102047293A (en) * 2008-04-21 2011-05-04 威仕达品特技术有限公司 System and method for automatically generating color scheme variations
CN102768625A (en) * 2011-05-06 2012-11-07 北京新媒传信科技有限公司 Resurfacing method and device of Windows user interface
CN103024354A (en) * 2012-12-11 2013-04-03 华为技术有限公司 Method and device for color matching
CN104360796A (en) * 2014-12-08 2015-02-18 三星电子(中国)研发中心 Method and device for applying colors onto electronic equipment and electronic equipment
CN105278907A (en) * 2015-06-27 2016-01-27 维沃移动通信有限公司 Display method and mobile terminal
CN105389403A (en) * 2015-12-29 2016-03-09 东软集团股份有限公司 Automatic matching method and system of page style
CN107229077A (en) * 2017-05-26 2017-10-03 陈波 Physical prospecting instrument and its profile imaging method
US10019848B2 (en) * 2015-07-31 2018-07-10 Adobe Systems Incorporated Edge preserving color smoothing of 3D models
CN108280185A (en) * 2018-01-23 2018-07-13 武汉大学 A kind of map color effect preferred method that administrative map colours automatically

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9262670B2 (en) * 2012-02-10 2016-02-16 Google Inc. Adaptive region of interest
CN103489402B (en) * 2013-09-24 2015-10-28 广东威创视讯科技股份有限公司 The adjustment method of mosaic display screen and system
CN103927102A (en) * 2014-04-28 2014-07-16 深圳市中兴移动通信有限公司 Subject color matching method and mobile terminal
CN104309300B (en) * 2014-11-01 2017-05-24 广东理想彩色印务有限公司 Computer coloring method for color printing ink

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102047293A (en) * 2008-04-21 2011-05-04 威仕达品特技术有限公司 System and method for automatically generating color scheme variations
CN102768625A (en) * 2011-05-06 2012-11-07 北京新媒传信科技有限公司 Resurfacing method and device of Windows user interface
CN103024354A (en) * 2012-12-11 2013-04-03 华为技术有限公司 Method and device for color matching
CN104360796A (en) * 2014-12-08 2015-02-18 三星电子(中国)研发中心 Method and device for applying colors onto electronic equipment and electronic equipment
CN105278907A (en) * 2015-06-27 2016-01-27 维沃移动通信有限公司 Display method and mobile terminal
US10019848B2 (en) * 2015-07-31 2018-07-10 Adobe Systems Incorporated Edge preserving color smoothing of 3D models
CN105389403A (en) * 2015-12-29 2016-03-09 东软集团股份有限公司 Automatic matching method and system of page style
CN107229077A (en) * 2017-05-26 2017-10-03 陈波 Physical prospecting instrument and its profile imaging method
CN108280185A (en) * 2018-01-23 2018-07-13 武汉大学 A kind of map color effect preferred method that administrative map colours automatically

Also Published As

Publication number Publication date
CN109117135A (en) 2019-01-01

Similar Documents

Publication Publication Date Title
Cordeil et al. IATK: An immersive analytics toolkit
Bressert SciPy and NumPy: an overview for developers
Batty et al. Modelling inside GIS: Part 1. Model structures, exploratory spatial data analysis and aggregation
Gyulassy et al. A topological approach to simplification of three-dimensional scalar functions
WO2016155662A1 (en) Search processing method and apparatus
US20140279957A1 (en) Tabular data manipulation system and method
Dirksen Three. js essentials
US20140310681A1 (en) Assisted creation of control event
US9396249B1 (en) Methods and systems for encoding parent-child map tile relationships
CN108388509A (en) A kind of method for testing software, computer readable storage medium and terminal device
Jolly Hands-on data visualization with Bokeh: Interactive web plotting for Python using Bokeh
CN109117135B (en) Method and device for determining color scheme
CN113010612A (en) Visual construction method, query method and device for graph data
US9071520B2 (en) Spatial representation of temporal value distributions
US9786073B2 (en) Geometric shape hierarchy determination to provide visualization context
Ryabinin et al. Novel Circular Graph Capabilities for Comprehensive Visual Analytics of Interconnected Data in Digital Humanities
Borkiewicz et al. Cinematic visualization of multiresolution data: Ytini for adaptive mesh refinement in houdini
CN110618463B (en) Nuclear magnetic resonance data inversion method, device, storage medium and equipment
US20150370879A1 (en) Graphical user interface for modeling data
CN113269206B (en) Color-embedded visual exploration method and system
US11893691B2 (en) Point cloud geometry upsampling
Inselberg Visualization and knowledge discovery for high dimensional data
KR20140030229A (en) Mesh sequence file format
Dawkes et al. Vicki: the visualisation construction kit
Loaiza et al. Data cubes for earth system research: Challenges ahead

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant