CN112381905A - Color superposition method and device and electronic equipment - Google Patents

Color superposition method and device and electronic equipment Download PDF

Info

Publication number
CN112381905A
CN112381905A CN202011386926.0A CN202011386926A CN112381905A CN 112381905 A CN112381905 A CN 112381905A CN 202011386926 A CN202011386926 A CN 202011386926A CN 112381905 A CN112381905 A CN 112381905A
Authority
CN
China
Prior art keywords
color
value
values
color values
area
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.)
Pending
Application number
CN202011386926.0A
Other languages
Chinese (zh)
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.)
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Beijing Guangqiyuan Digital Technology Co 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 Beijing Guangqiyuan Digital Technology Co ltd filed Critical Beijing Guangqiyuan Digital Technology Co ltd
Priority to CN202011386926.0A priority Critical patent/CN112381905A/en
Publication of CN112381905A publication Critical patent/CN112381905A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Image Processing (AREA)

Abstract

The present application relates to the field of computer technologies, and in particular, to a color superimposing method and apparatus, and an electronic device. The color superimposing method provided by the present specification includes: displaying a color operation interface; the color operation interface comprises a first area and a second area; receiving at least two color values input through the first area and a calculation instruction input through the first area; displaying colors respectively corresponding to the input color values in the first area; performing superposition calculation on the at least two color values according to the calculation instruction to obtain superposed color values; and displaying the color corresponding to the superposition color value in the second area. Through the scheme of this specification, the user can carry out the colour value that superposes the calculation through colour operation interface input to can see the colour that the back colour value that superposes corresponds directly perceivedly, greatly improved user experience.

Description

Color superposition method and device and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a color superimposing method and apparatus, and an electronic device.
Background
Color is a visual effect on light produced by the eyes, brain and our life experience. The RGB color scheme is a color standard in the industry, and various colors are obtained by changing three color channels of red (R), green (G) and blue (B) and superimposing them on each other. The color value of an image refers to the color depth of a pixel point in the image, and if an image is a black-and-white image, the color value is a gray value, the range of the gray value is generally from 0 to 255, white is 255, and black is 0, so the black-and-white image is also called a gray image.
The color superposition generally refers to superposing two colors to synthesize a new color, and based on the method, the color superposition method which is more convenient and easier to operate is provided.
Disclosure of Invention
In view of this, embodiments of the present specification provide a color superimposing method, an apparatus, and an electronic device, so that when performing color superimposing, the color superimposing is more convenient and easier to operate.
The embodiment of the specification adopts the following technical scheme:
an embodiment of the present specification provides a color superimposing method, including:
displaying a color operation interface; the color operation interface comprises a first area and a second area;
receiving at least two color values input through the first area and a calculation instruction input through the first area; displaying colors respectively corresponding to the input color values in the first area;
performing superposition calculation on the at least two color values according to the calculation instruction to obtain superposed color values; and displaying the color corresponding to the superposition color value in the second area.
An embodiment of the present specification further provides a color superimposing apparatus, including:
the display module is used for displaying a color operation interface; the color operation interface comprises a first area and a second area;
the receiving module is used for receiving at least two color values input through the first area and a calculation instruction input through the first area;
the processing module is used for performing superposition calculation on the at least two color values according to the calculation instruction to obtain superposed color values;
the processing module is further used for enabling the display module to display colors corresponding to the input color values in the first area; and causing the display module to display a color corresponding to the superimposed color value in the second area.
An embodiment of the present specification further provides an electronic device, including: at least one processor and a memory, the memory storing a program and configured to execute the above-described color superimposition method by the at least one processor.
The present specification also provides a computer-readable storage medium storing computer-executable instructions, which when executed by a processor implement the color superimposition method described above.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects: the scheme of this specification provides a color operation interface, and the user can input the colour value that needs to carry out the stack calculation through this color operation interface to can see the colour that the back colour value corresponds of stack directly perceivedly, greatly improved user experience.
Drawings
In order to more clearly illustrate the embodiments of the present specification 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 described below, it is obvious that the drawings in the following description are only some embodiments described in the specification, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise:
fig. 1 is a main flowchart of a color superimposing method provided in an embodiment of the present specification;
FIG. 2 is a schematic diagram of a color operation interface of a color superposition method provided in an embodiment of the present disclosure;
fig. 3 is a block diagram of a color superimposing apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, 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 obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
In one or more embodiments of the present specification, the color superimposition method of the present specification may be implemented by a user through a terminal (which may be regarded as an operation device used by the user). The terminal may be used as an execution subject of the color superimposition method, and may include but is not limited to: smart phones, smart watches, tablet computers, and the like. In a possible implementation manner, the color superimposing method provided in this specification may also be implemented on the server side, that is, the server is taken as an execution subject, and these should not be construed as limitations of the present application.
The method of the present specification will be described in detail below with reference to a terminal as an execution subject. Referring to fig. 1, fig. 1 is a main flowchart of a color superimposing method provided in an embodiment of the present specification. As shown in fig. 1, the color superimposition method provided by the present specification includes:
s110: and displaying a color operation interface.
In this step, the terminal has a display screen for displaying a color operation interface. One example is that when the user opens the terminal, the terminal automatically displays the color operation interface; as another example, after the user opens the corresponding APP installed on the terminal, the color operation interface may be displayed on the display screen of the terminal, or the processor of the terminal may cause the display screen to display the color operation interface according to a certain trigger operation of the user on the terminal, and the implementation manner of displaying the color superimposition interface on the terminal does not form a limitation to the present application.
Referring to fig. 2, fig. 2 is a schematic view of a color operation interface of a color superimposition method provided in an embodiment of the present specification. As shown in fig. 2, the color manipulation interface of the present specification includes a first region (in fig. 2, a region of a broken line frame in an upper half portion of the interface) and a second region (in fig. 2, a region of a broken line frame in a lower half portion of the interface). The user can input the color value to be superimposed and a calculation instruction through the first area of the color operation interface, and the second area of the color operation interface can be used for displaying the color obtained after the superimposition. See in particular the subsequent steps.
S120: receiving at least two color values input through the first area and a calculation instruction input through the first area; and displaying colors respectively corresponding to the input color values in the first area.
In this step, the user may input the color value in the first area in the following two ways:
one way is that: a user may input a color selection instruction through the first area of the color operation interface, for example, after the user clicks a position of "color one", "color two", or "color three" in fig. 2, the terminal (e.g., a processor on the terminal) receives the corresponding color selection instruction, and further, the color selection instruction causes the display to display the color selection board on the display. The color-taking plate is preset, and the specification does not explain the color-taking plate in detail. After the color selecting plate is displayed on the color operation interface, a user can select a required color on the color selecting plate, and after a certain color is selected, the terminal receives the selected color value in the color selecting plate.
The other mode is as follows: the user may manually input the corresponding color value through the first region of the color manipulation interface, for example, input a hexadecimal value representing the corresponding color in the manual input region of the first region (the positions respectively located to the right of "color one", "color two", and "color three" in fig. 2), such as "FF 0000 DD", "00 FF 0044" in fig. 2. After the color value is manually input by the user, the terminal acquires the color value manually input by the user, further verifies whether the color value is in a preset format, receives the color value if the verification result is in the preset format, and sends out error prompt information if the verification result is not in the preset format. The preset format may be various, such as: with # hexadecimal color, decimal RGBA color, HSB, HSV, HSL, etc.
It should be noted that, in this step, at least two color values input through the first area are generally received, and the first area of the color operation interface in this example displays an input area with three color values, that is, a person skilled in the art may input three color values in the first area, and may also input two color values in the first area. In addition, a person skilled in the art may also set more than three color value input areas in the first area of the color operation interface according to actual needs, which do not form a limitation to the present application.
It should be further noted that, when the user inputs the selected color through the color-taking plate, the format of the color-taking plate is also the preset format because the color-taking plate is preset, and at this time, the format verification of the color value is not required; when a user manually inputs a color value, because the manual input has a subjective input condition, format verification needs to be performed on the input color value, and once the input format is wrong, an error prompt is sent out to prompt the user to re-input a correct format.
It should be further noted that the color values received by the terminal further include transparency values. For example, when a color value selected from the color-taking plate is received by the terminal, the color value contains a transparency value; when a user manually inputs a color value, the color value may have a transparency value (e.g. the transparency value "DD" in FF0000 DD) or may only input a color value of a transparency value (in this case, the color value only contains red, green and blue values, i.e. such as "FF", "00" and "00" in FF0000 DD), and then input a corresponding transparency value in the transparency value input frame of the first area. The input frame at the rightmost side of the first area in fig. 2 may input a corresponding transparency value, or may adjust the transparency value by sliding a cursor in the input frame of the transparency value, which is not limited in this specification.
Further, in this step, after the terminal receives the color values input through the color operation interface, colors corresponding to the input color values are displayed in the first area. For example, whether the user manually inputs color values or selects color values through the palette, the first region (within the leftmost color box of the first region in fig. 2) displays colors corresponding to the respective color values. Therefore, a user can visually see the specific color corresponding to the color value to be superposed.
In this step, after the at least two color values to be superimposed are input through the color operation interface, the user may input a calculation instruction through the first area, for example, input a corresponding calculation instruction through the "calculation" icon in fig. 2, and the terminal receives the corresponding calculation instruction.
S130: performing superposition calculation on the at least two color values according to the calculation instruction to obtain superposed color values; and displaying the color corresponding to the superposition color value in the second area.
In this step, performing superposition calculation on the at least two color values according to the calculation instruction includes: according to a preset algorithm, the first two color values are subjected to superposition calculation, the calculation result is used as a new color value to be subjected to superposition calculation with the next color value, and the like until the new color value obtained after all the color values are subjected to superposition calculation is used as a superposition color value.
Specifically, if the number of the color values received by the terminal is two, performing superposition calculation on the two color values according to a preset algorithm to obtain a first calculation result, and taking the first calculation result as a superposition color value; if the number of the colors received by the terminal is three, firstly performing superposition calculation on the first color value and the second color value according to a preset algorithm to obtain a first calculation result, then performing superposition calculation on the first calculation result and the third color value according to the preset algorithm to obtain a second calculation result, and taking the second calculation result as a superposition color value; and if the number of the observed and received colors is four, performing superposition calculation on the second calculation result and the fourth color value according to a preset algorithm to obtain a third calculation result, and taking the third calculation result as a superposition color value. And analogizing in sequence, regardless of the number of input color values, performing superposition calculation on the first two color values, and performing superposition calculation on the result of the superposition calculation with the last color value until the final superposition color value is obtained after the superposition calculation of the last color value.
The preset algorithm in this specification will be described in detail below by taking the superposition of the first color and the second color in fig. 2 as an example.
Firstly, the red, green, blue and transparency values in the two color values are respectively converted into numerical values between 0 and 1 according to a preset rule. For example, the hexadecimal system corresponding to the color one is FF0000DD, where the red value is FF, the green value is 00, the blue value is 00, and the transparency value is DD; the hexadecimal system corresponding to the color two is 00FF0044, wherein the red value is 00, the green value is FF, the blue value is 00, and the transparency value is 44; in the calculation, the values of red, green, blue and transparency are in the range of 0 to 1, which can be obtained by dividing the 10-ary color value by 255, so that the value in the range of 0 to 1 corresponding to each of the values of red, green, blue and transparency can be obtained.
And then, respectively calculating the red, green, blue and transparency values in the superposed color values obtained by superposing the first color and the second color according to the following formula:
C1=(c1*a1*(1.0-a2)+c2*a2)/(a1+a2-a1*a2);
D1=(d1*a1*(1.0-a2)+d2*a2)/(a1+a2-a1*a2);
E1=(e1*a1*(1.0-a2)+e2*a2)/(a1+a2-a1*a2);
A1=a1+a2-a1*a2
wherein, a1、a2Respectively the transparency values of the two color values; c. C1、c2Respectively is a red value in the two color values; d1、d2Respectively green values in the two color values; e.g. of the type1、e2Respectively a blue value in the two color values; c1The red value in the new color value; d1Green values in the new color values; e1The blue value in the new color value; a. the1Is the transparency value in the new color value.
The superimposed color value obtained according to the above algorithm is "# B34B00E 6" (the color value obtained by superimposing a plurality of colors may also be of another type, that is, the color value obtained by the present scheme supports a plurality of types of color values), which is shown in fig. 2, and further, the color corresponding to the superimposed color value is displayed in the second area of the color operation interface. The calculation result is provided with "#", and a person skilled in the art may or may not carry "#" when manually inputting a color value, which is not limited in the present specification.
In the algorithm, when superposition calculation is performed, a color value is divided into four parts, a red value, a green value, a blue value and a transparency value are calculated respectively, then a calculation result is used as a new color value, and the red value, the green value, the blue value and the transparency value in each color value are converted into numerical values between 0 and 1, namely, four numerical values are used for representing one color, so that superposition calculation of colors with different formats is supported. It should be noted that no matter what format the received color value is, as long as it meets the requirement of the preset format, when the received color value contains a plurality of different formats, the method will convert the values of the different formats into a decimal between 0 and 1.
In addition, it should be noted that, if the color value manually input by the user has a transparency value, and a corresponding transparency value is also input in the transparency value input frame of the first area, at this time, when performing the superposition calculation on the two colors, the transparency value input in the transparency value input frame is preferentially used. That is, if the transparency value is not input in the transparency value input frame, the transparency value in the color value is calculated; and if the corresponding transparency value is input into the transparency value input frame, calculating by using the transparency value input into the input frame.
By the method, the user can input the color value to be superposed and calculated through the color operation interface, and the color corresponding to the superposed color value can be visually seen, so that the user experience is greatly improved. In addition, the method provided in the present specification does not limit the number of superimposed colors, and can perform superimposition calculation for any plurality of colors. Moreover, any color value conforming to the preset format is converted into a numerical range between 0 and 1 for calculation during calculation, and the preset format can contain color values in various different formats, so that the method supports superposition calculation of colors in different formats.
Based on the same thought, this specification also provides a color superimposing apparatus. Referring to fig. 3, fig. 3 is a block diagram of a color superimposing apparatus according to an embodiment of the present disclosure. As shown in fig. 3, the apparatus includes:
the display module 301, the display module 301 is configured to display a color operation interface; the color operation interface comprises a first area and a second area;
a receiving module 302, wherein the receiving module 302 is configured to receive at least two color values input through the first area and a calculation instruction input through the first area;
the processing module 303, the processing module 303 performs superposition calculation on the at least two color values according to the calculation instruction to obtain a superposed color value;
the processing module 303 is further configured to enable the display module 301 to display colors corresponding to the input color values in the first area; and causing the display module 301 to display a color corresponding to the superimposed color value in the second area.
Optionally, the receiving module 302 is specifically configured to: receiving a color selection instruction input through the first area, and displaying a preset color taking plate according to the color selection instruction; and receiving the selected at least two color values in the color sampling plate.
Optionally, the receiving module 302 is specifically configured to: acquiring at least two color values manually input through the first region; respectively checking whether the at least two color values are in a preset format; if yes, receiving a color value passing the verification; otherwise, sending input error prompt information to the color value which is not verified.
Further, each of the color values also includes a transparency value manually entered through the first region.
Optionally, the processing module 303 is specifically configured to: according to a preset algorithm, the first two color values are subjected to superposition calculation, the calculation result is used as a new color value to be subjected to superposition calculation with the next color value, and by analogy, the new color value obtained after all the color values are subjected to superposition calculation is used as a superposition color value.
Further, the preset algorithm is as follows: respectively converting the red, green, blue and transparency values in the two color values into numerical values between 0 and 1 according to a preset rule; calculating new color values obtained after the two color values are superposed according to the following formula:
C1=(c1*a1*(1.0-a2)+c2*a2)/(a1+a2-a1*a2);
D1=(d1*a1*(1.0-a2)+d2*a2)/(a1+a2-a1*a2);
E1=(e1*a1*(1.0-a2)+e2*a2)/(a1+a2-a1*a2);
A1=a1+a2-a1*a2
wherein, a1、a2Respectively the transparency values of the two color values; c. C1、c2Respectively is a red value in the two color values; d1、d2Respectively green values in the two color values; e.g. of the type1、e2Respectively a blue value in the two color values; c1The red value in the new color value; d1Green values in the new color values; e1The blue value in the new color value; a. the1Is the transparency value in the new color value.
For a specific example of the apparatus, reference is made to the above description of the method, which is not repeated here.
Based on the same concept, the present specification also provides an electronic device, including: at least one processor and a memory, the memory storing a program and configured to execute the above-described color superimposition method by the at least one processor.
Based on the same concept, the present specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the color superimposition method described above.
While certain embodiments of the present disclosure have been described above, other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily have to be in the particular order shown or in sequential order to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
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 the other embodiments. In particular, for the apparatus, device, and non-volatile computer-readable storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to the description, reference may be made to some portions of the description of the method embodiments.
The apparatus, the device, the nonvolatile computer readable storage medium, and the method provided in the embodiments of the present specification correspond to each other, and therefore, the apparatus, the device, and the nonvolatile computer storage medium also have similar advantageous technical effects to the corresponding method.
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 making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. 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.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. 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 systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, the present specification embodiments may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory 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 disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
This description 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 specification 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.
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 the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (14)

1. A method of color superimposition, the method comprising:
displaying a color operation interface; the color operation interface comprises a first area and a second area;
receiving at least two color values input through the first area and a calculation instruction input through the first area; displaying colors respectively corresponding to the input color values in the first area;
performing superposition calculation on the at least two color values according to the calculation instruction to obtain superposed color values; and displaying the color corresponding to the superposition color value in the second area.
2. The method of claim 1, receiving at least two color values input through the first region, comprising:
receiving a color selection instruction input through the first area, and displaying a preset color taking plate according to the color selection instruction;
receiving the selected at least two color values in the color palette.
3. The method of claim 1, receiving at least two color values input through the first region, comprising:
acquiring at least two color values manually input through the first region;
respectively checking whether the at least two color values are in a preset format;
if yes, receiving a color value passing the verification; otherwise, sending input error prompt information to the color value which is not verified.
4. The method of claim 3, each of the color values further comprising a transparency value manually entered through the first region.
5. The method of any of claims 1 to 4, the performing a superposition calculation on the at least two color values according to the calculation instruction, comprising:
according to a preset algorithm, the first two color values are subjected to superposition calculation, the calculation result is used as a new color value to be subjected to superposition calculation with the next color value, and by analogy, the new color value obtained after all the color values are subjected to superposition calculation is used as a superposition color value.
6. The method of claim 5, the preset algorithm is as follows:
respectively converting the red, green, blue and transparency values in the two color values into numerical values between 0 and 1 according to a preset rule;
calculating new color values obtained after the two color values are superposed according to the following formula:
C1=(c1*a1*(1.0-a2)+c2*a2)/(a1+a2-a1*a2);
D1=(d1*a1*(1.0-a2)+d2*a2)/(a1+a2-a1*a2);
E1=(e1*a1*(1.0-a2)+e2*a2)/(a1+a2-a1*a2);
A1=a1+a2-a1*a2
wherein, a1、a2Respectively the transparency values of the two color values; c. C1、c2Respectively is a red value in the two color values; d1、d2Respectively green values in the two color values; e.g. of the type1、e2Respectively a blue value in the two color values; c1The red value in the new color value; d1Green values in the new color values; e1The blue value in the new color value; a. the1Is the transparency value in the new color value.
7. A color superimposing apparatus, the apparatus comprising:
the display module is used for displaying a color operation interface; the color operation interface comprises a first area and a second area;
the receiving module is used for receiving at least two color values input through the first area and a calculation instruction input through the first area;
the processing module is used for performing superposition calculation on the at least two color values according to the calculation instruction to obtain superposed color values;
the processing module is further used for enabling the display module to display colors corresponding to the input color values in the first area; and causing the display module to display a color corresponding to the superimposed color value in the second area.
8. The apparatus of claim 7, the receiving module being specifically configured to:
receiving a color selection instruction input through the first area, and displaying a preset color taking plate according to the color selection instruction; and receiving the selected at least two color values in the color sampling plate.
9. The apparatus of claim 7, the receiving module being specifically configured to:
acquiring at least two color values manually input through the first region;
respectively checking whether the at least two color values are in a preset format;
if yes, receiving a color value passing the verification; otherwise, sending input error prompt information to the color value which is not verified.
10. The apparatus of claim 9, each of the color values further comprising a transparency value manually entered through the first region.
11. The apparatus according to any one of claims 7 to 10, the processing module being specifically configured to:
according to a preset algorithm, the first two color values are subjected to superposition calculation, the calculation result is used as a new color value to be subjected to superposition calculation with the next color value, and by analogy, the new color value obtained after all the color values are subjected to superposition calculation is used as a superposition color value.
12. The apparatus of claim 11, the preset algorithm is as follows:
respectively converting the red, green, blue and transparency values in the two color values into numerical values between 0 and 1 according to a preset rule;
calculating new color values obtained after the two color values are superposed according to the following formula:
C1=(c1*a1*(1.0-a2)+c2*a2)/(a1+a2-a1*a2);
D1=(d1*a1*(1.0-a2)+d2*a2)/(a1+a2-a1*a2);
E1=(e1*a1*(1.0-a2)+e2*a2)/(a1+a2-a1*a2);
A1=a1+a2-a1*a2
wherein, a1、a2Respectively the transparency values of the two color values; c. C1、c2Respectively is a red value in the two color values; d1、d2Respectively green values in the two color values; e.g. of the type1、e2Respectively a blue value in the two color values; c1The red value in the new color value; d1Green values in the new color values; e1The blue value in the new color value; a. the1Is the transparency value in the new color value.
13. An electronic device, comprising: at least one processor and a memory, the memory storing a program and configured to perform the color superimposition method of any one of claims 1-6 by the at least one processor.
14. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the color overlay method of any one of claims 1 to 6.
CN202011386926.0A 2020-12-01 2020-12-01 Color superposition method and device and electronic equipment Pending CN112381905A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011386926.0A CN112381905A (en) 2020-12-01 2020-12-01 Color superposition method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011386926.0A CN112381905A (en) 2020-12-01 2020-12-01 Color superposition method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112381905A true CN112381905A (en) 2021-02-19

Family

ID=74590218

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011386926.0A Pending CN112381905A (en) 2020-12-01 2020-12-01 Color superposition method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112381905A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578798A (en) * 2023-04-25 2023-08-11 之江实验室 Page contrast automatic calibration optimization method

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930512A (en) * 2009-06-25 2010-12-29 鸿富锦精密工业(深圳)有限公司 Password protection method
CN102521820A (en) * 2011-12-22 2012-06-27 张著岳 Object picture display method with dynamic fusion of background and display method thereof
CN103310417A (en) * 2013-05-30 2013-09-18 新奥特(北京)视频技术有限公司 Method and device for mixing particles
CN103327260A (en) * 2013-05-30 2013-09-25 新奥特(北京)视频技术有限公司 Method and device for editing particles
CN103366350A (en) * 2013-07-23 2013-10-23 厦门美图网科技有限公司 Method for supplementing light for digital image
CN103793174A (en) * 2014-02-11 2014-05-14 厦门美图网科技有限公司 Scrawling method for image
CN104850432A (en) * 2015-04-29 2015-08-19 小米科技有限责任公司 Method and device for adjusting color
US20170039691A1 (en) * 2015-08-05 2017-02-09 Ricoh Company, Ltd. Image processing apparatus, image processing method and storage medium
US20170110089A1 (en) * 2015-10-15 2017-04-20 Lenovo (Singapore) Pie. Ltd. Presentation of images on display based on user-specific color value(s)
CN107203371A (en) * 2016-03-16 2017-09-26 北京神州泰岳软件股份有限公司 A kind of RGB shading process and device
CN107422937A (en) * 2017-04-18 2017-12-01 广州视睿电子科技有限公司 Method, device, equipment and storage medium for taking color on graphical user interface
CN107908433A (en) * 2017-11-17 2018-04-13 平安科技(深圳)有限公司 Verify method, apparatus, equipment and the computer-readable recording medium of input content
CN108334477A (en) * 2018-01-30 2018-07-27 深圳壹账通智能科技有限公司 Implementation method, device, computer equipment and the storage medium of Intelligent file
CN109726302A (en) * 2018-12-10 2019-05-07 广州景骐科技有限公司 Mask method, device, computer equipment and the storage medium of image
CN109903347A (en) * 2017-12-08 2019-06-18 北大方正集团有限公司 A kind of colour-mixed method, system, computer equipment and storage medium
CN110264548A (en) * 2019-06-27 2019-09-20 重庆佳渝测绘有限公司 A kind of attributive character information space analysis method of land data
CN110264547A (en) * 2019-06-24 2019-09-20 重庆佳渝测绘有限公司 A kind of translucent display methods of land data based on map overlay
CN111222611A (en) * 2020-01-18 2020-06-02 江苏提米智能科技有限公司 Stacking type three-dimensional code encoding method, encoding device, decoding method, decoding device and storage medium based on colors

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930512A (en) * 2009-06-25 2010-12-29 鸿富锦精密工业(深圳)有限公司 Password protection method
CN102521820A (en) * 2011-12-22 2012-06-27 张著岳 Object picture display method with dynamic fusion of background and display method thereof
CN103310417A (en) * 2013-05-30 2013-09-18 新奥特(北京)视频技术有限公司 Method and device for mixing particles
CN103327260A (en) * 2013-05-30 2013-09-25 新奥特(北京)视频技术有限公司 Method and device for editing particles
CN103366350A (en) * 2013-07-23 2013-10-23 厦门美图网科技有限公司 Method for supplementing light for digital image
CN103793174A (en) * 2014-02-11 2014-05-14 厦门美图网科技有限公司 Scrawling method for image
CN104850432A (en) * 2015-04-29 2015-08-19 小米科技有限责任公司 Method and device for adjusting color
US20170039691A1 (en) * 2015-08-05 2017-02-09 Ricoh Company, Ltd. Image processing apparatus, image processing method and storage medium
US20170110089A1 (en) * 2015-10-15 2017-04-20 Lenovo (Singapore) Pie. Ltd. Presentation of images on display based on user-specific color value(s)
CN107203371A (en) * 2016-03-16 2017-09-26 北京神州泰岳软件股份有限公司 A kind of RGB shading process and device
CN107422937A (en) * 2017-04-18 2017-12-01 广州视睿电子科技有限公司 Method, device, equipment and storage medium for taking color on graphical user interface
CN107908433A (en) * 2017-11-17 2018-04-13 平安科技(深圳)有限公司 Verify method, apparatus, equipment and the computer-readable recording medium of input content
CN109903347A (en) * 2017-12-08 2019-06-18 北大方正集团有限公司 A kind of colour-mixed method, system, computer equipment and storage medium
CN108334477A (en) * 2018-01-30 2018-07-27 深圳壹账通智能科技有限公司 Implementation method, device, computer equipment and the storage medium of Intelligent file
CN109726302A (en) * 2018-12-10 2019-05-07 广州景骐科技有限公司 Mask method, device, computer equipment and the storage medium of image
CN110264547A (en) * 2019-06-24 2019-09-20 重庆佳渝测绘有限公司 A kind of translucent display methods of land data based on map overlay
CN110264548A (en) * 2019-06-27 2019-09-20 重庆佳渝测绘有限公司 A kind of attributive character information space analysis method of land data
CN111222611A (en) * 2020-01-18 2020-06-02 江苏提米智能科技有限公司 Stacking type three-dimensional code encoding method, encoding device, decoding method, decoding device and storage medium based on colors

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
乌合之众: ""RGBA alpha透明度混合算法实现和测试", 《HTTPS://WWW.CNBLOGS.COM/OLOROSO/P/10724803.HTML》, pages 1 - 7 *
王恩永 等: "基于语义的手机图像颜色提取方法", 《计算机工程》, vol. 35, no. 22, pages 251 - 255 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578798A (en) * 2023-04-25 2023-08-11 之江实验室 Page contrast automatic calibration optimization method
CN116578798B (en) * 2023-04-25 2024-04-12 之江实验室 Page contrast automatic calibration optimization method

Similar Documents

Publication Publication Date Title
CN109192054B (en) Data processing method and device for map region merging
US20150301731A1 (en) User interface apparatus
CN107025480B (en) Image generation method and apparatus thereof
US8930810B2 (en) User interface (UI) color scheme generation and management according to visual consistency of visual attributes in the color scheme
CN108021671B (en) Page transparent processing method and device
CN106484080B (en) Display interface display method, device and equipment
US20150110419A1 (en) Method and device for image processing
US20160180558A1 (en) Display apparatus and controlling method
CN104808959B (en) Information processing method and electronic equipment
EP4322109A1 (en) Green screen matting method and apparatus, and electronic device
CN110806847A (en) Distributed multi-screen display method, device, equipment and system
CN107766421A (en) Information displaying method, device and electronic equipment
CN112381905A (en) Color superposition method and device and electronic equipment
US11282064B2 (en) Method and apparatus for displaying identification code of application
US20140325404A1 (en) Generating Screen Data
CN111787240A (en) Video generation method, device and computer readable storage medium
CN117372578A (en) Animation generation method and device, storage medium and electronic equipment
CN108010095B (en) Texture synthesis method, device and equipment
CN114237795B (en) Terminal interface display method and device, electronic equipment and readable storage medium
CN111199565A (en) Data processing method, device, system, electronic equipment and storage medium
CN114356324A (en) Interface processing method, device, equipment and storage medium
CN113986176A (en) Color display method and device, electronic equipment and readable medium
KR101807229B1 (en) Accelerated super-resolution processing method for TV video images, accelerated super-resolution processing device for TV video images that is used in same method, first to sixth accelerated super-resolution processing programs, and first to second storage media
CN112748917B (en) Graph display method and device
CN108053436B (en) Picture processing method and device, electronic equipment and picture server

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
TA01 Transfer of patent application right

Effective date of registration: 20220713

Address after: 100190 Beijing Haidian District Zhichun Road 49 No. 3 West 309

Applicant after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd.

Address before: 100102 rooms 1901-1903, 19th floor, building 19, District 7, Wangjing East Garden, Chaoyang District, Beijing

Applicant before: Beijing Guangqiyuan Digital Technology Co.,Ltd.

TA01 Transfer of patent application right