A method for scaling in color transform is provided, in which the quantization parameter (QP) is constrained in a valid range if adaptive color transform is used, wherein the QP cannot be lower than 0, and QP is clipped to a valid range. This method can be used in a video encoder as well as in a video decoder.