A method comprising: receiving an input image of an input video signal as input to a pipeline of chained reshaping functions, the pipeline of chained reshaping functions including a chain of reshaping functions; generating two or more reference images for two or more reference color grades from the input image of the input video signal, each reference image in the two or more reference images corresponding to a respective reference color grade in the two or more reference color grades, the two or more reference color grades differing from each other and from the color grade of the input image; using the input image and the two or more reference images to determine two or more sets of operational parameters for two or more chained reshaping functions in the pipeline of chained reshaping functions, each set of operational parameters specifying a respective chained reshaping function in the two or more chained reshaping functions such that each chained reshaping function in the two or more chained reshaping functions generates a respective reshaped image in two or more reshaped images in two or more reshaping color grades, each of the two or more reshaping color grades being the same or approximating a corresponding one of the two or more reference color grades; encoding a selected reshaped image in a first reshaping color grade, among the two or more reshaped images in the two or more reshaping color grades, in a video signal along with image metadata, the first reshaping color grade corresponding to a first chained reshaping function that generates the selected reshaped image in the first reshaping color grade, the image metadata including one or more sets of operational parameters for a second or more chained reshaping functions among the two or more chained reshaping functions, the second or more chained reshaping functions following the first reshaping function in the chain of reshaping functions, the second or more chained reshaping functions generating a reconstructed image of the second reshaping color grade, a recipient device of the video signal being caused to use the image metadata and the selected reshaped image to generate a reconstructed image of the second reshaping color grade. receiving an input image of an input video signal as input to a pipeline of chained reshaping functions, the pipeline of chained reshaping functions including a chain of reshaping functions; generating two or more reference images for two or more reference color grades from the input image of the input video signal, each reference image in the two or more reference images corresponding to a respective reference color grade in the two or more reference color grades, the two or more reference color grades differing from each other and from the color grade of the input image; using the input image and the two or more reference images to determine two or more sets of operational parameters for two or more chained reshaping functions in the pipeline of chained reshaping functions, each set of operational parameters specifying a respective chained reshaping function in the two or more chained reshaping functions such that each chained reshaping function in the two or more chained reshaping functions generates a respective reshaped image in two or more reshaped images in two or more reshaping color grades, each of the two or more reshaping color grades being the same or approximating a corresponding one of the two or more reference color grades; encoding a selected reshaped image in a first reshaping color grade, among the two or more reshaped images in the two or more reshaping color grades, in a video signal along with image metadata, the first reshaping color grade corresponding to a first chained reshaping function that generates the selected reshaped image in the first reshaping color grade, the image metadata including one or more sets of operational parameters for a second or more chained reshaping functions among the two or more chained reshaping functions, the second or more chained reshaping functions following the first reshaping function in the chain of reshaping functions, the second or more chained reshaping functions generating a reconstructed image of the second reshaping color grade, a recipient device of the video signal being caused to use the image metadata and the selected reshaped image to generate a reconstructed image of the second reshaping color grade.