Color changing method and apparatus in game, and electronic device

By introducing a color palette editing interface in the game editor, players are allowed to generate custom color combinations and automatically apply them to the dyeing areas of scene components, solving the problem of cumbersome color adjustment operations in the existing technology, and improving color change efficiency and player experience.

WO2024260253A9PCT designated stage expired Publication Date: 2025-06-26NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/097345
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-22
Filing Date
2024-06-04
Publication Date
2025-06-26

AI Technical Summary

Technical Problem

In the game editor, players need to adjust the color of the dyed area in the component one by one, which is cumbersome, resulting in low color adjustment efficiency of the component and affecting the player's gaming experience.

Method used

Provides a color change method in the game, displaying the color palette editing interface through the graphical user interface, including uploading picture controls and main color display area, players can generate custom color combinations and automatically configure the color of the scene component's dyeing area according to the color combination.

Benefits of technology

Simplifies component color change operations, improves component color change efficiency, and improves player gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024097345_26062025_PF_FP_ABST
    Figure CN2024097345_26062025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides a color changing method and apparatus in a game, and an electronic device. The method comprise: displaying a color panel editing interface comprising a picture uploading control and a main hue display area; inputting a target picture into the picture uploading control, extracting the color of the target picture, and on the basis of the extracted target colors, configuring the colors corresponding to color block identifiers in the main hue display area; in response to a storage operation, generating and storing a first color matching combination, wherein the first color matching combination comprises sorting serial numbers of a first preset number of color block identifiers and target colors corresponding to the color block identifiers; and in response to an application instruction for the first color matching combination, and on the basis of the colors in the first color matching combination, configuring colors for dyeing areas in scene assemblies. In the method, a player can generate customized color matching combinations by means of the color panel editing interface, and can perform overall color changing on dyeing areas in scene assemblies by means of the customized color matching combinations, so that the color changing efficiency and degree of freedom of the assemblies are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Color changing method, device and electronic device in game

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This disclosure claims priority to Chinese patent application number 202310744969.9, filed on June 22, 2023, entitled “Color Changing Method, Device and Electronic Device in Games”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present disclosure relates to the technical field of game interaction design, and in particular to a method, device, and electronic device for changing color in a game. Background Art

[0004] In the game editor, the color of components can be updated according to player needs. Usually, each component corresponds to at least one dyeing area, and the player can adjust the color corresponding to one dyeing area in the component at a time. If the player wants to update the colors of multiple components, this method is cumbersome, resulting in low component color adjustment efficiency and affecting the player's gaming experience.

[0005] Summary of the Invention

[0006] The purpose of the present disclosure is to provide a color changing method, device and electronic device in a game to simplify the component color changing operation, improve the component color changing efficiency, and thus enhance the player's gaming experience.

[0007] In a first aspect, the present disclosure provides a method for changing colors in a game, the method comprising: displaying a graphical user interface by running a game program, the graphical user interface including a game editing scene to be edited, the game editing scene including a plurality of scene components, wherein the scene component includes at least one dyeing area, the dyeing area is used to configure a color for the scene component, and the at least one dyeing area is respectively configured with a corresponding area number; displaying a color palette editing interface in the graphical user interface; wherein the color palette editing interface includes an upload image control and a main color display area, the main color display area includes a first preset number of color block identifiers, and different color block identifiers are respectively configured with corresponding sorting numbers; in response to the upload image control Input a target image, perform color extraction on the target image, obtain a second preset number of target colors, and configure the color corresponding to the color block identifier in the main color display area according to the second preset number of target colors; in response to the save operation, generate and save a first color combination; wherein, the first color combination includes: the sorting sequence numbers of the first preset number of color block identifiers, and the target colors corresponding to the color block identifiers; in response to an application instruction for the first color combination, determine the color block identifier corresponding to the dyeing area according to the area number of the dyeing area in the scene component and the sorting sequence number of the color block identifier, and configure the color for the dyeing area in the scene component according to the target color corresponding to the color block identifier in the first color combination.

[0008] In a second aspect, the present disclosure provides a color-changing device in a game, the device comprising: a scene display module, configured to execute a graphical user interface displayed by running a game program, the graphical user interface comprising a game editing scene to be edited, the game editing scene comprising a plurality of scene components, wherein the scene component comprises at least one dyeing area, the dyeing area being used to configure a color for the scene component, and at least one dyeing area being respectively configured with a corresponding area number; an interface display module, configured to execute displaying a color palette editing interface in the graphical user interface; wherein the color palette editing interface comprises an upload image control and a main color display area, the main color display area comprising a first preset number of color block identifiers, and different color block identifiers are respectively configured with corresponding sorting numbers; a color extraction module, configured to execute a response A target image should be input in the uploaded image control, and color extraction should be performed on the target image to obtain a second preset number of target colors, and the color corresponding to the color block identifier in the main color display area should be configured according to the second preset number of target colors; the color generation module is configured to execute a response to the save operation, generate and save a first color combination, and the first color combination includes: the sorting numbers of the first preset number of color block identifiers, and the target colors corresponding to the color block identifiers; the component color changing module is configured to execute a response to the application instruction for the first color combination, determine the color block identifier corresponding to the dyeing area according to the area number of the dyeing area in the scene component and the sorting number of the color block identifier, and configure the color for the dyeing area in the scene component according to the target color corresponding to the color block identifier in the first color combination.

[0009] In a third aspect, the present disclosure provides an electronic device comprising a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the color-changing method in the above-mentioned game.

[0010] In a fourth aspect, the present disclosure provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the color-changing method in the above-mentioned game.

[0011] The embodiments of the present disclosure bring the following beneficial effects:

[0012] The present disclosure provides a color-changing method, device, and electronic device in a game, which display a color palette editing interface in a graphical user interface; wherein the color palette editing interface includes an image upload control and a main color display area, the main color display area includes a first preset number of color block identifiers, and different color block identifiers are respectively configured with corresponding sorting numbers; then, in response to inputting a target image in the image upload control, color extraction is performed on the target image to obtain a second preset number of target colors, and according to the second preset number of target colors, colors corresponding to the color block identifiers in the main color display area are configured; then, in response to a save operation, a first color combination is generated and saved; wherein the first color combination includes: sorting numbers of a first preset number of color block identifiers, and target colors corresponding to the color block identifiers; in response to an application instruction for the first color combination, the color block identifier corresponding to the dyeing area in the scene component is determined according to the area number of the dyeing area in the scene component and the sorting number of the color block identifier, and the color of the dyeing area in the scene component is configured according to the target color corresponding to the color block identifier in the first color combination. In this method, players can generate custom color combinations through the color palette editing interface, thereby increasing the freedom of color combination settings; at the same time, players can use custom color combinations to change the overall color of the dyed area in the scene component, improving the efficiency of component color change.

[0013] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by practicing the above-mentioned technology of the present disclosure.

[0014] In order to make the above-mentioned objects, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically listed below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the following briefly introduces the drawings required for use in the specific embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] FIG1 is a flow chart of a color changing method in a game provided by an embodiment of the present disclosure;

[0017] FIG2 is a schematic diagram showing a display of a first editing window provided by an embodiment of the present disclosure;

[0018] FIG3 is a schematic diagram showing a display of a color palette editing interface provided by an embodiment of the present disclosure;

[0019] FIG4 is a schematic diagram showing a display of a color palette creation window provided in an embodiment of the present disclosure;

[0020] FIG5 is a schematic diagram showing a display after a color palette creation control is triggered according to an embodiment of the present disclosure;

[0021] FIG6 is a display diagram of a color adjustment panel provided in an embodiment of the present disclosure;

[0022] FIG7 is a flow chart of a color changing method in a game provided by an embodiment of the present disclosure;

[0023] FIG8 is a schematic diagram showing a display of a color palette selection list provided by an embodiment of the present disclosure;

[0024] FIG9 is a flow chart of a color changing method in a game provided by an embodiment of the present disclosure;

[0025] FIG10 is a schematic diagram of the structure of a color changing device in one of the games provided by an embodiment of the present disclosure;

[0026] FIG11 is a schematic structural diagram of one of the electronic devices provided in an embodiment of the present disclosure.

[0027] Icons: 1-First editing window; 2-Main color display area; 3-Secondary color display area; 4-Color palette selection control; 5-Color palette selection list; 6-Color display area. DETAILED DESCRIPTION

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present disclosure. Obviously, the described embodiments are only some of the embodiments of the present disclosure, but not all of them. Generally, the components of the embodiments of the present disclosure described and shown in the drawings herein can be arranged and designed in various different configurations.

[0029] Therefore, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the present disclosure as claimed, but merely represents selected embodiments of the present disclosure. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present disclosure without creative effort shall fall within the scope of protection of the present disclosure.

[0030] In one embodiment of the present disclosure, a color-changing method in a game can be executed on a local terminal device or a server. When the color-changing method in the game is executed on the server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0031] In an optional embodiment, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a gaming method based on cloud computing. In the cloud game operation mode, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the color change method in the game are completed on the cloud game server. The role of the client device is to receive and send data and present the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, TV, computer, PDA, etc.; but the cloud game server in the cloud is responsible for information processing. When playing the game, the player operates the client device to send operation instructions to the cloud game server. The cloud game server runs the game according to the operation instructions, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.

[0032] In an optional embodiment, taking a game as an example, a local terminal device stores a game program and is used to present the game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, conventionally downloading and installing the game program through an electronic device and running it. The local terminal device can provide the graphical user interface to the player in a variety of ways, for example, it can be rendered and displayed on the terminal's display screen, or provided to the player through holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present the graphical user interface, the graphical user interface includes the game screen, and the processor is used to run the game, generate the graphical user interface, and control the display of the graphical user interface on the display screen.

[0033] In a possible implementation, the present disclosure provides a method for changing colors in a game, as shown in FIG1 . The method includes the following specific steps:

[0034] Step S102, a graphical user interface is displayed by running the game program, wherein the graphical user interface includes a game editing scene to be edited, and the game editing scene includes multiple scene components, wherein the scene component includes at least one dyeing area, and the dyeing area is used to configure the color of the scene component, and at least one dyeing area is respectively configured with a corresponding area number.

[0035] In a specific implementation, the aforementioned game editing scene is a scene provided by the running game program, and can also be understood as a scene provided by the game editor. In the game editing scene, editable components can be edited, and the edited editable components are determined as scene components and set in the game editing scene. In actual application, when a player triggers a game editing command, the game editing scene can be displayed in the graphical user interface. The game editing command can be determined according to the game rules. For example, the editing command can be an operation to enter the game editor or an operation to select a scene map for editing.

[0036] In a specific embodiment, after the game editing scene is displayed in a graphical user interface, the scene component can be set in the game editing scene in the following manner: a first editing window is displayed in the graphical user interface; wherein the first editing window includes a plurality of editable components; in response to an editing operation on a target editable component among the plurality of editable components, the scene component corresponding to the target editable component is controlled to be generated in the game editing scene.

[0037] Specifically, the component type and component form of the editable components included in the first editing window can be set according to R&D requirements. As shown in Figure 2, a display diagram of a first editing window provided by an embodiment of the present invention is shown. The rectangular box corresponding to the number 1 in Figure 2 is the first editing window. The first editing window includes multiple different types of editable components, including: terrain components, mechanism components, decoration components and combination components, etc. Each type of editable component also contains multiple editable components. The mechanism components in Figure 2 also include motion mechanism components, functional mechanism components, logic components, object components and floor components, among which the key motion mechanisms also include cylinders, gears, cross gears, clockwise turntables, etc. The specific operations of the above-mentioned editing operations can be determined according to R&D requirements, and can also be determined according to the user's setting operations. For example, the editing operation can be an operation of dragging the target editable component to the game editing scene, or it can be an operation of clicking or long pressing the target editing component in the first editing window, etc.

[0038] In a specific implementation, the game editing scene includes multiple scene components, each of which includes at least one dyeing area. The dyeing area is used to configure the color of the scene component, and each dyeing area is configured with a corresponding area number. In the same scene component, different dyeing areas have different area numbers. The area numbers corresponding to the dyeing areas can be set according to R&D needs or user operations. For example, the area numbers corresponding to the dyeing areas can be user-defined, and the area numbers corresponding to the dyeing areas can also be determined based on the area ratio of the dyeing area in the scene component in which it is located (generally, the larger the area ratio, the smaller the area number).

[0039] In a specific embodiment, in a scene component, a dyeing area corresponds to a color channel; the color channel is used to store the color parameters of the dyeing area and update the color of the dyeing area according to the color parameters. Specifically, the dyeing area updates the color through the color parameters currently stored in the color channel, thereby updating the color of the scene component corresponding to the dyeing area. In an optional embodiment, the dyeing area of ​​the editable component corresponding to the scene component is pre-set during the component development stage, so the number of dyeing areas of the scene component included in the game editing scene, and the area corresponding to each dyeing area in the scene component are also set in advance. In an optional embodiment, the dyeing area of ​​the editable component corresponding to the scene component can be customized according to the user's setting instructions, that is, different areas on the editing component are set to different dyeing areas through user interaction.

[0040] In an optional embodiment, to quickly change the color of a scene component, the number of coloring regions corresponding to the scene component may be capped. This cap can be determined based on R&D requirements or user settings. For example, the cap may be four. If each scene component contains four coloring regions, then the scene component has four corresponding color channels. Each color channel can receive color parameters, which are in turn masks containing the corresponding colors.

[0041] In another optional embodiment, the scene component includes a dyeing area that can also be a fixed pattern, and the dyeing area cannot be customized. This method will correspond to the field of the editor color parameter in the material corresponding to the scene component, so that the scene component can be changed in color through the color parameter.

[0042] Step S104, displaying a color palette editing interface in a graphical user interface; wherein the color palette editing interface includes an image upload control and a main color display area, the main color display area includes a first preset number of color block identifiers, and different color block identifiers are respectively configured with corresponding sorting numbers.

[0043] In a specific implementation, a player can display a color palette editing interface in a graphical user interface by performing a designated trigger operation. The designated trigger operation can be determined according to R&D requirements. For example, the designated trigger operation can be an operation of clicking or long pressing a certain control in the graphical user interface, or an operation of triggering a certain area in the graphical user interface, etc. The color palette editing interface displays an upload image control and a main color display area. The main color display area includes a first preset number of color block identifiers. Different color block identifiers are respectively assigned corresponding sorting numbers. Different color block identifiers can display different colors. Players can also generate player-defined color combinations by configuring the colors of the color block identifiers. The color combination is used to configure the color of the dyed area of ​​the scene component in the game editing component.

[0044] The number of color block identifiers included in the main color display area can be a number preset by the system or a number customized by the player. Specifically, the first preset number can be 4 or 5, etc. Each color block identifier in the main color display area is configured with a corresponding sorting number, which can be customized by the player or preset by the system. At the same time, different color block identifiers correspond to different sorting numbers, and the sorting numbers corresponding to the color block identifiers are related to their display positions in the main color display area. For example, if there are 4 color block identifiers displayed side by side in the main color display area, the sorting number of the color block identifier with the first position is 1, the sorting number of the color block identifier with the second position is 2, the sorting number of the color block identifier with the third position is 3, and the sorting number of the color block identifier with the fourth position is 4.

[0045] Step S106, in response to inputting a target image in the upload image control, performing color extraction on the target image to obtain a second preset number of target colors, and configuring the colors corresponding to the color block identifiers in the main color display area according to the second preset number of target colors.

[0046] Players can upload a target image in the upload image control, and the target image can be any image input by the player. In specific implementation, when the player clicks the upload image control, the image resource manager will be called out. The image resource manager contains multiple images or photos. The player can select any one of them as the target image, and then click the confirm control to complete the upload of the target image. When the system receives the target image uploaded by the player, it will perform color extraction on the target image and extract a second preset number of target colors from the target image. After the extraction is completed, the target color is configured as the color corresponding to the color block mark in the main color display area. In some embodiments, after the target color is extracted, the target color can also be displayed in the color block mark in the main color display area.

[0047] The second preset number can be a system preset number or a player-defined number. For example, the second preset number can be 10 or 12. When the second preset number is a player-defined number, when color extraction is performed on the target image, the corresponding number of target colors can be extracted based on the player-defined number, thereby increasing the degree of freedom of color extraction. In a specific implementation, when color extraction is performed on the target image, the extracted target color can be any color contained in the target image, or a color that accounts for a relatively large proportion of the target image.

[0048] Step S108 , in response to the save operation, generating a first color combination; wherein the first color combination includes: sorting numbers of a first preset number of color block identifiers, and target colors corresponding to the color block identifiers.

[0049] The specific operation of the above-mentioned saving operation can be determined according to R&D requirements or user operations. For example, the saving operation can be an operation of clicking or long pressing the save control in the graphical user interface, or an operation of triggering a certain area in the graphical user interface, etc. After the player performs the saving operation, the first color combination generated based on the first preset number of target colors will be saved. The first color combination not only includes the sorting numbers of the first preset number of color block identifiers, but also includes the target color corresponding to each color block identifier. For example, if the first preset number is 4, then the first color combination may include: color 1 corresponding to the color block identifier with sorting number 1, color 2 corresponding to the color block identifier with sorting number 2, color 3 corresponding to the color block identifier with sorting number 3, and color 4 corresponding to the color block identifier with sorting number 4.

[0050] In an optional embodiment, the second preset number is greater than the first preset number, and the first color combination includes the second preset number of target colors, and the second preset number of target colors includes the first preset number of target colors. In this way, more replacement colors can be provided for the scene component through the first color combination.

[0051] It should be noted that the first color combinations mentioned below are all color combinations generated through the color palette editing interface. At the same time, the number of dyeing areas included in the scene component is usually less than the first preset number.

[0052] Step S110, in response to the application instruction for the first color combination, determines the color block identifier corresponding to the dyed area according to the area number of the dyed area in the scene component and the sorting sequence number of the color block identifier, and configures the color for the dyed area in the scene component according to the target color corresponding to the color block identifier in the first color combination.

[0053] The above-mentioned application instructions for the first color combination can be determined according to the game rules or the player's operation, which is not specifically limited here. When the player applies the first color combination, the area number of the dyed area in the scene component is matched with the sorting number of the color block identifier, and the target color in the first color combination corresponding to the color block identifier with the sorting number matching a certain area number is configured as the color of the dyed area corresponding to the area number. For example, the first color combination includes color 1 corresponding to the color block identifier with the sorting number 1, color 2 corresponding to the color block identifier with the sorting number 2, color 3 corresponding to the color block identifier with the sorting number 3, and color 4 corresponding to the color block identifier with the sorting number 4. The scene component includes dyed area 1 with area number 1 and dyed area 2 with area number 2. Then the color of dyed area 1 is configured as color 1 corresponding to the color block identifier with the sorting number 1, and the color of dyed area 2 is configured as color 2 corresponding to the color block identifier with the sorting number 2.

[0054] In the color-changing method in the above-mentioned game, players can generate custom color combinations through the color palette editing interface, thereby increasing the freedom of color combination settings; at the same time, players can use custom color combinations to change the overall color of the dyed area in the scene component, thereby improving the efficiency of component color changing.

[0055] The following embodiment focuses on the method of extracting colors from a target image.

[0056] Specifically, the specific process of performing color extraction on the target image to obtain the second preset number of target colors can be implemented through the following steps 10-12:

[0057] Step 10: Cluster the colors of the target image to obtain a second preset number of color clusters.

[0058] In a specific implementation, similar colors in the target image can be grouped into a color cluster, resulting in multiple color clusters. The number of color clusters obtained can be determined based on user operation or R&D needs. Specifically, the colors in the target image can be clustered using clustering methods in related technologies, such as K-Means clustering or a mixed Gaussian model.

[0059] In an optional embodiment, before clustering the colors of the target image, in order to make the color clustering result closer to the human eye's perception of the image color, the target image can be first transferred from the RGB color space to the LAB color space. This is because the LAB color space is a color space based on human eye perception, which includes lightness (L) to represent color brightness, A and B to represent color contrast and hue, where A represents the component of the color from green to red, and B represents the component of the color from blue to yellow. The perception of the LAB color space is uniform, that is, if the amplitude of the LAB value change is the same, the visual changes brought to people are also similar. In contrast, the RGB color space is only a linear representation of the three color components of red, green and blue, which cannot well reflect the human eye's perception of color, that is, the amplitude of the RGB value change is the same, but the visual changes brought to people are quite different. On this basis, the following steps 11-12 also need to be implemented in the LAB color space.

[0060] Step 11: determine the first color from the color cluster, and obtain a second preset number of first colors contained in the target image.

[0061] After obtaining the second number of color clusters, a first color needs to be determined from each color cluster, thereby obtaining a second preset number of first colors. This first color is typically a representative color within the color cluster. The first color may be the color of the cluster center, or the color closest to the cluster center, etc. The specific determination can be based on R&D requirements or user operation.

[0062] In a specific embodiment, for each color cluster, the following operations are performed to obtain the first color corresponding to each color cluster: first, the color corresponding to the cluster center of the current color cluster is determined; then, based on the saturation of the color in the current color cluster and the color difference between the color in the current color cluster and the color corresponding to the cluster center, the color score of the color in the current color cluster is determined; and the color with the highest color score is determined as the first color in the current color cluster.

[0063] In specific implementation, the result of color clustering of the target image is to classify similar colors into one color cluster, and the colors in the same color cluster are also different. If the color of the cluster center is chosen as the first color, two bad situations may occur: first, the color of the cluster center is used as the first color, and the first color may be a color that has not appeared in the target image; second, the color of the cluster center is obtained by color averaging, and the color is not bright and beautiful enough. Therefore, based on the two principles of respecting the original image and the first color being bright and beautiful, the present invention designs a ranking function to calculate the score of the colors in the same color cluster. The closer the color hue is to the color of the cluster center and the more saturated and bright the color is, the higher the color score is. The color with the highest score is used as the first color of the color cluster.

[0064] Step 12: Determine a second preset number of target colors based on a second preset number of first colors included in the target image.

[0065] In specific implementation, the determined second preset number of first colors can be used as the second preset number of target colors; the second preset number of first colors can also be preprocessed, and the preprocessed second preset number of colors can be determined as the second preset number of target colors.

[0066] In a specific embodiment, the second predetermined number of target colors may be determined through the following steps 20-22:

[0067] Step 20 , determining whether the brightness value of the first color is within a preset brightness range; if so, determining the first color as the target color.

[0068] The preset brightness range can be set based on R&D requirements or user operation. For example, the preset brightness range can be set to 20-80. If the brightness value of the first color is not less than the preset minimum brightness value of the preset brightness range and not greater than the preset maximum brightness value of the preset brightness range, it indicates that the first color is bright enough and no adjustment is required. It can be directly determined as the target color.

[0069] Step 21: If the brightness value of the first color is less than a preset minimum brightness value corresponding to a preset brightness range, the brightness value of the first color is adjusted to the preset minimum brightness value, and the brightness-adjusted first color is determined as the target color.

[0070] If the brightness value of the first color is less than the preset minimum brightness value corresponding to the preset brightness range, it means that the first color is darker and the brightness value of the first color needs to be increased. In order to ensure that the brightness of the first color does not change too much, the brightness of the first color can be increased to the preset minimum brightness value.

[0071] Step 22: If the brightness value of the first color is greater than the preset maximum brightness value corresponding to the preset brightness range, the brightness of the first color is adjusted to the preset maximum brightness value, and the brightness-adjusted first color is determined as the target color.

[0072] If the brightness value of the first color is greater than the preset maximum brightness value corresponding to the preset brightness range, it means that the first color is brighter and the brightness value of the first color needs to be lowered. In order to ensure that the brightness of the first color does not change too much, the brightness of the first color can be lowered to the preset maximum brightness value.

[0073] In an optional embodiment, to ensure color balance, the saturation of the first color is adjusted simultaneously with the brightness of the first color. The first color with both brightness and saturation adjusted is then determined as the target color. Specifically, while increasing the brightness of the first color, the saturation of the first color is decreased; while decreasing the brightness of the first color, the saturation of the first color is increased. In a specific embodiment, the adjustment value for adjusting the brightness of the first color matches the adjustment value for adjusting the saturation of the first color. For example, to increase the brightness of the first color from 10 to 20, the saturation of the first color needs to be decreased by 10 units.

[0074] Based on the above-mentioned scheme of extracting a second preset number of target colors from the target image, the above-mentioned specific process of configuring the colors corresponding to the color block identifiers in the main color display area according to the second preset number of target colors may include: selecting the first preset number of target colors with the highest ranking from the second preset number of target colors according to the color sorting corresponding to the second preset number of target colors; configuring the first preset number of target colors as the colors corresponding to the color block identifiers in the main color display area based on the color sorting corresponding to the first preset number of target colors and the sorting sequence numbers corresponding to the color block identifiers.

[0075] In a specific implementation, when the color order of the target color matches the order number corresponding to the color block identifier, the target color is configured as the color corresponding to the color block identifier in the primary color display area. For example, if the first preset number is 3, then the three target colors are color 1 with a color order of 1, color 2 with a color order of 2, and color 3 with a color order of 3. Then, color 1 is configured as the color corresponding to the color block identifier with a order number of 1, color 2 is configured as the color corresponding to the color block identifier with a order number of 2, and color 3 is configured as the color corresponding to the color block identifier with a order number of 3.

[0076] In a specific embodiment, the color sorting corresponding to the second preset number of target colors can be determined in the following manner: determining the number of pixels occupied by the colors included in the color cluster in the target image; sorting the second preset number of target colors according to the number of pixels corresponding to the color cluster in which the second preset number of target colors are located, to obtain the color sorting corresponding to the second preset number of target colors.

[0077] Specifically, it is necessary to determine the colors in the target image included in each color cluster, and for each color cluster, determine the total number of pixels occupied by the colors included in the current color cluster in the target image (equivalent to the above-mentioned number of pixels). Sort the second preset number of target colors according to the number of pixels corresponding to each color cluster from large to small (it can also be in order from small to large, specifically determined according to R&D needs) to obtain a color sorting result, and then determine the color sorting corresponding to the target color according to the sorting position of each target color in the color sorting result. Among them, the color sorting corresponding to the target color that is ranked higher has a smaller sorting number.

[0078] In an optional embodiment, the above-mentioned color palette editing interface also includes a secondary color display area; the secondary color display area includes a third preset number of color block identifiers; different color block identifiers are respectively configured with corresponding sorting numbers; the third preset number can be system preset or player customized, and the third preset number is less than the second preset number. As shown in Figure 3, a display diagram of a color palette editing interface provided by an embodiment of the present invention is shown. In Figure 3, the box corresponding to label 2 is the main color display area, and the main color display area contains 4 color block identifiers; the box corresponding to label 3 is the secondary color display area, and the secondary color display area contains 6 color block identifiers. The colors configured in each color block identifier can be the same or different, depending on the player's operation. The "above-mentioned reference image" control in Figure 3 is also the above-mentioned upload image control.

[0079] Based on the above description, the colors corresponding to the color block identifiers in the auxiliary color display area can be configured in the following manner: select a third preset number of target colors with a lower sort order from the second preset number of target colors; based on the color sorting corresponding to the third preset number of target colors and the sorting sequence numbers corresponding to the third preset number of color block identifiers included in the auxiliary color display area, configure the third preset number of target colors as the colors corresponding to the color block identifiers in the auxiliary color display area.

[0080] In a specific implementation, when the color sorting order corresponding to the third preset number of target colors matches the order of the sorting numbers corresponding to the third preset number of color block identifiers included in the auxiliary color display area, the target color is configured as the color corresponding to the color block identifier in the auxiliary color display area. For example, if the third preset number is 3, and the three target colors are color 5 with a color sorting of 5, color 6 with a color sorting of 6, and color 7 with a color sorting of 7, then color 5 is configured as the color corresponding to the color block identifier with a sorting number of 5, color 6 is configured as the color corresponding to the color block identifier with a sorting number of 6, and color 7 is configured as the color corresponding to the color block identifier with a sorting number of 7.

[0081] In a specific embodiment, the second preset number is the sum of the first preset number and the third preset number.

[0082] In an optional embodiment, the above-mentioned color palette editing interface also includes a color selection control; the present invention can respond to the first trigger operation for the color selection control and display the color palette creation window in the color palette editing interface; wherein the color palette creation window includes: a color palette creation control and / or a color entry corresponding to at least one color combination. Specifically, the color selection control can be displayed at a specified position in the color palette editing interface, and the specified position can be determined according to R&D needs. For example, the button in front of the "Upload Reference Image" control in Figure 3 is also the color selection control. The above-mentioned first trigger operation can be a click operation or a long press operation on the color selection control, etc., which is not specifically limited here. When the player triggers the color selection control, the color palette creation window can be displayed in the color palette editing interface, and the area outside the color palette creation window in the color palette editing interface will be displayed in the form of a gray mask.

[0083] In the color palette creation window, only the color palette creation control can be displayed, or only the color entries corresponding to the color combination can be displayed, or both the color palette creation control and the color entries corresponding to the color combination can be displayed, which is determined specifically according to the player's operation or R&D needs. As shown in Figure 4, it is a display schematic diagram of the color palette creation window provided by an embodiment of the present invention. The "Create New Color Palette" control in Figure 4 is the color palette creation control, and the "Custom Color Palette 1" and the colors displayed thereafter are the color entries of the color combination. The color palette creation window of Figure 4 only displays a color entry for one color combination. In actual applications, the number of color combinations displayed in the color palette creation window can be determined according to R&D needs, or can be customized according to player operations.

[0084] Furthermore, in response to a second trigger operation on the color palette creation control, the color palette creation window is canceled, and a default color is configured in the color block identifiers in the primary color display area and the secondary color display area. The specific color corresponding to the default color can be determined based on R&D requirements or player operation. For example, the default color can be gray.

[0085] FIG5 is a schematic diagram showing the display after triggering the color palette creation control provided by an embodiment of the present invention. The color block identifiers in the primary color display area and the secondary color display area in FIG5 are both configured in gray, which is the default color.

[0086] Furthermore, in response to the selection operation for the target color entry in the color palette creation window, the color palette creation window is canceled, and the color of the color combination corresponding to the target color entry is configured in the color block identifiers in the primary color display area and the secondary color display area. The above-mentioned target color entry can be any color entry displayed in the color palette creation window, and the above-mentioned selection operation can be a click operation or a long press operation on the target color entry. When configuring the color in the color block identifiers in the primary color display area and the secondary color display area, it is necessary to determine the color corresponding to the color block identifier of the sorting number from the color combination corresponding to the target color entry based on the sorting sequence of the color block identifiers in the primary color display area and the secondary color display area, and configure the determined color as the color corresponding to the color block identifier of the sorting sequence number in the primary color display area or the secondary color display area. Among them, the colors corresponding to the color block identifiers in the primary color display area and the secondary color display area shown in Figure 3 are also the colors in the color combination named Custom Color Palette 1 in the color palette creation window in Figure 4.

[0087] In an optional embodiment, the color combination can also be customized by triggering the color block identifier displayed in the color palette editing interface. The specific process may include: responding to a third trigger operation on the color block identifier displayed in the color palette editing interface, determining the target color block identifier triggered by the third trigger operation, and displaying a color adjustment panel in the color palette editing interface; responding to a color setting operation on the color adjustment panel, determining a second color corresponding to the color setting operation, and updating the color configured in the target color block identifier according to the second color; responding to a fourth trigger operation on the save control displayed in the color palette editing interface, generating a first color combination including the color displayed by the color block identifier in the color palette editing interface.

[0088] In specific implementation, the third trigger operation can be a click operation or a long press operation on the color block logo, etc., which is determined according to R&D requirements. The above color adjustment panel can include the following three types, and players can freely choose which color adjustment panel to use to set the color:

[0089] 1. Official preset color palette: Contains 36 official preset colors. You can directly select the color corresponding to the official color configuration color block logo.

[0090] 2. Custom color storage palette: Players can adjust the colors themselves and save them to the current page. It can record 36 color information and will be saved locally on the device, but the color information will not be synchronized when switching devices.

[0091] 3. Color palette: The color palette is an HSV color spectrum (referring to the hue, saturation, and brightness model color spectrum). It is divided into two color spectra. A two-dimensional color spectrum can adjust the hue and saturation of the color, and the other one-dimensional color spectrum can adjust the brightness.

[0092] The three color adjustment panels above can all manually input RGB colors and quickly select historical colors. As shown in Figure 6, it is a display schematic diagram of a color adjustment panel provided by an embodiment of the present invention. The panel with the words "Change Color" displayed on the right side of Figure 6 is the color adjustment panel. There are three controls below the words "Change Color", corresponding to the three color adjustment panels respectively. The second control is currently selected, that is, the color adjustment panel corresponding to the second control is currently displayed. Players can select any color in the color adjustment panel. After selecting the color, click the OK control to configure the selected color as the color corresponding to the target color mark. After the color adjustment panel is displayed in the color palette editing interface, the area in the color palette editing interface where the color adjustment panel is not displayed will be displayed in the form of a gray mask, and can also become a gray mask area.

[0093] In an optional embodiment, in response to a second triggering operation on a designated area or a cancel control in the palette editing interface, the color adjustment panel is canceled from the palette editing interface. Specifically, the designated area in the palette editing interface can be determined based on R&D requirements. For example, the designated area can be the gray masked area described above, or a fixed area. The cancel control described above can be the control corresponding to the cross in the color adjustment panel in Figure 6.

[0094] In actual application, the first color combination generated through the color palette editing interface will be bound and saved with the game account logged in by the terminal device, that is, the first color combination will be saved when the player logs in to the game account next time. Therefore, the first color combination saved through the color palette editing interface can be displayed in the color palette creation window, and can also respond to application instructions for the first color combination and use the first color combination to color the dyed area in the scene component.

[0095] In an optional embodiment, the color combination displayed in the color palette creation window may not only be a color entry corresponding to the first color combination, but may also be a color entry corresponding to a color combination in a preset color library.

[0096] In one specific embodiment, the at least one color combination corresponding to the palette creation window includes only the first color combination generated and saved in the palette editing interface at a historical moment. Optionally, the order of the color combinations displayed in the palette editing window can match the order in which the first color combinations were saved. For example, the color entries corresponding to the first color combination saved first are displayed first, and the color entries corresponding to the first color combination saved later are displayed later.

[0097] Based on this, the color entry corresponding to the at least one color combination displayed in the color palette creation window may include the color corresponding to the color block identifier in the primary color display area in the first color combination. As shown in Figure 4, the primary color display area contains four color block identifiers, and thus four colors are also displayed in the color palette creation window.

[0098] In a specific implementation, the number of combinations of the first color combinations saved by the player through the color palette editing interface is limited, thereby preventing the game package data from being too large. Therefore, the specific process of displaying the color palette editing interface in the graphical user interface may include: responding to a fifth trigger operation on a specified control in the graphical user interface, determining the number of combinations of the first color combinations saved in the color palette editing interface; if the number of combinations is less than a preset number threshold, displaying a color palette editing interface in the graphical user interface with the color block identifiers in the primary color display area and the secondary color display area configured with a default color; if the number of combinations is equal to the preset number threshold, displaying a color palette editing interface in the graphical user interface with the color block identifiers in the primary color display area and the secondary color display area configured with a specified color; wherein the specified color is the color corresponding to the first color combination that was saved most recently in the color palette editing interface.

[0099] Specifically, which control in the graphical user interface the above-mentioned designated control is can be determined according to R&D requirements, and is not specifically limited here. The above-mentioned preset quantity threshold can be determined according to R&D requirements or user operations. For example, the preset quantity threshold can be set to 10 or 12, etc. When the player triggers the designated control, the system will determine the number of combinations of the first color combination saved in the color palette editing interface, and determine whether the number of combinations exceeds the preset quantity threshold. If it does not exceed the preset quantity threshold, a new color palette will be created, and a color palette editing interface in which the color block identifiers in the main color display area and the auxiliary color display area are configured as the default color will be displayed; if the preset quantity threshold is reached, a color palette editing interface in which the color block identifiers in the main color display area and the auxiliary color display area are configured as the color corresponding to the first color combination with the latest storage time will be displayed, so that the player can customize the color combination in the color palette editing interface in which the color block identifier is configured as a certain color.

[0100] In this method, players can generate custom color combinations through the color palette editing interface, and can use custom color combinations to change the overall color of the dyed areas in the scene components, improving the efficiency and freedom of component color changing.

[0101] The following embodiment focuses on describing a method for changing the color of a scene component with one click.

[0102] Specifically, FIG7 is a flowchart of a color changing method in a game provided by an embodiment of the present invention. The flowchart includes the following specific steps:

[0103] Step S702 : In response to a setting operation on a target scene component among the multiple scene components, a color palette selection control is displayed in a graphical user interface.

[0104] In a specific implementation, the target scene component can be any one of the multiple scene components included in the game editing scene, and the specific scene component of the target scene component can be determined based on the player's operation. The specific operation of the above-mentioned setting operation for the target scene component can be determined according to R&D requirements, or can be determined according to the user's setting operation. For example, the setting operation can be an operation in which the player selects the target scene component and edits the target scene component. After the player performs the setting operation on the target scene component, a color palette selection control for the target scene component will be displayed at a specified location in the graphical user interface; the specified location can be any location in the graphical user interface, or it can be a fixed location in the graphical user interface. The color palette selection control is used to select a color for the dyeing area of ​​the target scene component.

[0105] Step S704, in response to the sixth trigger operation on the color palette selection control, a color palette selection list corresponding to the target scene component is displayed in the graphical user interface; wherein the color palette selection list includes at least one alternative color matching entry; the alternative color matching entry includes alternative colors of the dyed area contained in the target scene component; and at least one color matching combination includes: a first color matching combination and / or a preset color matching combination in a preset color matching library.

[0106] The sixth trigger operation mentioned above can be a click operation or a long press operation of the color palette selection control by the player, which can be determined according to the rules of the game. When the player triggers the color palette selection control, the color palette selection list corresponding to the target scene component will be displayed in the graphical user interface. The color palette selection list will usually be displayed in a position associated with the color palette selection control. For example, the color palette selection control is a drop-down control. When the player clicks the color palette selection control, a color palette selection list will be displayed below the color palette selection control. The color palette selection list may include one or more alternative color matching entries. Among them, the number of alternative colors included in the alternative color matching entries may be the same as or different from the number of dyeing areas contained in the target scene component. It can be determined according to R&D needs or according to the user's setting operation.

[0107] In a specific implementation, the preset color library contains one or more preset color combinations, each of which contains: the sorting numbers of the second preset number of color block identifiers, and the preset colors configured by the color block identifiers. At the same time, the preset colors contained in different preset color combinations can be the same or different, which can also be understood as the preset color combinations can contain the same preset colors or different preset colors. When two preset color combinations contain exactly the same preset colors, the sorting numbers of the color block identifiers configured for the preset colors in different preset color combinations are different.

[0108] Specifically, the alternative colors contained in each alternative color matching entry in the color palette selection list are set in advance, and the alternative colors contained in different alternative color matching entries can be the same or different. If the alternative colors contained in different alternative color matching entries are exactly the same, the sorting numbers of the color block identifiers configured for the same alternative color in different alternative color matching entries may be different. For example, alternative color matching entry 1 and alternative color matching entry 2 both contain the four colors red, yellow, green and purple, then the display order of these four colors in alternative color matching entry 1 is: red, yellow, purple, green; the display order of these four colors in alternative color matching entry 2 is: yellow, purple, green, red.

[0109] In one embodiment, the number of candidate colors included in the candidate color entries displayed in the color palette selection list is the same as the number of dyed regions included in the target scene component. That is, if the target scene component includes multiple dyed regions, each candidate color entry displayed in the color palette selection list will include multiple candidate colors, thereby facilitating a one-to-one correspondence between the candidate colors and the dyed regions in the target scene component.

[0110] In a specific embodiment, the alternative color matching entries displayed in the color palette selection list are the colors of the color block identifiers configured as the main color display area in the first color combination, and the number of colors is the same as the number of areas; the alternative color matching entries displayed in the color palette selection list can also be: the colors corresponding to the color block identifiers with the same sorting sequence number as the color block identifiers in the main color display area in the preset color combination, and the number of colors is the same as the number of areas.

[0111] FIG8 is a schematic diagram showing a color palette selection list provided by an embodiment of the present invention. The box corresponding to reference numeral 4 in FIG8 displays a color palette selection control, and the box corresponding to reference numeral 5 displays a color palette selection list corresponding to the target scene component, the large floor. This color palette selection list includes alternative color entries corresponding to the default color, custom color palette 1, and preset color combinations. The default color is the factory-set color of the large floor, custom color palette 1 is the first color combination, and "Blue Sky Purple Clouds" and "Pink Heart" correspond to the preset color combinations. Reference numeral 6 corresponds to a color display area. The number of color identifiers included in this color display area is the number of dyed areas contained in the large floor. The color displayed by each color identifier is the color currently displayed for each dyed area of ​​the large floor in the game editing scene. Each alternative color entry displayed in the color palette selection list contains the same number of alternative colors as the number of dyed areas in the large floor.

[0112] Step S706 , in response to a selection operation in the color palette selection list, determining a target color matching entry from at least one candidate color matching entry, and updating the color of the dyed area included in the target scene component according to the candidate colors in the target color matching entry.

[0113] The above-mentioned selection operation can be a click operation or a long press operation on a certain alternative color matching entry in the color palette selection list. When the player selects the target color matching entry in the color palette selection list, the color of each dyeing area in the target scene component will be updated according to the alternative color in the target color matching entry. The specific update method of the color of the dyeing area can be determined according to R&D requirements, or according to the user's setting operation. For example, when the number of colors of the alternative colors in the target color matching entry is the same as the number of dyeing areas contained in the target scene component, the color of the dyeing area of ​​the target scene component can be updated according to the correspondence between the alternative colors and the dyeing areas, wherein the correspondence between the alternative colors and the dyeing areas is set according to a preset rule, which can be determined according to R&D requirements or according to the user's setting operation. For example, the preset rule can be based on the sorting sequence number of the color block identifier corresponding to the alternative color in the target color matching entry and the area number of the dyeing area of ​​the target scene component to determine the correspondence between the alternative color and the dyeing area, that is, when the sorting sequence number of the color block identifier corresponding to the alternative color is the same as the area number of the dyeing area, the dyeing area is updated to the alternative color.

[0114] Step S708: Displaying the target scene component after the color of the dyed area is updated in the graphical user interface.

[0115] After updating the color of the dyed area contained in the target scene component according to the alternative color in the target color matching entry, the target scene component with the updated color of the dyed area is obtained, and the target scene component with the updated color of the dyed area is displayed in the graphical user interface, so that the player can check whether the target scene component with the updated color of the dyed area meets his or her needs.

[0116] The disclosed embodiments provide a method for changing colors in games. By selecting an alternative color from a palette selection list, the entire color of a scene component can be changed. Compared to adjusting the color of a single component region in a game editor, the disclosed embodiments improve component color changing efficiency, reduce color adjustment costs, and enhance the player's gaming experience.

[0117] An embodiment of the present disclosure provides a method for changing colors in a game. This method is implemented based on the above-described embodiment. The method focuses on the specific process of displaying a color palette selection control in a graphical user interface in response to a setting operation on a target scene component among multiple scene components (implemented through the following steps S902-S904), and the specific process of determining a target color scheme entry from at least one alternative color scheme entry in response to a selection operation in a color palette selection list, and updating the color of a dyed area included in the target scene component according to the alternative color scheme in the target color scheme entry (implemented through the following steps S908-S910). As shown in FIG. 9 , the method includes the following specific steps:

[0118] Step S902: In response to a triggering operation on a target scene component among multiple scene components, the target scene component is selected.

[0119] The trigger operation may be a click operation or a selection operation on a target scene component among a plurality of scene components displayed in the game editing scene.

[0120] Step S904, in response to the triggering operation on the setting control in the graphical user interface, a second editing window is displayed in the graphical user interface; wherein the second editing window includes: a color palette selection control, and the current color corresponding to the dyeing area contained in the target scene component.

[0121] In a specific implementation, the triggering operation for the setting control can be a click or long press on the setting control. After selecting the target scene component, the setting control is triggered, and a second editing window can be displayed in the graphical user interface. This second editing window is used to edit or set the component information of the selected target scene component, including component color, component speed, center of gravity position, and other information. The color palette selection control in the second editing window is used to adjust the component color. As shown on the right side of Figure 8, the second editing window for setting the large floor is shown.

[0122] Step S906, in response to the triggering operation on the color palette selection control, a color palette selection list corresponding to the target scene component is displayed in the second editing window; wherein the color palette selection list includes at least one alternative color matching entry; the alternative color matching entry includes alternative colors of the dyeing area contained in the target scene component.

[0123] In the second editing window shown in FIG8 , when the player triggers the color palette selection control, a color palette selection list will be displayed below the color palette selection control. In FIG8 , the color palette selection list contains multiple alternative color matching entries. Currently, only four alternative color matching entries are displayed in FIG8 . The player can slide the color palette selection list to display the remaining undisplayed alternative color matching entries. In FIG8 , the target scene component contains three dyeing areas. The current color value corresponding to each dyeing area is displayed in the color display area corresponding to the number 6. The color display area displays the color identifier of the current color ( FIG8 contains three color identifiers). The number of alternative colors corresponding to each alternative color matching entry displayed in the color palette selection list matches the number of dyeing areas contained in the target scene component. Moreover, the alternative colors displayed in the alternative color matching entries and the colors corresponding to the color values ​​have the same dyeing area corresponding to the colors with the same sorting sequence number of the corresponding color block identifiers.

[0124] In an optional embodiment, the number of alternative colors corresponding to each alternative color entry displayed in the color palette selection list is the same as the number of dyeing areas contained in the target scene component; due to the limited display space of the window interface, in another optional embodiment, the number of alternative colors corresponding to each alternative color entry displayed in the color palette selection list may be less than the number of dyeing areas contained in the target scene component.

[0125] Step S908 , in response to a triggering operation on the color palette selection list, displaying at least one alternative color matching entry provided by the color palette selection list in the second editing window, wherein the alternative color matching entry includes an alternative color corresponding to the dyeing area included in the target scene component.

[0126] The triggering operation on the color palette selection list may be a sliding operation or a dragging operation on the color palette selection control, through which all the alternative color matching entries provided in the color palette selection list in the second graphical user interface can be viewed.

[0127] Step S910, in response to a selection operation on a target color matching entry in at least one alternative color matching entry, the current color corresponding to the dyed area contained in the target scene component in the second editing window is replaced with the alternative color included in the target color matching entry and corresponding to the dyed area contained in the target scene component.

[0128] The selection operation can be a click or swipe operation on the target color entry. When the player selects the target color entry, the current color corresponding to the dyed area contained in the target scene component displayed in the second editing window will be replaced with the alternative color contained in the target color entry. After the current color corresponding to the dyed area contained in the target editable component in the second editing window is replaced, the color of the dyed area contained in the target scene component displayed in the game editing scene will also be replaced.

[0129] Step S912: Displaying the target scene component after replacing the color of the dyed area in the graphical user interface.

[0130] In an optional embodiment, the second editing window includes a color display area that displays the color identifier of the current color, and different color identifiers correspond to the dyeing areas contained in the target scene component. Based on this, the disclosed embodiment can also change the color of each dyeing area in the following manner: in response to a trigger operation on the color identifier, a color adjustment panel is displayed in the second editing window; in response to a color setting operation on the color adjustment panel, a third color corresponding to the color setting operation is determined; the color of the dyeing area corresponding to the color identifier in the target scene component is updated according to the third color, and the color identifier in the color display area is updated according to the third color. In the above manner, the color of a dyeing area in the target scene component can be adjusted individually.

[0131] In practice, the color adjustment panels, including the official preset palette, custom color storage palette, and color palette, allow users to directly select the color set on the color adjustment palette to change the color of a specific area of ​​the target scene component. All three color adjustment panels allow for manual input of RGB colors and quick selection of historical colors.

[0132] The color-changing method described above in games can reduce the time and complexity of coloring scene components during editing within the game's editing scene. Furthermore, many ordinary players may not have a clear theme or comprehensive art color matching training when editing game scenes, so their color matching may still require improvement. This method can achieve better color matching through the colors in the alternative color matching entries, lowering the operational threshold and reducing the time required for color matching. Furthermore, this method can change the color of all dyed areas in a scene component at once, improving color-changing efficiency.

[0133] The following embodiment describes a method for performing one-click color change on multiple scene components in a game editing scene.

[0134] Specifically, the graphical user interface further displays a first interactive control, which can be displayed at any location in the graphical user interface, and can be specifically determined based on R&D requirements or user settings. Based on this, the specific process of implementing one-click color change for multiple scene components in the game editor may include the following steps 30-32:

[0135] Step 30: In response to a trigger operation on the first interactive control, a third editing window is displayed in the graphical user interface; wherein the third editing window includes at least one color combination; the at least one color combination includes: a first color combination and / or a preset color combination in a preset color library; the first color combination and the preset color combination both include a second preset number of colors, and the second preset number of colors included in the first color combination include a second preset number of target colors.

[0136] Specifically, the one-click color change scheme for all scene components in the game editing scene is the same as the one-click color change scheme for a single scene component in the game editor; of course, under the one-click color change function for all scene components in the game editing scene, new color bar entries, sorting logic, and color change schemes can also be provided.

[0137] Step 31 : In response to a triggering operation on the third editing window, a target color combination is determined from at least one color combination.

[0138] The triggering operation for the third editing window may be a click operation, a long press operation, or a drag operation on the target color combination in the color combinations provided in the third editing window. The target color combination may be any color combination in the color combinations provided in the third editing window, and the specific operation may be determined according to the player's operation.

[0139] Step 32: updating the colors of the dyed areas in the plurality of scene components included in the game editing scene according to a second preset number of colors in the target color combination.

[0140] In a specific implementation, after the target color combination is determined, the colors of the dyed areas of all scene components included in the game editing scene can be updated according to the colors included in the target color combination.

[0141] In a specific embodiment, the above step 32 can also be implemented through the following steps 40-41:

[0142] Step 40, for each scene component among the multiple scene components included in the game editing scene, determine a fourth color corresponding to the dyed area in the scene component from a second preset number of colors in the target color combination according to the actual size of the scene component and the area ratio corresponding to the dyed area in the scene component; wherein the area ratio corresponding to the dyed area includes: the ratio of the size of the dyed area to the size of the scene component to which the dyed area belongs.

[0143] In a specific implementation, the actual size of the scene component must first be divided by the scene size to obtain a division result; wherein the scene size is determined based on the game scene information, and the game scene information is generated based on a game editing scene containing multiple scene components; for each dyeing area in the scene component, the division result is multiplied by the area ratio corresponding to the dyeing area to obtain the final ratio corresponding to the dyeing area; based on the final ratio corresponding to the dyeing area, the fourth color corresponding to the dyeing area is determined from the second preset number of colors in the target color combination. The area ratio corresponding to the above-mentioned dyeing area can be the ratio of the surface area of ​​the dyeing area to the surface area of ​​the scene component to which the dyeing area belongs. The surface area of ​​the scene component and the surface area of ​​the dyeing area can be determined by texture expansion.

[0144] The actual size of the scene component is the actual size of the scene component in the game editing scene. The actual size is the product of the component size of the editable component corresponding to the scene component and the scaling value. The scaling value can be determined based on the player's operation. Specifically, the scene size can be automatically calculated based on the game scene information.

[0145] In actual applications, the graphical user interface includes a second interactive control. After the second interactive control is triggered by the terminal device, the game scene information corresponding to the game editing scene can be generated. The game scene information can be saved in a preset location, which can be a map file. The map file can not only save the game scene information, but also save other map information (including but not limited to screenshots, map names, logs, etc.). After the map file saves the game scene information, it will be uploaded to the server. After the server reviews it, the game scene generated by the game scene information can be published in the preset map pool, so that the terminal device connected to the server can download the corresponding game scene information from the server, and generate the corresponding game scene according to the game scene information through the game program, and then experience the game in the game scene. This method can publish the game scene information in the game editor and be experienced by other players, thereby realizing a fast UGC function.

[0146] In an optional embodiment, in the target color combination, different colors correspond to different proportion intervals, and the proportion intervals are used to indicate: when the fourth color corresponding to the dyed area is the color in the target scene color, the value range of the corresponding final proportion; based on this, the method for determining the fourth color corresponding to the dyed area may include: based on the proportion intervals corresponding to the colors included in the target color combination, determining the target proportion interval to which the final proportion corresponding to the dyed area belongs, and determining the color in the target color combination corresponding to the target proportion interval as the fourth color corresponding to the dyed area.

[0147] For example, the target scene component includes dyeing area 1 and dyeing area 2, the final proportion corresponding to dyeing area 1 is 0.1, and the final proportion corresponding to dyeing area 2 is 0.25; the target color combination includes color 1, color 2 and color 3, the proportion range corresponding to color 1 is 0.5 to 1, the proportion range corresponding to color 2 is 0.2-0.5, and the proportion range corresponding to color 3 is 0-0.2. Therefore, the fourth color corresponding to dyeing area 1 is color 3, and the fourth color corresponding to dyeing area 2 is color 2.

[0148] In a specific embodiment, in the same color combination, different colors correspond to different proportion intervals; in different color combinations, colors with the same sequence number of configured color block identifiers correspond to the same proportion interval.

[0149] In another specific embodiment, in different color combinations, the colors with the same sorting sequence number of the configured color block identifiers correspond to different proportion intervals. The proportion interval corresponding to each color can be determined according to R&D needs or according to user setting operations.

[0150] Step 41: Update the colors of the dyed areas in the plurality of scene components to a fourth color corresponding to the dyed areas.

[0151] Through the above method, all scene components in the game editing scene can be changed in one click, which saves players the complexity of changing the color of scene components and helps to improve the player's gaming experience.

[0152] In an optional embodiment, the above-mentioned third editing window also includes a region selection control; the region selection control is used to select a scene area in the game editing scene; based on this, in response to a trigger operation on the region selection control, a region selection identifier is displayed in the graphical user interface; in response to a setting operation on the region selection identifier, based on the setting operation, the target scene area selected by the region selection identifier in the game editing scene is determined; in response to a selection operation on a color combination in the third editing window, the color of the dyed area in the scene component within the target scene area is updated based on the colors included in the selected color combination.

[0153] In a specific implementation, the area selection mark can be a rectangular or circular frame that can be expanded or reduced. The player can determine the target scene area by adjusting the range of the game editing scene framed by the area selection mark, that is, the scene range framed by the area selection mark is determined as the target scene area. The above method of updating the color of the dyed area of ​​the scene components within the target scene area based on the colors included in the selected color combination is similar to the method of changing the color of all scene components in the game editing scene with one click, except that this method only changes the color of the scene components within the target scene area with one click.

[0154] In an optional embodiment, in response to a marking operation on a first scene component among multiple scene components, a marking feature of the first scene component is determined; in response to a color change operation on the first scene component, the color of the first scene component is updated to a color matching the marking feature.

[0155] In a specific implementation, the above-mentioned first scene component can be any one of the multiple scene components contained in the game editing scene, and the specific component of the first scene component can be determined according to the player's operation. The player can mark the marking feature of the first scene component through a marking operation. The marking feature is used to indicate the feature of the scene component. For example, the marking feature can be a wall, road surface and other features. After the first scene component is marked as a wall feature, when the color change operation is performed on the first scene component, the first scene component will be updated to the color corresponding to the wall feature set in advance. This method can set scene components with the same marking feature to the same color, which helps to improve the visual effect of the scene components in the game editing scene, and also makes the scene components with the same marking feature have more fitting colors.

[0156] In accordance with the above method embodiment, the present disclosure further provides a color changing device in a game, as shown in FIG10 , which includes:

[0157] The scene display module 90 is configured to execute a graphical user interface displayed by running the game program, wherein the graphical user interface includes a game editing scene to be edited, and the game editing scene includes multiple scene components, wherein the scene component includes at least one dyeing area, and the dyeing area is used to configure the color of the scene component, and at least one dyeing area is respectively configured with a corresponding area number.

[0158] The interface display module 91 is configured to execute the display of the color palette editing interface in the graphical user interface; wherein, the color palette editing interface includes an upload image control and a main color display area, the main color display area includes a first preset number of color block identifiers, and different color block identifiers are respectively configured with corresponding sorting numbers.

[0159] The color extraction module 92 is configured to execute, in response to inputting a target image in the uploaded image control, color extraction of the target image, obtain a second preset number of target colors, and configure the colors corresponding to the color block identifiers in the main color display area according to the second preset number of target colors.

[0160] The color matching generation module 93 is configured to generate and save a first color matching combination in response to a save operation, wherein the first color matching combination includes: sorting numbers of a first preset number of color block identifiers, and target colors corresponding to the color block identifiers.

[0161] The component color changing module 94 is configured to execute an application instruction in response to the first color combination, determine the color block identifier corresponding to the dyed area according to the area number of the dyed area in the scene component and the sorting sequence number of the color block identifier, and configure the color for the dyed area in the scene component according to the target color corresponding to the color block identifier in the first color combination.

[0162] The color-changing device in this game allows players to generate custom color combinations through the color palette editing interface, thereby increasing the freedom of color combination settings; at the same time, players can use custom color combinations to change the overall color of the dyed area in the scene component, improving the efficiency of component color changing.

[0163] Specifically, the above-mentioned device also includes a component setting module, which is configured to execute: displaying a first editing window in a graphical user interface; wherein the first editing window includes multiple editable components; responding to an editing operation on a target editable component among the multiple editable components, controlling the generation of a scene component corresponding to the target editable component in the game editing scene.

[0164] In a specific implementation, in a scene component, a dyeing area corresponds to a color channel; the color channel is used to store the color parameters of the dyeing area and update the color of the dyeing area according to the color parameters.

[0165] Furthermore, the above-mentioned color extraction module 92 is configured to perform: clustering processing on the colors of the target image to obtain a second preset number of color clusters; determining the first color from the color clusters to obtain a second preset number of first colors contained in the target image; and determining a second preset number of target colors based on the second preset number of first colors contained in the target image.

[0166] Specifically, the above-mentioned color extraction module 92 is also configured to perform: for each color cluster, perform the following operations: determine the color corresponding to the cluster center of the current color cluster; based on the saturation of the color in the current color cluster and the color difference between the color in the current color cluster and the color corresponding to the cluster center, determine the color score of the color in the current color cluster; determine the color with the highest color score as the first color in the current color cluster.

[0167] Furthermore, the above-mentioned color extraction module 92 is also configured to perform: determining whether the brightness value of the first color is within a preset brightness range, and if it is within the preset brightness range, determining the first color as the target color; if the brightness value of the first color is less than the preset minimum brightness value corresponding to the preset brightness range, adjusting the brightness value of the first color to the preset minimum brightness value, and determining the first color after brightness adjustment as the target color; if the brightness value of the first color is greater than the preset maximum brightness value corresponding to the preset brightness range, adjusting the brightness of the first color to the preset maximum brightness value, and determining the first color after brightness adjustment as the target color.

[0168] In a specific implementation, while adjusting the brightness of the first color, the saturation of the first color is also adjusted, and the first color after the brightness and saturation are adjusted is determined as the target color.

[0169] Furthermore, the above-mentioned color extraction module 92 is also configured to execute: according to the color sorting corresponding to the second preset number of target colors, select the first preset number of target colors with the highest sorting from the second preset number of target colors; based on the color sorting corresponding to the first preset number of target colors and the sorting sequence number corresponding to the color block identifier, configure the first preset number of target colors as the colors corresponding to the color block identifier in the main color display area.

[0170] Specifically, the color sorting corresponding to the second preset number of target colors is determined in the following manner: determining the number of pixels occupied by the colors included in the color cluster in the target image; sorting the second preset number of target colors according to the number of pixels corresponding to the color cluster in which the second preset number of target colors are located, to obtain the color sorting corresponding to the second preset number of target colors.

[0171] In a specific implementation, the above-mentioned color palette editing interface also includes a secondary color display area; the secondary color display area includes a third preset number of color block identifiers; different color block identifiers are respectively configured with corresponding sorting numbers; the above-mentioned device also includes a secondary color configuration module, which is configured to execute: selecting a third preset number of target colors with a lower sorting from the second preset number of target colors; based on the color sorting corresponding to the third preset number of target colors and the sorting numbers corresponding to the third preset number of color block identifiers included in the secondary color display area, the third preset number of target colors are configured as the colors corresponding to the color block identifiers in the secondary color display area.

[0172] In a specific implementation, the second preset number is the sum of the first preset number and the third preset number.

[0173] Furthermore, the above-mentioned color palette editing interface also includes a color selection control; the above-mentioned device also includes a window display module, which is configured to execute: in response to a first trigger operation on the color selection control, display a color palette creation window in the color palette editing interface; wherein the color palette creation window includes: a color entry corresponding to the color palette creation control and / or at least one color combination; in response to a second trigger operation on the color palette creation control, cancel the display of the color palette creation window, and configure a default color in the color block identifier in the primary color display area and the secondary color display area.

[0174] In a specific implementation, the above-mentioned window display module is also configured to execute: responding to the selection operation of the target color entry in the color palette creation window, canceling the display of the color palette creation window, and configuring the color of the color combination corresponding to the target color entry in the color block identifier in the primary color display area and the secondary color display area.

[0175] Furthermore, the above-mentioned device also includes a color matching customization module, which is configured to perform: responding to a third trigger operation on the color block identifier displayed in the color palette editing interface, determining the target color block identifier triggered by the third trigger operation, and displaying a color adjustment panel in the color palette editing interface; responding to a color setting operation on the color adjustment panel, determining a second color corresponding to the color setting operation, and updating the color configured in the target color block identifier according to the second color; responding to a fourth trigger operation on the save control displayed in the color palette editing interface, generating a first color matching combination including the color displayed by the color block identifier in the color palette editing interface.

[0176] In a specific implementation, the apparatus further includes a panel canceling module configured to execute: in response to a second triggering operation on a designated area or a cancel control in the palette editing interface, canceling the display of the color adjustment panel in the palette editing interface.

[0177] In a specific implementation, the first color combination generated through the color palette editing interface is bound to and saved with the game account logged in by the terminal device.

[0178] Furthermore, the color entry corresponding to the at least one color combination included in the color palette creation window includes: the color corresponding to the color block mark configured in the main color display area in the first color combination.

[0179] In an optional embodiment, the at least one color combination corresponding to the color palette creation window includes: a first color combination generated and saved in the color palette editing interface at a historical moment.

[0180] Furthermore, the above-mentioned interface display module 91 is configured to execute: responding to the fifth trigger operation for the specified control in the graphical user interface, determining the number of combinations of the first color combination saved in the color palette editing interface; if the number of combinations is less than the preset number threshold, displaying the color palette editing interface in which the color block identifiers in the primary color display area and the secondary color display area are configured with the default color in the graphical user interface; if the number of combinations is equal to the preset number threshold, displaying the color palette editing interface in which the color block identifiers in the primary color display area and the secondary color display area are configured with the specified color in the graphical user interface; wherein the specified color is the color corresponding to the first color combination that was saved the latest in the color palette editing interface.

[0181] Furthermore, the above-mentioned device also includes a component color changing module, which is configured to execute: in response to a setting operation for a target scene component among multiple scene components, display a color palette selection control in a graphical user interface; in response to a sixth trigger operation for the color palette selection control, display a color palette selection list corresponding to the target scene component in the graphical user interface; wherein the color palette selection list includes an alternative color matching entry corresponding to at least one color matching combination; the alternative color matching entry includes alternative colors of the dyeing area contained in the target scene component; at least one color matching combination includes: a first color matching combination and / or a preset color matching combination in a preset color matching library; in response to a selection operation in the color palette selection list, determine a target color matching entry from the alternative color matching entries corresponding to at least one color matching combination, and update the color of the dyeing area contained in the target scene component according to the alternative color in the target color matching entry; and display the target scene component after updating the color of the dyeing area in the graphical user interface.

[0182] During specific implementation, the number of colors of the alternative colors contained in the alternative color matching entries displayed in the color palette selection list is the same as the number of areas of the dyeing area contained in the target scene component.

[0183] Furthermore, a setting control is displayed in the graphical user interface; the above-mentioned component color changing module is also configured to execute: responding to a trigger operation on a target scene component among multiple scene components, selecting the target scene component; responding to a trigger operation on the setting control, displaying a second editing window in the graphical user interface; wherein the second editing window includes: a color palette selection control, and the current color corresponding to the dyeing area contained in the target scene component.

[0184] In a specific implementation, the above-mentioned second editing window includes a color display area, which displays the color identification of the current color, and different color identifications correspond to the dyeing areas contained in the target scene component; the above-mentioned device also includes an identification color changing module, which is configured to execute: responding to a trigger operation on the color identification, displaying a color adjustment panel in the second editing window; responding to a color setting operation on the color adjustment panel, determining a third color corresponding to the color setting operation; updating the color of the dyeing area corresponding to the color identification in the target scene component according to the third color, and updating the color identification in the color display area according to the third color.

[0185] Furthermore, a first interactive control is also displayed in the graphical user interface; the above-mentioned device also includes a scene color changing module, which is configured to execute: in response to a trigger operation on the first interactive control, a third editing window is displayed in the graphical user interface; wherein the third editing window includes at least one color combination; at least one color combination includes: a first color combination and / or a preset color combination in a preset color library; the first color combination and the preset color combination both contain a second preset number of colors, and the second preset number of colors contained in the first color combination contains a second preset number of target colors; in response to a trigger operation on the third editing window, a target color combination is determined from at least one color combination; and the colors of the dyed areas in the multiple scene components included in the game editing scene are updated according to the second preset number of colors in the target color combination.

[0186] In a specific implementation, the above-mentioned scene color changing module is further configured to execute: for each scene component of the multiple scene components included in the game editing scene, according to the actual size of the scene component and the area ratio corresponding to the dyed area in the scene component, determine the fourth color corresponding to the dyed area in the scene component from the second preset number of colors in the target color combination; wherein the area ratio corresponding to the dyed area includes: the ratio of the size of the dyed area to the size of the scene component to which the dyed area belongs; and update the colors of the dyed areas in the multiple scene components to the fourth color corresponding to the dyed areas.

[0187] Furthermore, the above-mentioned scene color changing module is also configured to execute: dividing the actual size of the scene component by the scene size to obtain a division result; wherein the scene size is determined based on the game scene information, and the game scene information is generated based on a game editing scene containing multiple scene components; for each dyeing area in the scene component, multiplying the division result by the area proportion corresponding to the dyeing area to obtain a final proportion corresponding to the dyeing area; based on the final proportion corresponding to the dyeing area, determining the fourth color corresponding to the dyeing area from the second preset number of colors contained in the target color combination.

[0188] Specifically, in the target color combination, different colors correspond to different proportion intervals, and the proportion intervals are used to indicate: when the fourth color corresponding to the dyeing area is a color in the target color combination, the value range of the corresponding final proportion; the above-mentioned scene color change module is also configured to execute: according to the final proportion corresponding to the dyeing area, the step of determining the fourth color corresponding to the dyeing area from the second preset number of colors included in the target color combination includes: based on the proportion intervals corresponding to the colors included in the target color combination, determining the target proportion interval to which the final proportion corresponding to the dyeing area belongs, and determining the color in the target color combination corresponding to the target proportion interval as the fourth color corresponding to the dyeing area.

[0189] Furthermore, the above-mentioned third editing window also includes a region selection control; the region selection control is used to select a scene area in the game editing scene; the above-mentioned device also includes a local color change module, which is configured to execute: responding to a trigger operation on the region selection control, displaying a region selection identifier in a graphical user interface; responding to a setting operation on the region selection identifier, and determining, based on the setting operation, a target scene area selected by the region selection identifier in the game editing scene; responding to a selection operation on a color combination in the third editing window, and updating the color of the dyed area in the scene component within the target scene area based on the colors included in the selected color combination.

[0190] Furthermore, the above-mentioned device also includes a feature marking module, which is configured to perform: in response to a marking operation on a first scene component among multiple scene components, determine the marking feature of the first scene component; in response to a color change operation on the first scene component, update the color of the first scene component to a color that matches the marking feature.

[0191] The color-changing device in the game provided by the embodiment of the present disclosure has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference can be made to the corresponding content in the aforementioned method embodiment.

[0192] An embodiment of the present disclosure also provides an electronic device, as shown in FIG11 , which includes a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the color-changing method in the above-mentioned game.

[0193] Specifically, the color changing method in the above-mentioned game includes: a graphical user interface displayed by running the game program, the graphical user interface includes a game editing scene to be edited, the game editing scene includes multiple scene components, wherein the scene component includes at least one dyeing area, the dyeing area is used to configure the color of the scene component, and the at least one dyeing area is respectively configured with a corresponding area number; displaying a color palette editing interface in the graphical user interface; wherein the color palette editing interface includes an upload image control and a main color display area, the main color display area includes a first preset number of color block identifiers, and different color block identifiers are respectively configured with corresponding sorting numbers; in response to inputting a target in the upload image control Image, perform color extraction on the target image to obtain a second preset number of target colors, and configure the color corresponding to the color block identifier in the main color display area according to the second preset number of target colors; in response to the save operation, generate and save a first color combination; wherein, the first color combination includes: the sorting sequence numbers of the first preset number of color block identifiers, and the target colors corresponding to the color block identifiers; in response to the application instruction for the first color combination, determine the color block identifier corresponding to the dyeing area according to the area number of the dyeing area in the scene component and the sorting sequence number of the color block identifier, and configure the color for the dyeing area in the scene component according to the target color corresponding to the color block identifier in the first color combination.

[0194] In the above method, players can generate custom color combinations through the color palette editing interface, thereby increasing the freedom of color combination settings; at the same time, players can use custom color combinations to change the overall color of the dyed area in the scene component, thereby improving the efficiency of component color change.

[0195] In an optional embodiment, the above method also includes: displaying a first editing window in a graphical user interface; wherein the first editing window includes multiple editable components; in response to an editing operation on a target editable component among the multiple editable components, controlling the generation of a scene component corresponding to the target editable component in the game editing scene.

[0196] In an optional embodiment, in the scene component, one dyed area corresponds to one color channel; the color channel is used to store color parameters of the dyed area and update the color of the dyed area according to the color parameters.

[0197] In an optional embodiment, the above-mentioned step of performing color extraction on the target image to obtain a second preset number of target colors includes: clustering the colors of the target image to obtain a second preset number of color clusters; determining the first color from the color clusters to obtain a second preset number of first colors contained in the target image; and determining a second preset number of target colors based on the second preset number of first colors contained in the target image.

[0198] In an optional embodiment, the above-mentioned step of determining the first color from the color cluster to obtain a second preset number of first colors contained in the target image includes: for each color cluster, performing the following operations: determining the color corresponding to the cluster center of the current color cluster; determining the color score of the color in the current color cluster based on the saturation of the color in the current color cluster and the color difference between the color in the current color cluster and the color corresponding to the cluster center; determining the color with the highest color score as the first color in the current color cluster.

[0199] In an optional embodiment, the above-mentioned step of determining a second preset number of target colors based on the second preset number of first colors contained in the target image includes: judging whether the brightness value of the first color is within a preset brightness range, and if it is within the preset brightness range, determining the first color as the target color; if the brightness value of the first color is less than the preset minimum brightness value corresponding to the preset brightness range, adjusting the brightness value of the first color to the preset minimum brightness value, and determining the first color after the brightness adjustment as the target color; if the brightness value of the first color is greater than the preset maximum brightness value corresponding to the preset brightness range, adjusting the brightness of the first color to the preset maximum brightness value, and determining the first color after the brightness adjustment as the target color.

[0200] In an optional embodiment, while adjusting the brightness of the first color, the saturation of the first color is also adjusted, and the first color after the brightness and saturation are adjusted is determined as the target color.

[0201] In an optional embodiment, the above-mentioned step of configuring the colors corresponding to the color block logos in the main color display area according to the second preset number of target colors includes: selecting the first preset number of target colors with the highest ranking from the second preset number of target colors according to the color sorting corresponding to the second preset number of target colors; and configuring the first preset number of target colors as the colors corresponding to the color block logos in the main color display area based on the color sorting corresponding to the first preset number of target colors and the sorting sequence numbers corresponding to the color block logos.

[0202] In an optional embodiment, the color sorting corresponding to the second preset number of target colors is determined in the following manner: determining the number of pixels occupied by the colors included in the color cluster in the target image; sorting the second preset number of target colors according to the number of pixels corresponding to the color clusters in which the second preset number of target colors are located, to obtain the color sorting corresponding to the second preset number of target colors.

[0203] In an optional embodiment, the above-mentioned color palette editing interface also includes a secondary color display area; the secondary color display area includes a third preset number of color block identifiers; different color block identifiers are respectively configured with corresponding sorting numbers; the above-mentioned method also includes: selecting a third preset number of target colors with a lower sorting order from the second preset number of target colors; based on the color sorting corresponding to the third preset number of target colors and the sorting numbers corresponding to the third preset number of color block identifiers included in the secondary color display area, the third preset number of target colors are configured as the colors corresponding to the color block identifiers in the secondary color display area.

[0204] In an optional embodiment, the second preset number is the sum of the first preset number and the third preset number.

[0205] In an optional embodiment, the above-mentioned color palette editing interface also includes a color selection control; the above-mentioned method also includes: in response to a first trigger operation on the color selection control, displaying a color palette creation window in the color palette editing interface; wherein the color palette creation window includes: a color entry corresponding to the color palette creation control and / or at least one color combination; in response to a second trigger operation on the color palette creation control, canceling the display of the color palette creation window, and configuring a default color in the color block identifiers in the primary color display area and the secondary color display area.

[0206] In an optional embodiment, the above method also includes: responding to a selection operation on a target color entry in the color palette creation window, canceling the display of the color palette creation window, and configuring the color of the color combination corresponding to the target color entry in the color block identifiers in the primary color display area and the secondary color display area.

[0207] In an optional embodiment, the above method also includes: responding to a third trigger operation on the color block identifier displayed in the color palette editing interface, determining the target color block identifier triggered by the third trigger operation, and displaying a color adjustment panel in the color palette editing interface; responding to a color setting operation on the color adjustment panel, determining a second color corresponding to the color setting operation, and updating the color configured in the target color block identifier according to the second color; responding to a fourth trigger operation on the save control displayed in the color palette editing interface, generating a first color combination including the color displayed by the color block identifier in the color palette editing interface.

[0208] In an optional embodiment, the method further includes: in response to a second trigger operation on a designated area or a cancel control in the color palette editing interface, canceling the display of the color adjustment panel in the color palette editing interface.

[0209] In an optional embodiment, the first color combination generated through the color palette editing interface is bound to and saved with the game account logged in by the terminal device.

[0210] In an optional embodiment, the color entry corresponding to the at least one color combination included in the color palette creation window includes: the color corresponding to the color block logo configured in the main color display area in the first color combination.

[0211] In an optional embodiment, the at least one color combination corresponding to the color palette creation window includes: a first color combination generated and saved in the color palette editing interface at a historical moment.

[0212] In an optional embodiment, the above-mentioned step of displaying a color palette editing interface in a graphical user interface includes: responding to a fifth trigger operation for a specified control in the graphical user interface, determining the number of combinations of the first color combination saved in the color palette editing interface; if the number of combinations is less than a preset number threshold, displaying a color palette editing interface in which the color block identifiers in the primary color display area and the secondary color display area are configured with a default color in the graphical user interface; if the number of combinations is equal to the preset number threshold, displaying a color palette editing interface in which the color block identifiers in the primary color display area and the secondary color display area are configured with a specified color in the graphical user interface; wherein the specified color is the color corresponding to the first color combination that was saved most recently in the color palette editing interface.

[0213] In an optional embodiment, the above method also includes: in response to a setting operation for a target scene component among multiple scene components, displaying a color palette selection control in a graphical user interface; in response to a sixth trigger operation for the color palette selection control, displaying a color palette selection list corresponding to the target scene component in the graphical user interface; wherein the color palette selection list includes an alternative color matching entry corresponding to at least one color matching combination; the alternative color matching entry includes alternative colors for the dyeing area contained in the target scene component; at least one color matching combination includes: a first color matching combination and / or a preset color matching combination in a preset color matching library; in response to a selection operation in the color palette selection list, determining a target color matching entry from the alternative color matching entries corresponding to at least one color matching combination, and updating the color of the dyeing area contained in the target scene component according to the alternative color in the target color matching entry; and displaying the target scene component after updating the color of the dyeing area in the graphical user interface.

[0214] In an optional embodiment, the number of candidate colors included in the candidate color matching entries displayed in the color palette selection list is the same as the number of dyed areas included in the target scene component.

[0215] In an optional embodiment, a setting control is displayed in the above-mentioned graphical user interface; the above-mentioned step of displaying a color palette selection control in the graphical user interface in response to a setting operation on a target scene component among multiple scene components includes: responding to a trigger operation on a target scene component among multiple scene components, selecting the target scene component; responding to the trigger operation on the setting control, displaying a second editing window in the graphical user interface; wherein the second editing window includes: a color palette selection control, and the current color corresponding to the dyeing area contained in the target scene component.

[0216] In an optional embodiment, the above-mentioned second editing window includes a color display area, which displays the color identification of the current color, and different color identifications correspond to the dyeing areas contained in the target scene component; the above-mentioned method also includes: responding to a trigger operation for the color identification, displaying a color adjustment panel in the second editing window; responding to a color setting operation for the color adjustment panel, determining a third color corresponding to the color setting operation; updating the color of the dyeing area corresponding to the color identification in the target scene component according to the third color, and updating the color identification in the color display area according to the third color.

[0217] In an optional embodiment, a first interactive control is also displayed in the above-mentioned graphical user interface; the above-mentioned method also includes: in response to a trigger operation on the first interactive control, displaying a third editing window in the graphical user interface; wherein the third editing window includes at least one color combination; at least one color combination includes: the first color combination and / or a preset color combination in a preset color library; the first color combination and the preset color combination both contain a second preset number of colors, and the second preset number of colors contained in the first color combination contains a second preset number of target colors; in response to a trigger operation on the third editing window, determining a target color combination from at least one color combination; updating the colors of the dyed areas in the multiple scene components included in the game editing scene according to the second preset number of colors in the target color combination.

[0218] In an optional embodiment, the above-mentioned step of updating the colors of the dyed areas in the multiple scene components included in the game editing scene according to the second preset number of colors in the target color combination includes: for each scene component in the multiple scene components included in the game editing scene, according to the actual size of the scene component and the area ratio corresponding to the dyed area in the scene component, determine the fourth color corresponding to the dyed area in the scene component from the second preset number of colors in the target color combination; wherein the area ratio corresponding to the dyed area includes: the ratio of the size of the dyed area to the size of the scene component to which the dyed area belongs; and updating the colors of the dyed areas in the multiple scene components to the fourth color corresponding to the dyed areas.

[0219] In an optional embodiment, the above-mentioned step of determining the fourth color corresponding to the dyed area in the scene component from the colors in the target color combination based on the actual size of the scene component and the area ratio corresponding to the dyed area in the scene component includes: dividing the actual size of the scene component by the scene size to obtain a division result; wherein the scene size is determined based on the game scene information, and the game scene information is generated based on a game editing scene containing multiple scene components; for each dyed area in the scene component, multiplying the division result by the area ratio corresponding to the dyed area to obtain a final ratio corresponding to the dyed area; and determining the fourth color corresponding to the dyed area from a second preset number of colors contained in the target color combination based on the final ratio corresponding to the dyed area.

[0220] In an optional embodiment, in the above-mentioned target color combination, different colors correspond to different proportion intervals, and the proportion intervals are used to indicate: when the fourth color corresponding to the dyeing area is a color in the target color combination, the value range of the corresponding final proportion; according to the final proportion corresponding to the dyeing area, the step of determining the fourth color corresponding to the dyeing area from the second preset number of colors included in the target color combination includes: based on the proportion intervals corresponding to the colors included in the target color combination, determining the target proportion interval to which the final proportion corresponding to the dyeing area belongs, and determining the color in the target color combination corresponding to the target proportion interval as the fourth color corresponding to the dyeing area.

[0221] In an optional embodiment, the third editing window further includes an area selection control; the area selection control is used to select a scene area in the game editing scene; the method further includes: responding to a trigger operation on the area selection control, displaying an area selection identifier in a graphical user interface; responding to a setting operation on the area selection identifier, and determining, based on the setting operation, a target scene area selected by the area selection identifier in the game editing scene; responding to a selection operation on a color combination in the third editing window, and updating the color of the dyed area in the scene component within the target scene area based on the colors included in the selected color combination.

[0222] In an optional embodiment, the above method also includes: responding to a marking operation on a first scene component among multiple scene components, determining a marking feature of the first scene component; responding to a color change operation on the first scene component, updating the color of the first scene component to a color that matches the marking feature.

[0223] Furthermore, the electronic device shown in FIG11 further includes a bus 102 and a communication interface 103 , and the processor 101 , the communication interface 103 and the memory 100 are connected via the bus 102 .

[0224] Memory 100 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between the system network element and at least one other network element is achieved through at least one communication interface 103 (which may be wired or wireless), and may utilize the Internet, a wide area network, a local area network, a metropolitan area network, etc. Bus 102 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, FIG11 uses only one bidirectional arrow, but this does not imply that there is only one bus or only one type of bus.

[0225] The processor 101 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 101 or by instructions in the form of software. The above-mentioned processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as a random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or register. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100 and, in conjunction with its hardware, completes the steps of the method of the aforementioned embodiment.

[0226] The embodiment of the present disclosure also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the color-changing method in the above-mentioned game. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0227] Specifically, the color changing method in the above-mentioned game includes: a graphical user interface displayed by running the game program, the graphical user interface includes a game editing scene to be edited, the game editing scene includes multiple scene components, wherein the scene component includes at least one dyeing area, the dyeing area is used to configure the color of the scene component, and the at least one dyeing area is respectively configured with a corresponding area number; displaying a color palette editing interface in the graphical user interface; wherein the color palette editing interface includes an upload image control and a main color display area, the main color display area includes a first preset number of color block identifiers, and different color block identifiers are respectively configured with corresponding sorting numbers; in response to inputting a target in the upload image control Image, perform color extraction on the target image to obtain a second preset number of target colors, and configure the color corresponding to the color block identifier in the main color display area according to the second preset number of target colors; in response to the save operation, generate and save a first color combination; wherein, the first color combination includes: the sorting sequence numbers of the first preset number of color block identifiers, and the target colors corresponding to the color block identifiers; in response to the application instruction for the first color combination, determine the color block identifier corresponding to the dyeing area according to the area number of the dyeing area in the scene component and the sorting sequence number of the color block identifier, and configure the color for the dyeing area in the scene component according to the target color corresponding to the color block identifier in the first color combination.

[0228] In the above method, players can generate custom color combinations through the color palette editing interface, thereby increasing the freedom of color combination settings; at the same time, players can use custom color combinations to change the overall color of the dyed area in the scene component, thereby improving the efficiency of component color change.

[0229] In an optional embodiment, the above method also includes: displaying a first editing window in a graphical user interface; wherein the first editing window includes multiple editable components; in response to an editing operation on a target editable component among the multiple editable components, controlling the generation of a scene component corresponding to the target editable component in the game editing scene.

[0230] In an optional embodiment, in the scene component, one dyed area corresponds to one color channel; the color channel is used to store color parameters of the dyed area and update the color of the dyed area according to the color parameters.

[0231] In an optional embodiment, the above-mentioned step of performing color extraction on the target image to obtain a second preset number of target colors includes: clustering the colors of the target image to obtain a second preset number of color clusters; determining the first color from the color clusters to obtain a second preset number of first colors contained in the target image; and determining a second preset number of target colors based on the second preset number of first colors contained in the target image.

[0232] In an optional embodiment, the above-mentioned step of determining the first color from the color cluster to obtain a second preset number of first colors contained in the target image includes: for each color cluster, performing the following operations: determining the color corresponding to the cluster center of the current color cluster; determining the color score of the color in the current color cluster based on the saturation of the color in the current color cluster and the color difference between the color in the current color cluster and the color corresponding to the cluster center; determining the color with the highest color score as the first color in the current color cluster.

[0233] In an optional embodiment, the above-mentioned step of determining a second preset number of target colors based on the second preset number of first colors contained in the target image includes: judging whether the brightness value of the first color is within a preset brightness range, and if it is within the preset brightness range, determining the first color as the target color; if the brightness value of the first color is less than the preset minimum brightness value corresponding to the preset brightness range, adjusting the brightness value of the first color to the preset minimum brightness value, and determining the first color after the brightness adjustment as the target color; if the brightness value of the first color is greater than the preset maximum brightness value corresponding to the preset brightness range, adjusting the brightness of the first color to the preset maximum brightness value, and determining the first color after the brightness adjustment as the target color.

[0234] In an optional embodiment, while adjusting the brightness of the first color, the saturation of the first color is also adjusted, and the first color after the brightness and saturation are adjusted is determined as the target color.

[0235] In an optional embodiment, the above-mentioned step of configuring the colors corresponding to the color block logos in the main color display area according to the second preset number of target colors includes: selecting the first preset number of target colors with the highest ranking from the second preset number of target colors according to the color sorting corresponding to the second preset number of target colors; and configuring the first preset number of target colors as the colors corresponding to the color block logos in the main color display area based on the color sorting corresponding to the first preset number of target colors and the sorting sequence numbers corresponding to the color block logos.

[0236] In an optional embodiment, the color sorting corresponding to the second preset number of target colors is determined in the following manner: determining the number of pixels occupied by the colors included in the color cluster in the target image; sorting the second preset number of target colors according to the number of pixels corresponding to the color clusters in which the second preset number of target colors are located, to obtain the color sorting corresponding to the second preset number of target colors.

[0237] In an optional embodiment, the above-mentioned color palette editing interface also includes a secondary color display area; the secondary color display area includes a third preset number of color block identifiers; different color block identifiers are respectively configured with corresponding sorting numbers; the above-mentioned method also includes: selecting a third preset number of target colors with a lower sorting order from the second preset number of target colors; based on the color sorting corresponding to the third preset number of target colors and the sorting numbers corresponding to the third preset number of color block identifiers included in the secondary color display area, the third preset number of target colors are configured as the colors corresponding to the color block identifiers in the secondary color display area.

[0238] In an optional embodiment, the second preset number is the sum of the first preset number and the third preset number.

[0239] In an optional embodiment, the above-mentioned color palette editing interface also includes a color selection control; the above-mentioned method also includes: in response to a first trigger operation on the color selection control, displaying a color palette creation window in the color palette editing interface; wherein the color palette creation window includes: a color entry corresponding to the color palette creation control and / or at least one color combination; in response to a second trigger operation on the color palette creation control, canceling the display of the color palette creation window, and configuring a default color in the color block identifiers in the primary color display area and the secondary color display area.

[0240] In an optional embodiment, the above method also includes: responding to a selection operation on a target color entry in the color palette creation window, canceling the display of the color palette creation window, and configuring the color of the color combination corresponding to the target color entry in the color block identifiers in the primary color display area and the secondary color display area.

[0241] In an optional embodiment, the above method also includes: responding to a third trigger operation on the color block identifier displayed in the color palette editing interface, determining the target color block identifier triggered by the third trigger operation, and displaying a color adjustment panel in the color palette editing interface; responding to a color setting operation on the color adjustment panel, determining a second color corresponding to the color setting operation, and updating the color configured in the target color block identifier according to the second color; responding to a fourth trigger operation on the save control displayed in the color palette editing interface, generating a first color combination including the color displayed by the color block identifier in the color palette editing interface.

[0242] In an optional embodiment, the method further includes: in response to a second trigger operation on a designated area or a cancel control in the color palette editing interface, canceling the display of the color adjustment panel in the color palette editing interface.

[0243] In an optional embodiment, the first color combination generated through the color palette editing interface is bound to and saved with the game account logged in by the terminal device.

[0244] In an optional embodiment, the color entry corresponding to the at least one color combination included in the color palette creation window includes: the color corresponding to the color block logo configured in the main color display area in the first color combination.

[0245] In an optional embodiment, the at least one color combination corresponding to the color palette creation window includes: a first color combination generated and saved in the color palette editing interface at a historical moment.

[0246] In an optional embodiment, the above-mentioned step of displaying a color palette editing interface in a graphical user interface includes: responding to a fifth trigger operation for a specified control in the graphical user interface, determining the number of combinations of the first color combination saved in the color palette editing interface; if the number of combinations is less than a preset number threshold, displaying a color palette editing interface in which the color block identifiers in the primary color display area and the secondary color display area are configured with a default color in the graphical user interface; if the number of combinations is equal to the preset number threshold, displaying a color palette editing interface in which the color block identifiers in the primary color display area and the secondary color display area are configured with a specified color in the graphical user interface; wherein the specified color is the color corresponding to the first color combination that was saved most recently in the color palette editing interface.

[0247] In an optional embodiment, the above method also includes: in response to a setting operation for a target scene component among multiple scene components, displaying a color palette selection control in a graphical user interface; in response to a sixth trigger operation for the color palette selection control, displaying a color palette selection list corresponding to the target scene component in the graphical user interface; wherein the color palette selection list includes an alternative color matching entry corresponding to at least one color matching combination; the alternative color matching entry includes alternative colors for the dyeing area contained in the target scene component; at least one color matching combination includes: a first color matching combination and / or a preset color matching combination in a preset color matching library; in response to a selection operation in the color palette selection list, determining a target color matching entry from the alternative color matching entries corresponding to at least one color matching combination, and updating the color of the dyeing area contained in the target scene component according to the alternative color in the target color matching entry; and displaying the target scene component after updating the color of the dyeing area in the graphical user interface.

[0248] In an optional embodiment, the number of candidate colors included in the candidate color matching entries displayed in the color palette selection list is the same as the number of dyed areas included in the target scene component.

[0249] In an optional embodiment, a setting control is displayed in the above-mentioned graphical user interface; the above-mentioned step of displaying a color palette selection control in the graphical user interface in response to a setting operation on a target scene component among multiple scene components includes: responding to a trigger operation on a target scene component among multiple scene components, selecting the target scene component; responding to the trigger operation on the setting control, displaying a second editing window in the graphical user interface; wherein the second editing window includes: a color palette selection control, and the current color corresponding to the dyeing area contained in the target scene component.

[0250] In an optional embodiment, the above-mentioned second editing window includes a color display area, which displays the color identification of the current color, and different color identifications correspond to the dyeing areas contained in the target scene component; the above-mentioned method also includes: responding to a trigger operation for the color identification, displaying a color adjustment panel in the second editing window; responding to a color setting operation for the color adjustment panel, determining a third color corresponding to the color setting operation; updating the color of the dyeing area corresponding to the color identification in the target scene component according to the third color, and updating the color identification in the color display area according to the third color.

[0251] In an optional embodiment, a first interactive control is also displayed in the above-mentioned graphical user interface; the above-mentioned method also includes: in response to a trigger operation on the first interactive control, displaying a third editing window in the graphical user interface; wherein the third editing window includes at least one color combination; at least one color combination includes: the first color combination and / or a preset color combination in a preset color library; the first color combination and the preset color combination both contain a second preset number of colors, and the second preset number of colors contained in the first color combination contains a second preset number of target colors; in response to a trigger operation on the third editing window, determining a target color combination from at least one color combination; updating the colors of the dyed areas in the multiple scene components included in the game editing scene according to the second preset number of colors in the target color combination.

[0252] In an optional embodiment, the above-mentioned step of updating the colors of the dyed areas in the multiple scene components included in the game editing scene according to the second preset number of colors in the target color combination includes: for each scene component in the multiple scene components included in the game editing scene, according to the actual size of the scene component and the area ratio corresponding to the dyed area in the scene component, determine the fourth color corresponding to the dyed area in the scene component from the second preset number of colors in the target color combination; wherein the area ratio corresponding to the dyed area includes: the ratio of the size of the dyed area to the size of the scene component to which the dyed area belongs; and updating the colors of the dyed areas in the multiple scene components to the fourth color corresponding to the dyed areas.

[0253] In an optional embodiment, the above-mentioned step of determining the fourth color corresponding to the dyed area in the scene component from the colors in the target color combination based on the actual size of the scene component and the area ratio corresponding to the dyed area in the scene component includes: dividing the actual size of the scene component by the scene size to obtain a division result; wherein the scene size is determined based on the game scene information, and the game scene information is generated based on a game editing scene containing multiple scene components; for each dyed area in the scene component, multiplying the division result by the area ratio corresponding to the dyed area to obtain a final ratio corresponding to the dyed area; and determining the fourth color corresponding to the dyed area from a second preset number of colors contained in the target color combination based on the final ratio corresponding to the dyed area.

[0254] In an optional embodiment, in the above-mentioned target color combination, different colors correspond to different proportion intervals, and the proportion intervals are used to indicate: when the fourth color corresponding to the dyeing area is a color in the target color combination, the value range of the corresponding final proportion; according to the final proportion corresponding to the dyeing area, the step of determining the fourth color corresponding to the dyeing area from the second preset number of colors included in the target color combination includes: based on the proportion intervals corresponding to the colors included in the target color combination, determining the target proportion interval to which the final proportion corresponding to the dyeing area belongs, and determining the color in the target color combination corresponding to the target proportion interval as the fourth color corresponding to the dyeing area.

[0255] In an optional embodiment, the third editing window further includes an area selection control; the area selection control is used to select a scene area in the game editing scene; the method further includes: responding to a trigger operation on the area selection control, displaying an area selection identifier in a graphical user interface; responding to a setting operation on the area selection identifier, and determining, based on the setting operation, a target scene area selected by the area selection identifier in the game editing scene; responding to a selection operation on a color combination in the third editing window, and updating the color of the dyed area in the scene component within the target scene area based on the colors included in the selected color combination.

[0256] In an optional embodiment, the above method also includes: responding to a marking operation on a first scene component among multiple scene components, determining a marking feature of the first scene component; responding to a color change operation on the first scene component, updating the color of the first scene component to a color that matches the marking feature.

[0257] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the relevant technology or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a terminal device, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0258] In the description of this disclosure, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate the description of this disclosure and simplify the description. They do not indicate or imply that the devices or components referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limitations on this disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0259] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The scope of protection of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present disclosure, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure shall be subject to the scope of protection of the claims.

Claims

1. A color changing method in a game, the method comprising: A graphical user interface is displayed by running the game program, wherein the graphical user interface includes a game editing scene to be edited, and the game editing scene includes a plurality of scene components, wherein the scene component includes at least one dyeing area, and the dyeing area is used to configure a color for the scene component, and the at least one dyeing area is respectively configured with a corresponding area number; Displaying a color palette editing interface in the graphical user interface; wherein the color palette editing interface includes an upload image control and a main color tone display area, the main color tone display area includes a first preset number of color block identifiers, and different color block identifiers are respectively configured with corresponding sorting numbers; In response to inputting a target image in the upload image control, color extraction is performed on the target image to obtain a second preset number of target colors, and according to the second preset number of target colors, a color corresponding to the color block mark in the main color display area is configured; In response to the saving operation, a first color combination is generated and saved; wherein the first color combination includes: the sorting sequence numbers of the first preset number of color block identifiers, and the target colors corresponding to the color block identifiers; In response to an application instruction for the first color combination, the color block identifier corresponding to the stained area in the scene component is determined according to the area number of the stained area and the sorting sequence number of the color block identifier, and the color of the stained area in the scene component is configured according to the target color corresponding to the color block identifier in the first color combination.

2. The method according to claim 1, wherein: The method further comprises: Displaying a first editing window in the graphical user interface; wherein the first editing window includes a plurality of editable components; In response to an editing operation on a target editable component among the plurality of editable components, control is performed to generate a scene component corresponding to the target editable component in the game editing scene.

3. The method according to claim 1, wherein: In the scene component, one of the dyed areas corresponds to one color channel; the color channel is used to store the color parameters of the dyed area and update the color of the dyed area according to the color parameters.

4. The method according to claim 1, wherein: The step of extracting colors from the target image to obtain the second preset number of target colors includes: Performing clustering processing on the colors of the target image to obtain the second preset number of color clusters; Determine a first color from the color cluster to obtain a second preset number of first colors included in the target image; Based on a second preset number of first colors included in the target image, the second preset number of target colors is determined.

5. The method according to claim 4, wherein: The step of determining the first color from the color cluster to obtain a second preset number of first colors contained in the target image includes: For each of the color clusters, perform the following operations: Determine the color corresponding to the cluster center of the current color cluster; Determining a color score of the color in the current color cluster based on the saturation of the color in the current color cluster and the color difference between the color in the current color cluster and the color corresponding to the cluster center; The color with the highest color score is determined as the first color in the current color cluster.

6. The method according to claim 4, wherein: The step of determining the second preset number of target colors based on the second preset number of first colors included in the target image includes: Determine whether the brightness value of the first color is within a preset brightness range, and if it is within the preset brightness range, determine the first color as the target color; If the brightness value of the first color is less than the preset minimum brightness value corresponding to the preset brightness range, adjusting the brightness value of the first color to the preset minimum brightness value, and determining the first color after brightness adjustment as the target color; If the brightness value of the first color is greater than a preset maximum brightness value corresponding to the preset brightness range, the brightness of the first color is adjusted to the preset maximum brightness value, and the first color after brightness adjustment is determined as the target color.

7. The method according to claim 6, wherein: While adjusting the brightness of the first color, the saturation of the first color is adjusted, and the first color after the brightness and saturation are adjusted is determined as the target color.

8. The method according to claim 4, wherein: The step of configuring the color corresponding to the color block logo in the main color display area according to the second preset number of target colors includes: According to the color ranking corresponding to the second preset number of target colors, selecting a first preset number of target colors with top rankings from the second preset number of target colors; Based on the color order corresponding to the first preset number of target colors and the order number corresponding to the color block identifier, the first preset number of target colors are configured as the colors corresponding to the color block identifier in the main color display area.

9. The method according to claim 8, wherein: The color order corresponding to the second preset number of target colors is determined in the following manner: Determine the number of pixels occupied by the colors included in the color cluster in the target image; The second preset number of target colors are sorted according to the number of pixel points corresponding to the color cluster where the second preset number of target colors are located, to obtain a color sorting corresponding to the second preset number of target colors.

10. The method according to claim 8, wherein: The color palette editing interface also includes a secondary color display area; the secondary color display area includes a third preset number of color block marks; Different color block identifiers are respectively configured with corresponding sorting numbers; The method further comprises: Selecting the third preset number of target colors with lower sorting from the second preset number of target colors; Based on the color sorting corresponding to the third preset number of target colors and the sorting numbers corresponding to the third preset number of color block identifiers included in the auxiliary color display area, the third preset number of target colors are configured as colors corresponding to the color block identifiers in the auxiliary color display area.

11. The method according to claim 10, wherein: The second preset number is the sum of the first preset number and the third preset number.

12. The method according to claim 10, wherein: The color palette editing interface also includes a color selection control; the method also includes: In response to a first trigger operation on the color matching selection control, a color palette creation window is displayed in the color palette editing interface; wherein the color palette creation window includes: a color palette creation control and / or a color entry corresponding to at least one color matching combination; In response to a second trigger operation on the color palette creation control, the color palette creation window is canceled from being displayed, and default colors are configured in the color block identifiers in the primary color display area and the secondary color display area.

13. The method according to claim 12, wherein: The method further comprises: In response to a selection operation on a target color entry in the color palette creation window, the color palette creation window is canceled, and the color of the color combination corresponding to the target color entry is configured in the color block identifiers in the primary color display area and the secondary color display area.

14. The method according to claim 13, wherein: The method further comprises: In response to a third trigger operation on a color block identifier displayed in the color palette editing interface, determining a target color block identifier triggered by the third trigger operation, and displaying a color adjustment panel in the color palette editing interface; In response to a color setting operation on the color adjustment panel, determining a second color corresponding to the color setting operation, and updating the color configured in the target color block identifier according to the second color; In response to a fourth trigger operation on a save control displayed in the color palette editing interface, a first color combination including the colors displayed by the color block identifiers in the color palette editing interface is generated.

15. The method according to claim 14, wherein: The method further comprises: In response to a second trigger operation on a designated area or a cancel control in the color palette editing interface, the color adjustment panel is canceled from being displayed in the color palette editing interface.

16. The method according to claim 14, wherein: The first color combination generated through the color palette editing interface is bound and saved to a game account logged in by the terminal device providing the graphical user interface.

17. The method according to claim 12, wherein: The color entry corresponding to at least one color combination included in the color palette creation window includes: the color corresponding to the color block logo configured as the main color display area in the first color combination.

18. The method according to claim 12, wherein: The at least one color combination corresponding to the color palette creation window includes: a first color combination generated and saved in the color palette editing interface at a historical moment.

19. The method according to claim 18, wherein: The step of displaying a color palette editing interface in the graphical user interface comprises: In response to a fifth trigger operation on a designated control in the graphical user interface, determining the number of combinations of the first color combination stored in the color palette editing interface; If the number of combinations is less than a preset number threshold, a color palette editing interface for configuring default colors of color block markers in the primary color display area and the secondary color display area is displayed in the graphical user interface; If the number of combinations is equal to the preset number threshold, a color palette editing interface is displayed in the graphical user interface, in which the color block logos in the primary color display area and the secondary color display area are configured with the specified color; wherein the specified color is the color corresponding to the first color combination that was last saved in the color palette editing interface.

20. The method according to claim 1, wherein: The method further comprises: In response to a setting operation on a target scene component among the plurality of scene components, displaying a color palette selection control in the graphical user interface; In response to a sixth trigger operation on the color palette selection control, a color palette selection list corresponding to the target scene component is displayed in the graphical user interface; wherein the color palette selection list includes an alternative color matching entry corresponding to at least one color matching combination; the alternative color matching entry includes alternative colors of the dyed area included in the target scene component; the at least one color matching combination includes: the first color matching combination and / or a preset color matching combination in a preset color matching library; In response to a selection operation in the color palette selection list, a target color matching entry is determined from the candidate color matching entries corresponding to the at least one color matching combination, and a color of a dyed area included in the target scene component is updated according to the candidate colors in the target color matching entry; The target scene component after the color of the dyed area is updated is displayed in the graphical user interface.

21. The method according to claim 20, wherein: The number of colors of the alternative colors contained in the alternative color matching entries displayed in the color palette selection list is the same as the number of areas of the dyeing area contained in the target scene component.

22. The method according to claim 20, wherein: The graphical user interface displays a setting control; The step of displaying a color palette selection control in the graphical user interface in response to a setting operation on a target scene component among the multiple scene components comprises: In response to a triggering operation on a target scene component among the multiple scene components, the target scene component is selected; In response to a trigger operation on the setting control, a second editing window is displayed in the graphical user interface; wherein the second editing window includes: the color palette selection control, and the current color corresponding to the dyeing area contained in the target scene component.

23. The method according to claim 22, wherein: The second editing window includes a color display area, the color display area displays the color identification of the current color, and different color identifications correspond to the dyeing areas included in the target scene component; the method also includes: In response to a trigger operation on the color identifier, displaying a color adjustment panel in the second editing window; In response to a color setting operation on the color adjustment panel, determining a third color corresponding to the color setting operation; The color of the dyed area corresponding to the color identifier in the target scene component is updated according to the third color, and the color identifier in the color display area is updated according to the third color.

24. The method according to claim 1, wherein: The graphical user interface also displays a first interactive control; the method further includes: In response to a trigger operation on the first interactive control, a third editing window is displayed in the graphical user interface; wherein the third editing window includes at least one color combination; the at least one color combination includes: the first color combination and / or a preset color combination in a preset color library; the first color combination and the preset color combination both include a second preset number of colors, and the second preset number of colors included in the first color combination include the second preset number of target colors; In response to a trigger operation on the third editing window, determining a target color combination from the at least one color combination; The color of the dyed area in the plurality of scene components included in the game editing scene is updated according to a second preset number of colors in the target color combination.

25. The method according to claim 24, wherein: The step of updating the color of the dyed area in the plurality of scene components included in the game editing scene according to a second preset number of colors in the target color combination comprises: For each of the multiple scene components included in the game editing scene, according to the actual size of the scene component and the area ratio corresponding to the dyed area in the scene component, determine a fourth color corresponding to the dyed area in the scene component from a second preset number of colors in the target color combination; wherein the area ratio corresponding to the dyed area includes: a ratio of the size of the dyed area to the size of the scene component to which the dyed area belongs; The color of the dyed area in the multiple scene components is updated to a fourth color corresponding to the dyed area.

26. The method according to claim 25, wherein: The step of determining, from the colors in the target color combination, a fourth color corresponding to the dyed area in the scene component according to the actual size of the scene component and the area proportion corresponding to the dyed area in the scene component, comprises: Dividing the actual size of the scene component by the scene size to obtain a division result; wherein the scene size is determined based on game scene information, and the game scene information is generated based on a game editing scene including the plurality of scene components; For each dyed area in the scene component, multiply the division result by the area proportion corresponding to the dyed area to obtain a final proportion corresponding to the dyed area; based on the final proportion corresponding to the dyed area, determine a fourth color corresponding to the dyed area from a second preset number of colors included in the target color combination.

27. The method according to claim 26, wherein: In the target color combination, different colors correspond to different proportion intervals, and the proportion interval is used to indicate: when the fourth color corresponding to the dyed area is a color in the target color combination, the corresponding final proportion value range; The step of determining the fourth color corresponding to the dyed area from the second preset number of colors included in the target color combination according to the final proportion corresponding to the dyed area comprises: Based on the proportion intervals corresponding to the colors included in the target color combination, the target proportion interval to which the final proportion corresponding to the dyed area belongs is determined, and the color in the target color combination corresponding to the target proportion interval is determined as the fourth color corresponding to the dyed area.

28. The method of claim 24, wherein: The third editing window also includes a region selection control; the region selection control is used to select a scene region in the game editing scene; the method further includes: In response to a triggering operation on the area selection control, displaying an area selection mark in the graphical user interface; In response to a setting operation for the area selection identifier, based on the setting operation, determining a target scene area selected by the area selection identifier in the game editing scene; In response to a selection operation on a color combination in the third editing window, the color of the dyed area in the scene component within the target scene area is updated based on the colors included in the selected color combination.

29. The method of claim 1, wherein: The method further comprises: In response to a marking operation on a first scene component among the plurality of scene components, determining a marking feature of the first scene component; In response to a color-changing operation on the first scene component, the color of the first scene component is updated to a color matching the marking feature.

30. A color changing device in a game, the device comprising: A scene display module, used for displaying a graphical user interface by running a game program, wherein the graphical user interface includes a game editing scene to be edited, and the game editing scene includes a plurality of scene components, wherein the scene component includes at least one dyeing area, and the dyeing area is used to configure a color for the scene component, and the at least one dyeing area is respectively configured with a corresponding area number; An interface display module, used to display a color palette editing interface in the graphical user interface; wherein the color palette editing interface includes an upload image control and a main color tone display area, the main color tone display area includes a first preset number of color block identifiers, and different color block identifiers are respectively configured with corresponding sorting numbers; A color extraction module, configured to extract the color of a target image in response to inputting the target image in the upload image control, obtain a second preset number of target colors, and configure the color corresponding to the color block mark in the main color display area according to the second preset number of target colors; A color matching generation module, configured to generate and save a first color matching combination in response to a saving operation, wherein the first color matching combination includes: a sorting sequence number of the first preset number of color block identifiers, and a target color corresponding to the color block identifier; A component color changing module is used to respond to an application instruction for the first color combination, determine the color block identifier corresponding to the dyed area in the scene component according to the area number of the dyed area in the scene component and the sorting sequence number of the color block identifier, and configure the color for the dyed area in the scene component according to the target color corresponding to the color block identifier in the first color combination.

31. An electronic device, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the color changing method in the game described in any one of claims 1 to 29.

32. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the color-changing method in the game described in any one of claims 1 to 29.