Form factor compactness is an essential factor of augmented reality (AR) near-eye display. To achieve this compactness, the optimal design of a single diffractive waveguide wherein in-coupler, expander, and out-coupler are monolithically integrated and able to control the RGB primary colors simultaneously in a single waveguide form factor. we present a new design of achromatic diffractive waveguide with meta-grating based in-coupler, expander, and out-coupler. The grating design algorithm is the gradient optimization algorithm based on the auto-differentiation of the Fourier modal method (FMM). By imposing additional constraints to the figure of merit (FOM) to take into account fabrication feasibility, we aimed to construct the more practical design rule.